xref: /libCEED/rust/libceed-sys/c-src/backends/hip-shared/ceed-hip-shared.h (revision 6574a04ff2135c3834f1b6ef9a4ec7566c4782db)
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 
83d576824SJeremy L Thompson #ifndef _ceed_hip_shared_h
93d576824SJeremy 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 
29*6574a04fSJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P_1d, CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
30*6574a04fSJeremy L Thompson                                                    const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
31526015bcSnbeams 
323d576824SJeremy L Thompson #endif  // _ceed_hip_shared_h
33