- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know I can separate data copyin, offloading execution and copyout using pragma, e.g.
#pragma offload target(mic) nocopy (x: length(SIZE) alloc_if(0) free_if(0)) \
nocopy (y: length(SIZE) alloc_if(0) free_if(0))
However, can we do it as runtime call? For example, a function that takes a arbitrary number of arrays and the pointers/sizes of those array, it will have a loop iterating each array to copy data in. Similar thing for copy out. So is there runtime library for that?
Thanks
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The "array of pointers" feature should be used in this case.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Rajiv,
Thank you so much for you reply soon.
But It's not what I want. What I want is the runtime API that can be assigned for the function with the a number of arrays and the pointers/sizes of them, which means as this API can generate a arbitrary number of arrays as below according to the variables/parameters in the runtime dynamically instead of fixedly. How could I do that? Thanks!
#pragma offload target(mic) nocopy (x: length(SIZE) alloc_if(0) free_if(0)) \
nocopy (y: length(SIZE) alloc_if(0) free_if(0))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that the variable-length array of pointers must itself be statically allocated, but the dynamic number of pointers that it contains, and the starts and extents of data pointed to by each pointer in that array can be function parameters.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page