xref: /libCEED/backends/cuda-gen/ceed-cuda-gen.h (revision f1c40530bc6f02bc6ca847af718b8b41cc3fd3ca)
1 // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3 //
4 // SPDX-License-Identifier: BSD-2-Clause
5 //
6 // This file is part of CEED:  http://github.com/ceed
7 
8 #ifndef _ceed_cuda_gen_h
9 #define _ceed_cuda_gen_h
10 
11 #include <ceed/ceed.h>
12 #include <ceed/backend.h>
13 #include <cuda.h>
14 #include "../cuda/ceed-cuda-common.h"
15 
16 typedef struct {
17   CeedInt dim;
18   CeedInt Q_1d;
19   CeedInt max_P_1d;
20   CUmodule module;
21   CUfunction op;
22   FieldsInt_Cuda indices;
23   Fields_Cuda fields;
24   Fields_Cuda B;
25   Fields_Cuda G;
26   CeedScalar *W;
27 } CeedOperator_Cuda_gen;
28 
29 typedef struct {
30   char *q_function_name;
31   char *q_function_source;
32   void *d_c;
33 } CeedQFunction_Cuda_gen;
34 
35 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf);
36 
37 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op);
38 
39 #endif // _ceed_cuda_gen_h
40