xref: /libCEED/rust/libceed-sys/c-src/backends/cuda-gen/ceed-cuda-gen.h (revision 8b97b69a34af3dd9e1bc9b8fd8651212448dc9ec)
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   CeedInt        dim;
16   CeedInt        Q_1d;
17   CeedInt        max_P_1d;
18   CUmodule       module;
19   CUfunction     op;
20   FieldsInt_Cuda indices;
21   Fields_Cuda    fields;
22   Fields_Cuda    B;
23   Fields_Cuda    G;
24   CeedScalar    *W;
25   Points_Cuda    points;
26 } CeedOperator_Cuda_gen;
27 
28 typedef struct {
29   const char *qfunction_name;
30   void       *d_c;
31 } CeedQFunction_Cuda_gen;
32 
33 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf);
34 
35 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op);
36