Re: [petsc-dev] Backend independent VecGetArray for GPUs
17 Oct
2014
17 Oct
'14
11:40 a.m.
Karl Rupp <[email protected]> writes:
If this should be provided, then the right names were VecCUDAGetArray() VecOpenCLGetArray() The former returns an object of type PetscScalar* and the latter an object of type cl_mem. Because one is stuck with two incompatible pointer types here, I'd suggest not to provide a single interface at the expense of giving up type safety.
Agreed. Does cl_mem have a "null"?
Also, even if one gives up type safety, one would immediately have to switch-case into a backend-specific implementation again, so there's little value in a common interface.
It's useful to have a non-error path for calling.
4316
Age (days ago)
4316
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jed Brown