Software Archive
Read-only legacy content
17061 Discussions

how could I reuse memory allocated in sink side?

songlinhai
Beginner
274 Views

Hi,

    I am using buffer to transfer data from source to sink. How could I resue the memory allocated in to sink side? I mean how could I implement the similar functionality as the following codes by using coi library:

   int a[1000];

   int b[100];

   #pragma offload tra

   for(int i = 0; i < 10; i++) {

   #pragma offload target(mic:0) in(a[i*100:(i+1)*100]: into(b:[0:100]) alloc_if(0) free_if(0))

   { ...}

    }

   thanks a lot!

0 Kudos
1 Reply
Loc_N_Intel
Employee
274 Views

Hi,

Memory Allocation information can be found in the document "Intel(R) C++ Compiler XE 13.1 User and Reference Guides".

Key Features -> Intel(R) MIC Architecture -> Programming for Intel(R) MIC Architecture -> Offload Using a Pragma -> Managing Memory Allocation for Pointer Variables.

Regards.

0 Kudos
Reply