xref: /libCEED/rust/libceed-sys/c-src/backends/hip-shared/ceed-hip-shared.h (revision 49aac155e7a09736f56fb3abac0f57dab29f7cbf)
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 
11*49aac155SJeremy 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 
292b730f8bSJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P1d, CeedInt Q1d, const CeedScalar *interp1d, const CeedScalar *grad1d,
307d8d0e25Snbeams                                                    const CeedScalar *qref1d, const CeedScalar *qweight1d, CeedBasis basis);
31526015bcSnbeams 
323d576824SJeremy L Thompson #endif  // _ceed_hip_shared_h
33