Andreas Kloeckner <[email protected]> writes: sushma r <[email protected]> writes: > Thanks Andreas. Yes, I agree it is more of a numpy question since I need to > control allocation of numpy array. But I really need for the host pointer > in opencl to be aligned to a particular boundary. I will check out the > link, hopefully it will get me an 'aligned_malloc' kind of functionality... > dont mind throwing in few extra bytes either.
Another possibility might be to allocate memory with ALLOC_HOST_PTR. Here's an example: https://gist.github.com/4353839 That memory ought to satisfy pretty stringent alignment requirement, plus it'll make transfers faster on AMD and Nvidia GPUs, because it's often backed by pinned memory. HTH, Andreas _______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
