Dear Sushma,

sushma r <[email protected]> writes:
> I would like to ensure that host memory pointers are aligned on a
> particular boundary to ensure good cache use (say by using the device query
> MEM_BASE_ADDR_ALIGN to get best alignment for a device)
> Is there a way to specify that? Since numpy is used to define the array,
> for e.g. a = numpy.random.rand(50000).astype(numpy.float32) I don't really
> have control over how the allocation is done. Is there pre-set alignment?
> If yes, what is it?

This seems more like a numpy issue than a (Py)OpenCL issue. Here's a
message from the numpy list that discusses this:

http://mail.scipy.org/pipermail/scipy-user/2009-March/020283.html

As far as OpenCL is concerned, CL buffers are always aligned to the
largest granularity that the hardware cares about.

Andreas

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to