xref: /libCEED/backends/cuda-gen/ceed-cuda-gen.h (revision 4ed2b27715919084fc6a9c0e6a05a1e8adc518b8)
1 // Copyright (c) 2017-2024, 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 #pragma once
8 
9 #include <ceed.h>
10 #include <ceed/backend.h>
11 #include <ceed/jit-source/cuda/cuda-types.h>
12 #include <cuda.h>
13 
14 typedef struct {
15   bool           use_fallback;
16   CeedInt        dim;
17   CeedInt        Q_1d;
18   CeedInt        max_P_1d;
19   CUmodule       module;
20   CUfunction     op;
21   FieldsInt_Cuda indices;
22   Fields_Cuda    fields;
23   Fields_Cuda    B;
24   Fields_Cuda    G;
25   CeedScalar    *W;
26   Points_Cuda    points;
27 } CeedOperator_Cuda_gen;
28 
29 typedef struct {
30   const char *qfunction_name;
31   void       *d_c;
32 } CeedQFunction_Cuda_gen;
33 
34 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf);
35 
36 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op);
37