xref: /libCEED/rust/libceed-sys/c-src/backends/hip-shared/ceed-hip-shared.h (revision 509d4af65d23546c690c9766d8b29e47dc3b3afb)
15aed82e4SJeremy L Thompson // Copyright (c) 2017-2024, 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
7*509d4af6SJeremy L Thompson #pragma once
83d576824SJeremy L Thompson 
949aac155SJeremy L Thompson #include <ceed.h>
10ec3da8bcSJed Brown #include <ceed/backend.h>
113d576824SJeremy L Thompson #include <hip/hip_runtime.h>
122b730f8bSJeremy L Thompson 
137d8d0e25Snbeams typedef struct {
147d8d0e25Snbeams   hipModule_t   module;
15437930d1SJeremy L Thompson   hipFunction_t Interp;
169e201c85SYohann   hipFunction_t InterpTranspose;
17437930d1SJeremy L Thompson   hipFunction_t Grad;
189e201c85SYohann   hipFunction_t GradTranspose;
19437930d1SJeremy L Thompson   hipFunction_t Weight;
20437930d1SJeremy L Thompson   CeedInt       block_sizes[3];  // interp, grad, weight thread block sizes
21437930d1SJeremy L Thompson   CeedScalar   *d_interp_1d;
22437930d1SJeremy L Thompson   CeedScalar   *d_grad_1d;
23437930d1SJeremy L Thompson   CeedScalar   *d_collo_grad_1d;
24437930d1SJeremy L Thompson   CeedScalar   *d_q_weight_1d;
257d8d0e25Snbeams } CeedBasis_Hip_shared;
267d8d0e25Snbeams 
276574a04fSJeremy L Thompson CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P_1d, CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
286574a04fSJeremy L Thompson                                                    const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
29