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_shared_h 9 #define _ceed_hip_shared_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 { 17 hipModule_t module; 18 hipFunction_t Interp; 19 hipFunction_t InterpTranspose; 20 hipFunction_t Grad; 21 hipFunction_t GradTranspose; 22 hipFunction_t Weight; 23 CeedInt block_sizes[3]; // interp, grad, weight thread block sizes 24 CeedScalar *d_interp_1d; 25 CeedScalar *d_grad_1d; 26 CeedScalar *d_collo_grad_1d; 27 CeedScalar *d_q_weight_1d; 28 } CeedBasis_Hip_shared; 29 30 CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P1d, 31 CeedInt Q1d, const CeedScalar *interp1d, const CeedScalar *grad1d, 32 const CeedScalar *qref1d, const CeedScalar *qweight1d, CeedBasis basis); 33 34 #endif // _ceed_hip_shared_h 35