13d8e8822SJeremy L Thompson // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors. 23d8e8822SJeremy L Thompson // All Rights Reserved. See the top-level LICENSE and NOTICE files for details. 37d8d0e25Snbeams // 43d8e8822SJeremy L Thompson // SPDX-License-Identifier: BSD-2-Clause 57d8d0e25Snbeams // 63d8e8822SJeremy L Thompson // This file is part of CEED: http://github.com/ceed 77d8d0e25Snbeams 8*94b7b29bSJeremy L Thompson #ifndef CEED_HIP_GEN_H 9*94b7b29bSJeremy L Thompson #define CEED_HIP_GEN_H 103d576824SJeremy L Thompson 1149aac155SJeremy L Thompson #include <ceed.h> 12ec3da8bcSJed Brown #include <ceed/backend.h> 1349aac155SJeremy L Thompson #include <ceed/jit-source/hip/hip-types.h> 143d576824SJeremy L Thompson #include <hip/hip_runtime.h> 152b730f8bSJeremy L Thompson 167d8d0e25Snbeams typedef struct { 177d8d0e25Snbeams CeedInt dim; 189e201c85SYohann CeedInt Q_1d; 199e201c85SYohann CeedInt max_P_1d; 207d8d0e25Snbeams hipModule_t module; 217d8d0e25Snbeams hipFunction_t op; 229e201c85SYohann FieldsInt_Hip indices; 239e201c85SYohann Fields_Hip fields; 249e201c85SYohann Fields_Hip B; 259e201c85SYohann Fields_Hip G; 267d8d0e25Snbeams CeedScalar *W; 277d8d0e25Snbeams } CeedOperator_Hip_gen; 287d8d0e25Snbeams 297d8d0e25Snbeams typedef struct { 309e201c85SYohann char *q_function_name; 319e201c85SYohann char *q_function_source; 327d8d0e25Snbeams void *d_c; 337d8d0e25Snbeams } CeedQFunction_Hip_gen; 347d8d0e25Snbeams 357d8d0e25Snbeams CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf); 367d8d0e25Snbeams 377d8d0e25Snbeams CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op); 387d8d0e25Snbeams 39*94b7b29bSJeremy L Thompson #endif // CEED_HIP_GEN_H 40