Hi Tim, Tim Rudge <[email protected]> writes: > I am developing simulations where the numbers of agents increases over time. > I allocate enough space for some max_agents, on both host and device. > > For example max_agents might be 10^5. But for most of the simulation there > are far fewer agents, in fact usually there is one agent at the start. > > To be clear here is some code: > > pos = numpy.zeros((max_agents,), vec.float4) > pos_dev = cl_array.zeros(queue, (max_agents,), vec.float4) > > What is the best way to synchronise the first n (<max_cells) elements, > device->host and host->device? Using set/get on the whole array is > very slow...
As long as your slices are contiguous, just taking slices of the array and using get/set on them should work. Andreas
signature.asc
Description: PGP signature
_______________________________________________ PyOpenCL mailing list [email protected] http://lists.tiker.net/listinfo/pyopencl
