Hi, I am going to load 3 arrays from CPU to GPU 4 times in a loop in my function. Then GPU will work on those arrays and generate output. 1 of the 3 arrays is going to be the same every time. SO i want to find a way to keep that 1 array *(arrazy_z)* constant instead of loading it each time. I also want to make sure that the other 2 new arrays that i load each time, they dont get stored separately on each iteration, otherwise I would run out of GPU memory soon. EG; iteration 1 - array_x1, array_y1, array_z iteration 2 - array_x2, array_y2, array_z iteration 3 - array_x3, array_y3, array_z iteration 4 - array_x4, array_y4, array_z
I want to be able to load *array_z* only once and use it all 4 times with same name. on iteration_1 i will load *array_x1 & array_y1* from CPU to GPU. Then on Iteration_2 I want the GPU to clear the memory space from array_x1 & array_y1, and store fresh new arrays *array_x2, array_y2.* To keep array_z unchanged on CPU i would just run following command once and then not modify "az" in the entire function az=array_z on CPU my variable *az * will remain as it is until the function ends. I can call *az* whenever i need in the same function. I can also pass it to another function with new name. But i dont know if same works on GPU. To solve array_x1, array_y1 case On CPU i would do: ax= array_x1 ay= array_y1 Then on iteration_2 ax= array_x2 ay= array_y2 that way old value from ax & ay is gone and new value is stored. But I dont know if this works on GPU too. Thanks
_______________________________________________ PyOpenCL mailing list PyOpenCL@tiker.net https://lists.tiker.net/listinfo/pyopencl