retain clContext across multiple function calls

Discussion created by salomonamd on Sep 8, 2010
Latest reply on Sep 13, 2010 by salomonamd
How do I reuse data already copied to GPU with various function calls?



could anyone help me? I have a matrix-vector multiplication program written in openCL/C. I call this function from Fortran to do a matrix vector multiplication. eg Ax=b. The A matrix does not change, however x is updated on successive calls. 

How can I reuse A on sucessive calls without reinitialising and copying A to the GPU? Because this takes up most of the execution time.