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 CudaFields fields; 31 CudaFields B; 32 CudaFields G; 33 CeedScalar *W; 34 } CeedOperator_Cuda_gen; 35 36 typedef struct { 37 char *qFunctionName; 38 char *qFunctionSource; 39 void *d_c; 40 } CeedQFunction_Cuda_gen; 41 42 typedef struct { 43 } Ceed_Cuda_gen; 44 45 CEED_INTERN int CeedQFunctionCreate_Cuda_gen(CeedQFunction qf); 46 47 CEED_INTERN int CeedOperatorCreate_Cuda_gen(CeedOperator op); 48 49 CEED_INTERN int CeedCompositeOperatorCreate_Cuda_gen(CeedOperator op); 50