xref: /libCEED/rust/libceed-sys/c-src/backends/cuda-shared/ceed-cuda-shared.h (revision 9e201c85545dd39529c090846df629a32c15659b)
13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3c532df63SYohann //
43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause
5c532df63SYohann //
63d8e8822SJeremy L Thompson // This file is part of CEED:  http://github.com/ceed
73d576824SJeremy L Thompson 
83d576824SJeremy L Thompson #ifndef _ceed_cuda_shared_h
93d576824SJeremy L Thompson #define _ceed_cuda_shared_h
103d576824SJeremy L Thompson 
11ec3da8bcSJed Brown #include <ceed/ceed.h>
12ec3da8bcSJed Brown #include <ceed/backend.h>
13c532df63SYohann #include <cuda.h>
147fcac036SJeremy L Thompson #include "../cuda/ceed-cuda-common.h"
15c532df63SYohann 
16c532df63SYohann typedef struct {
17c532df63SYohann   CUmodule module;
18437930d1SJeremy L Thompson   CUfunction Interp;
19*9e201c85SYohann   CUfunction InterpTranspose;
20437930d1SJeremy L Thompson   CUfunction Grad;
21*9e201c85SYohann   CUfunction GradTranspose;
22437930d1SJeremy L Thompson   CUfunction Weight;
23437930d1SJeremy L Thompson   CeedScalar *d_interp_1d;
24437930d1SJeremy L Thompson   CeedScalar *d_grad_1d;
25437930d1SJeremy L Thompson   CeedScalar *d_collo_grad_1d;
26437930d1SJeremy L Thompson   CeedScalar *d_q_weight_1d;
27c532df63SYohann   CeedScalar *c_B;
28c532df63SYohann   CeedScalar *c_G;
29c532df63SYohann } CeedBasis_Cuda_shared;
30c532df63SYohann 
31437930d1SJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Cuda_shared(CeedInt dim, CeedInt P_1d,
32437930d1SJeremy L Thompson     CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
33437930d1SJeremy L Thompson     const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
343d576824SJeremy L Thompson 
353d576824SJeremy L Thompson #endif // _ceed_cuda_shared_h
36