Date: 2022-03-04T17:37:10+00:00

Actual source code: cupmcontext.cu

      1: #include "../cupmcontext.hpp" /*I "petscdevice.h" I*/

      3: PetscErrorCode PetscDeviceContextCreate_CUDA(PetscDeviceContext dctx)
      4: {
      5:   static const Petsc::CUPMContextCuda  contextCuda;
      6:   PetscDeviceContext_(CUDA)           *dci;
      7:   PetscErrorCode                       ierr;

     10:   PetscNew(&dci);
     11:   dctx->data = static_cast<void*>(dci);
     12:   PetscMemcpy(dctx->ops,&contextCuda.ops,sizeof(contextCuda.ops));
     13:   return(0);
     14: }