xref: /libCEED/backends/hip-shared/ceed-hip-shared.h (revision 94b7b29b41ad8a17add4c577886859ef16f89dec)
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
73d576824SJeremy L Thompson 
8*94b7b29bSJeremy L Thompson #ifndef CEED_HIP_SHARED_H
9*94b7b29bSJeremy L Thompson #define CEED_HIP_SHARED_H
103d576824SJeremy L Thompson 
1149aac155SJeremy L Thompson #include <ceed.h>
12ec3da8bcSJed Brown #include <ceed/backend.h>
133d576824SJeremy L Thompson #include <hip/hip_runtime.h>
142b730f8bSJeremy L Thompson 
157d8d0e25Snbeams typedef struct {
167d8d0e25Snbeams   hipModule_t   module;
17437930d1SJeremy L Thompson   hipFunction_t Interp;
189e201c85SYohann   hipFunction_t InterpTranspose;
19437930d1SJeremy L Thompson   hipFunction_t Grad;
209e201c85SYohann   hipFunction_t GradTranspose;
21437930d1SJeremy L Thompson   hipFunction_t Weight;
22437930d1SJeremy L Thompson   CeedInt       block_sizes[3];  // interp, grad, weight thread block sizes
23437930d1SJeremy L Thompson   CeedScalar   *d_interp_1d;
24437930d1SJeremy L Thompson   CeedScalar   *d_grad_1d;
25437930d1SJeremy L Thompson   CeedScalar   *d_collo_grad_1d;
26437930d1SJeremy L Thompson   CeedScalar   *d_q_weight_1d;
277d8d0e25Snbeams } CeedBasis_Hip_shared;
287d8d0e25Snbeams 
296574a04fSJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P_1d, CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
306574a04fSJeremy L Thompson                                                    const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
31526015bcSnbeams 
32*94b7b29bSJeremy L Thompson #endif  // CEED_HIP_SHARED_H
33