xref: /libCEED/rust/libceed-sys/c-src/backends/cuda-gen/ceed-cuda-gen.h (revision 6d997e5fad05ef70190d5e2facead3e1467860e4)
1 // Copyright (c) 2017-2025, 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, use_assembly_fallback;
16   CeedInt        dim;
17   CeedInt        Q, Q_1d;
18   CeedInt        max_P_1d;
19   CeedInt        thread_1d;
20   CUmodule       module, module_assemble_full, module_assemble_diagonal, module_assemble_qfunction;
21   CUfunction     op, assemble_full, assemble_diagonal, assemble_qfunction;
22   FieldsInt_Cuda indices;
23   Fields_Cuda    fields;
24   Fields_Cuda    B;
25   Fields_Cuda    G;
26   CeedScalar    *W;
27   Points_Cuda    points;
28 } CeedOperator_Cuda_gen;
29 
30 typedef struct {
31   const char *qfunction_name;
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