[petsc-dev] Supporting OpenCL matrix assembly
Dominic Meiser
dmeiser at txcorp.com
Tue Sep 24 10:21:50 CDT 2013
Hi,
> I think you were referring to the 'Mat' on the device, while I was
> referring to the plain PETSc Mat. The difficulty for a 'Mat' on the
> device is a limitation of OpenCL in defining opaque types: It is not
> possible to have something like
> typedef struct OpenCLMat {
> __global int row_indices;
> __global int col_indices;
> __global float entries;
> } PetscMat;
> and pass this as a single kernel argument.
> (cf. OpenCL standard or
> http://stackoverflow.com/questions/17635898/passing-struct-with-pointer-members-to-opencl-kernel-using-pyopencl)
You could copy that struct to GPU global memory and then pass a pointer
to that struct to the kernel.
Cheers,
Dominic
--
Dominic Meiser
Tech-X Corporation
5621 Arapahoe Avenue
Boulder, CO 80303
USA
Telephone: 303-996-2036
Fax: 303-448-7756
www.txcorp.com
More information about the petsc-dev
mailing list