Portability when the host and device have different endianness
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 247
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 6
Description
I was looking in the PyOpenCL source to see if I could find some example code of how to handle this correctly. However, as far as I can tell PyOpenCL allows querying the device endianness with `Device.endian_little` but does not use this information anywhere else. Is this correct or have I missed something?
If I am right and PyOpenCL doesn't do anything about endianness differences, is this because:
* OpenCL says that handling endianness is the responsibility of the user, and PyOpenCL is deliberately keeping the same semantics?
* In practice, devices always have the same endianness as the host, so there is no need for endianness correction?
* Lack of time / interested people to implement this? (I could potentially contribute here)
* Some other reason?
NumPy seems to be pretty good at handling arrays with non-native endianness, so hopefully this should be less effort to implement for PyOpenCL then it would be at the C level.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.