Software Archive
Read-only legacy content
17061 Discussions

Intel Xeon Phi: Complex data transfer with pointers in structs

Shanci_G_
Beginner
290 Views

Hi:

I want to transfer some structs to MIC, but it seems the structs cannot contain any pointer. Is there any infrastructure I can use to handle except manually extracting those pointers and transferring them alone?

Thanks

Guo

0 Kudos
1 Reply
jimdempseyatthecove
Honored Contributor III
290 Views

Assume the pointer is a pointer to an array of double's. How is the compiler or runtime system to know the size of the array of doubles?

Note, if the pointer is to be a pointer to an array held locally within the MIC, then on first offload you can pass in a NULL pointer to the MIC, it can allocate in the MIC, then pass back the pointer to the Host at completion of (first) offload. The host could not directly use the pointer, other than passing the pointer back into the MIC (as-is) on a future offload. The pointer could also be used on a getter/putter offload.

Jim Dempsey

0 Kudos
Reply