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.

Attachment: pgphPRramU3Ux.pgp
Description: PGP signature

Reply via email to