xref: /libCEED/rust/libceed-sys/c-src/backends/cuda-shared/ceed-cuda-shared.h (revision abfaacbbbdcce316a2b399b903fc00b311ddf605)
1c532df63SYohann // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2c532df63SYohann // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3c532df63SYohann // All Rights reserved. See files LICENSE and NOTICE for details.
4c532df63SYohann //
5c532df63SYohann // This file is part of CEED, a collection of benchmarks, miniapps, software
6c532df63SYohann // libraries and APIs for efficient high-order finite element and spectral
7c532df63SYohann // element discretizations for exascale applications. For more information and
8c532df63SYohann // source code availability see http://github.com/ceed.
9c532df63SYohann //
10c532df63SYohann // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11c532df63SYohann // a collaborative effort of two U.S. Department of Energy organizations (Office
12c532df63SYohann // of Science and the National Nuclear Security Administration) responsible for
13c532df63SYohann // the planning and preparation of a capable exascale ecosystem, including
14c532df63SYohann // software, applications, hardware, advanced system engineering and early
15c532df63SYohann // testbed platforms, in support of the nation's exascale computing imperative.
16c532df63SYohann #include <ceed-backend.h>
17c532df63SYohann #include <ceed.h>
18c532df63SYohann #include <nvrtc.h>
19c532df63SYohann #include <cuda.h>
20c532df63SYohann #include <cuda_runtime.h>
21*abfaacbbSSander Arens #include "../cuda/ceed-cuda.h"
22c532df63SYohann 
23c532df63SYohann typedef struct {
24c532df63SYohann   CUmodule module;
25c532df63SYohann   CUfunction interp;
26c532df63SYohann   CUfunction grad;
27c532df63SYohann   CUfunction weight;
28c532df63SYohann   CeedScalar *d_interp1d;
29c532df63SYohann   CeedScalar *d_grad1d;
30ac421f39SYohann   CeedScalar *d_collograd1d;
31c532df63SYohann   CeedScalar *d_qweight1d;
32c532df63SYohann   CeedScalar *c_B;
33c532df63SYohann   CeedScalar *c_G;
34c532df63SYohann } CeedBasis_Cuda_shared;
35c532df63SYohann 
36c532df63SYohann typedef struct {
37*abfaacbbSSander Arens   Ceed_Cuda base;
38c532df63SYohann } Ceed_Cuda_shared;
39c532df63SYohann 
40c532df63SYohann CEED_INTERN int CeedBasisCreateTensorH1_Cuda_shared(CeedInt dim, CeedInt P1d,
418795c945Sjeremylt     CeedInt Q1d, const CeedScalar *interp1d, const CeedScalar *grad1d,
428795c945Sjeremylt     const CeedScalar *qref1d, const CeedScalar *qweight1d, CeedBasis basis);
43