At the moment the OpenCL C spec states:
Of these, only memcpy is strictly correct in C99. Since OpenCL does not provide memcpy, other methods are needed.
Should we provide a type generic (for all OpenCL C scalars and vector types?) memcpy in OpenCL C? In SPIR-V we have OpCopyMemory and OpCopyMemorySized?
I think I'd prefer to provide a higher level function to developers rather than them trying to implement memcpy with loops or something that are fundamentally more difficult to optimize and more difficult to reason about pointer alignments.
Should we have a memcpy extension for this?
Should we have a memcpy_aligned version where developers can specify explicit pointer alignment?
At the moment the OpenCL C spec states:
Should we provide a type generic (for all OpenCL C scalars and vector types?)
memcpyin OpenCL C? In SPIR-V we have OpCopyMemory and OpCopyMemorySized?I think I'd prefer to provide a higher level function to developers rather than them trying to implement
memcpywith loops or something that are fundamentally more difficult to optimize and more difficult to reason about pointer alignments.Should we have a
memcpyextension for this?Should we have a
memcpy_alignedversion where developers can specify explicit pointer alignment?