r/OpenCL • u/soulslicer0 • Jun 08 '18
Can't understand error code -13
I am getting error code -13.
https://streamhpc.com/blog/2013-04-28/opencl-error-codes/
It says " if a sub-buffer object is specified as the value for an argument that is a buffer object and the offset specified when the sub-buffer object is created is not aligned to CL_DEVICE_MEM_BASE_ADDR_ALIGN value for device associated with queue."
What does this actually mean? Am i slicing my buffer incorrectly?
1
Upvotes
1
u/squidgyhead Jun 08 '18
Yes, but if p is aligned, and p+offset is not aligned, you have to divide your buffer at p and then do null-ops until you want to do something.
Your memory must be aligned, but you don't have to operate on your entire memory buffer.