OpenCL-Docs
OpenCL-Docs copied to clipboard
Layout of structures used as kernel arguments
The OpenCL specification does not currently define how structures used as kernel arguments have to be laid out in memory. Most applications that make use of structures as kernel arguments rely on their layout being identical on the host and device, which nothing guarantees. These applications work "by accident".
Other APIs, such as Vulkan, require interface structures be explicitly laid out using decorations in SPIR-V modules.
How should OpenCL solve this issue? At the bare minimum we should add a warning to the spec.
Related to #10 and #11