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_hip_gen_h 9 #define _ceed_hip_gen_h 10 11 #include <ceed/ceed.h> 12 #include <ceed/backend.h> 13 #include <hip/hip_runtime.h> 14 #include "../hip/ceed-hip-common.h" 15 16 typedef struct { const CeedScalar *in[CEED_FIELD_MAX]; CeedScalar *out[CEED_FIELD_MAX]; } HipFields; 17 typedef struct { CeedInt *in[CEED_FIELD_MAX]; CeedInt *out[CEED_FIELD_MAX]; } HipFieldsInt; 18 19 typedef struct { 20 CeedInt dim; 21 CeedInt Q1d; 22 CeedInt maxP1d; 23 hipModule_t module; 24 hipFunction_t op; 25 HipFieldsInt indices; 26 HipFields fields; 27 HipFields B; 28 HipFields G; 29 CeedScalar *W; 30 } CeedOperator_Hip_gen; 31 32 typedef struct { 33 char *qFunctionName; 34 char *qFunctionSource; 35 void *d_c; 36 } CeedQFunction_Hip_gen; 37 38 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf); 39 40 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op); 41 42 #endif // _ceed_hip_gen_h 43