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 { const CeedScalar *in[CEED_FIELD_MAX]; CeedScalar *out[CEED_FIELD_MAX]; } CudaFields; 17 typedef struct { CeedInt *in[CEED_FIELD_MAX]; CeedInt *out[CEED_FIELD_MAX]; } CudaFieldsInt; 18 19 typedef struct { 20 CeedInt dim; 21 CeedInt Q1d; 22 CeedInt maxP1d; 23 CUmodule module; 24 CUfunction op; 25 CudaFieldsInt indices; 26 CudaFields fields; 27 CudaFields B; 28 CudaFields G; 29 CeedScalar *W; 30 } CeedOperator_Cuda_gen; 31 32 typedef struct { 33 char *qFunctionName; 34 char *qFunctionSource; 35 void *d_c; 36 } CeedQFunction_Cuda_gen; 37 38 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf); 39 40 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op); 41 42 CEED_INTERN int CeedCompositeOperatorCreate_Cuda_gen(CeedOperator op); 43 44 #endif // _ceed_cuda_gen_h 45