xref: /libCEED/backends/cuda-gen/ceed-cuda-gen.h (revision 15910d16b955338d1102d4e730fc58bca8f202b9)
1 // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2 // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3 // All Rights reserved. See files LICENSE and NOTICE for details.
4 //
5 // This file is part of CEED, a collection of benchmarks, miniapps, software
6 // libraries and APIs for efficient high-order finite element and spectral
7 // element discretizations for exascale applications. For more information and
8 // source code availability see http://github.com/ceed.
9 //
10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11 // a collaborative effort of two U.S. Department of Energy organizations (Office
12 // of Science and the National Nuclear Security Administration) responsible for
13 // the planning and preparation of a capable exascale ecosystem, including
14 // software, applications, hardware, advanced system engineering and early
15 // testbed platforms, in support of the nation's exascale computing imperative.
16 #include <ceed-backend.h>
17 #include <ceed.h>
18 #include <cuda.h>
19 #include <cuda_runtime.h>
20 
21 typedef struct { const CeedScalar *in[16]; CeedScalar *out[16]; } CudaFields;
22 typedef struct { CeedInt *in[16]; CeedInt *out[16]; } CudaFieldsInt;
23 
24 typedef struct {
25   CeedInt dim;
26   CeedInt Q1d;
27   CUmodule module;
28   CUfunction op;
29   CudaFieldsInt indices;
30   CudaFieldsInt strides;
31   CudaFields fields;
32   CudaFields B;
33   CudaFields G;
34   CeedScalar *W;
35 } CeedOperator_Cuda_gen;
36 
37 typedef struct {
38   char *qFunctionName;
39   char *qFunctionSource;
40   void *d_c;
41 } CeedQFunction_Cuda_gen;
42 
43 typedef struct {
44 } Ceed_Cuda_gen;
45 
46 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf);
47 
48 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op);
49 
50 CEED_INTERN int CeedCompositeOperatorCreate_Cuda_gen(CeedOperator op);
51