I am writing a library. I have multiple versions of the kernel depending on the alignment. The library API receives a buffer (as a cl_mem) and depending on whether or not it is aligned to (say) float4, I select the applicable kernel.

However, the problem is, there appears to be no standard way to know if the buffer I am getting is appropriately aligned. For now, I have pushed this responsibility to the user of the library by forcing them to select the appropriate version. But this is not an ideal solution.

Would definitely like a clean approach to query the alignment info of buffer objects.