libocca / occa

Portable and vendor neutral framework for parallel programming on heterogeneous platforms.
https://libocca.org
MIT License
396 stars 86 forks source link

Deep copy support for structs #217

Open amikstcyr opened 6 years ago

amikstcyr commented 6 years ago

Hi OCCA-ers,

For non-trivial (read big-ol-mess) codes, it is sometimes necessary to copy structs (which contain also structs or stl containers) to the GPU & back ... (well at least to the GPU :-)). This avoids costly API changes when more than a handful of functions need to "kernel-ized".

Not sure about the flexibility of the current parser but maybe a low-hanging fruit using source to source tricks could be employed?

Best,

Amik

dmed256 commented 6 years ago

Structs of structs with basic types (like int/double/nested structs in #141) is probably the next feature to be added, so stay tuned :)

I don't think we can handle pointers in structs easily though, but maybe we can build up another occa::X type that can translate between host <--> device

dmed256 commented 5 years ago

@amikstcyr Basic structs are now be available in beec0865857f5fbdf55554deb596396b40614357

Missing: