Hi Matt, > I guess effectively we'd like something like > MatCreateSeqAIJWithArrays and > MatCreateMPIAIJWithSplitArrays but with the ability to pass > device pointers > rather than host pointers. Is there any roadmap in PETSc for > this kind of > thing? Would patches in this direction be welcome? > > > Type safety is a bit nasty. CUDA allows to deal with plain 'void *', > while OpenCL expects cl_mem. This suggests to use something like > MatCreateSeqAIJWithCUDAArrays(__), > MatCreateSeqAIJWithOpenCLArray__s(), > but as I said above, I haven't come to a decision on that yet. > > > Let me be more specific. I would not support this. I think it is wrong. > > You should create the Mat in the normal way and then pull out the backend > storage. This way we have one simple interface for creation and > preallocation, > and eventually we make a nicer FEM interface to cover up the device pointer > extraction. >
Thanks for the input, I also prefer the 'one simple interface' approach. Best regards, Karli
