[petsc-dev] Backend independent VecGetArray for GPUs

Barry Smith bsmith at mcs.anl.gov
Fri Oct 17 14:11:49 CDT 2014


> On Oct 17, 2014, at 2:05 PM, Karl Rupp <rupp at iue.tuwien.ac.at> wrote:
> 
> 
>> 
>>   But you won’t want to have to create the CUSP or ViennaCL objects on the fly each time from the CUDA/OpenCL “raw pointers”?
> 
> why not? I can just 'wrap' an existing memory buffer for use with the respective operations provided with the respective library.

  So you mean like VecPlaceArray()?   Ok.

  This is a big refactorization, probably more than what Lisandro is looking for in the short run. So what do we do in the short run, provide VecCUSPGetCUDAArray() and VecViennaCLGetOpenCLArray()?  I’m ok with that.


  Barry

> Note that the cost of setting up such wrappers is negligible compared to the cost of launching a CUDA or OpenCL kernel.
> 
> Best regards,
> Karli
> 




More information about the petsc-dev mailing list