xref: /libCEED/rust/libceed-sys/c-src/backends/cuda-shared/ceed-cuda-shared.h (revision 437930d19388999b5cc2d76e2fe0d14f58fb41f3)
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.
163d576824SJeremy L Thompson 
173d576824SJeremy L Thompson #ifndef _ceed_cuda_shared_h
183d576824SJeremy L Thompson #define _ceed_cuda_shared_h
193d576824SJeremy L Thompson 
20ec3da8bcSJed Brown #include <ceed/ceed.h>
21ec3da8bcSJed Brown #include <ceed/backend.h>
22c532df63SYohann #include <cuda.h>
237fcac036SJeremy L Thompson #include "../cuda/ceed-cuda-common.h"
24c532df63SYohann 
25c532df63SYohann typedef struct {
26c532df63SYohann   CUmodule module;
27*437930d1SJeremy L Thompson   CUfunction Interp;
28*437930d1SJeremy L Thompson   CUfunction Grad;
29*437930d1SJeremy L Thompson   CUfunction Weight;
30*437930d1SJeremy L Thompson   CeedScalar *d_interp_1d;
31*437930d1SJeremy L Thompson   CeedScalar *d_grad_1d;
32*437930d1SJeremy L Thompson   CeedScalar *d_collo_grad_1d;
33*437930d1SJeremy L Thompson   CeedScalar *d_q_weight_1d;
34c532df63SYohann   CeedScalar *c_B;
35c532df63SYohann   CeedScalar *c_G;
36c532df63SYohann } CeedBasis_Cuda_shared;
37c532df63SYohann 
38*437930d1SJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Cuda_shared(CeedInt dim, CeedInt P_1d,
39*437930d1SJeremy L Thompson     CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
40*437930d1SJeremy L Thompson     const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
413d576824SJeremy L Thompson 
423d576824SJeremy L Thompson #endif // _ceed_cuda_shared_h
43