1 // Copyright (c) 2017-2024, 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.h> 12 #include <ceed/backend.h> 13 #include <ceed/jit-source/hip/hip-types.h> 14 #include <hip/hip_runtime.h> 15 16 typedef struct { 17 CeedInt dim; 18 CeedInt Q_1d; 19 CeedInt max_P_1d; 20 hipModule_t module; 21 hipFunction_t op; 22 FieldsInt_Hip indices; 23 Fields_Hip fields; 24 Fields_Hip B; 25 Fields_Hip G; 26 CeedScalar *W; 27 } CeedOperator_Hip_gen; 28 29 typedef struct { 30 const char *qfunction_name; 31 const char *qfunction_source; 32 void *d_c; 33 } CeedQFunction_Hip_gen; 34 35 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf); 36 37 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op); 38 39 #endif // CEED_HIP_GEN_H 40