1*3d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 2*3d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 3241a4b83SYohann // 4*3d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 5241a4b83SYohann // 6*3d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 77df94212SJeremy L Thompson 83d576824SJeremy L Thompson #ifndef _ceed_cuda_gen_h 93d576824SJeremy L Thompson #define _ceed_cuda_gen_h 103d576824SJeremy L Thompson 11ec3da8bcSJed Brown #include <ceed/ceed.h> 12ec3da8bcSJed Brown #include <ceed/backend.h> 13241a4b83SYohann #include <cuda.h> 147fcac036SJeremy L Thompson #include "../cuda/ceed-cuda-common.h" 15241a4b83SYohann 16bf4cb664SJeremy L Thompson typedef struct { const CeedScalar *in[CEED_FIELD_MAX]; CeedScalar *out[CEED_FIELD_MAX]; } CudaFields; 17bf4cb664SJeremy L Thompson typedef struct { CeedInt *in[CEED_FIELD_MAX]; CeedInt *out[CEED_FIELD_MAX]; } CudaFieldsInt; 18241a4b83SYohann 19241a4b83SYohann typedef struct { 20241a4b83SYohann CeedInt dim; 21241a4b83SYohann CeedInt Q1d; 2218d499f1SYohann CeedInt maxP1d; 23241a4b83SYohann CUmodule module; 24241a4b83SYohann CUfunction op; 25241a4b83SYohann CudaFieldsInt indices; 26241a4b83SYohann CudaFields fields; 27241a4b83SYohann CudaFields B; 28241a4b83SYohann CudaFields G; 29241a4b83SYohann CeedScalar *W; 30241a4b83SYohann } CeedOperator_Cuda_gen; 31241a4b83SYohann 32241a4b83SYohann typedef struct { 33241a4b83SYohann char *qFunctionName; 34241a4b83SYohann char *qFunctionSource; 35241a4b83SYohann void *d_c; 36241a4b83SYohann } CeedQFunction_Cuda_gen; 37241a4b83SYohann 38241a4b83SYohann CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf); 39241a4b83SYohann 40241a4b83SYohann CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op); 41241a4b83SYohann 42241a4b83SYohann CEED_INTERN int CeedCompositeOperatorCreate_Cuda_gen(CeedOperator op); 433d576824SJeremy L Thompson 443d576824SJeremy L Thompson #endif // _ceed_cuda_gen_h 45