icubecorp / nvdla_compiler

21 stars 13 forks source link

Why the GetmemID #4

Closed qjivy closed 3 years ago

qjivy commented 5 years ago
    getNetWorkDescMemId(task_id, &mem_id);
    getNetWorkDescMemId(0, &first_task_mem_id);
    //push the mem id in vector
    (*mem_id_list).push_back(mem_id);

    debug_info("%s, %d, mem_id = %d\n", __FUNCTION__, __LINE__, mem_id);

    //mem id 0 not need to push
    for(index=1; index < first_task_mem_id; index++){
            mle = mList[index];
            (*mem_id_list).push_back(mle.id);
    }
    for(index=mem_id; index < mem_id + 6; index++){
            mle = mList[index];
            (*mem_id_list).push_back(mle.id);
    }
qjivy commented 5 years ago

In the above code snippet, MList entry of the task_0_networkdesc and task*_network_desc are found out by the two getNetworkDescMemId calls. Then the two for loops push the corresponding MemoryListEntry into the task->address_list. Could anyone please give some explanation about why we need to put these MemoryListEntry elements into the task->address_list, and why it's done in such way?

Thanks !

baolihua commented 5 years ago
      In the above code snippet,  MList entry of the task_0_network_desc and task_*_network_desc are found out by the two getNetworkDescMemId calls. Then the two for loops push the corresponding MemoryListEntry into the task->address_list.

Could anyone please give some explanation about why we need to put these MemoryListEntry elements into the task->address_list, and why it's done in such way? Thanks !

      There are two tasks in these model,  one do the networks, and the other one use for get the result. Every task has its address list where store its memory address.  The Memory store the data whiche is needed by the task;  
       mList store memory address needed by the tasks, every task has 6, the code above get its memory for each task;