xref: /libCEED/rust/libceed-sys/c-src/backends/hip-shared/ceed-hip-shared.h (revision 9e201c85545dd39529c090846df629a32c15659b)
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 
11ec3da8bcSJed Brown #include <ceed/ceed.h>
12ec3da8bcSJed Brown #include <ceed/backend.h>
133d576824SJeremy L Thompson #include <hip/hip_runtime.h>
147fcac036SJeremy L Thompson #include "../hip/ceed-hip-common.h"
157d8d0e25Snbeams 
167d8d0e25Snbeams typedef struct {
177d8d0e25Snbeams   hipModule_t module;
18437930d1SJeremy L Thompson   hipFunction_t Interp;
19*9e201c85SYohann   hipFunction_t InterpTranspose;
20437930d1SJeremy L Thompson   hipFunction_t Grad;
21*9e201c85SYohann   hipFunction_t GradTranspose;
22437930d1SJeremy L Thompson   hipFunction_t Weight;
23437930d1SJeremy L Thompson   CeedInt block_sizes[3]; // interp, grad, weight thread block sizes
24437930d1SJeremy L Thompson   CeedScalar *d_interp_1d;
25437930d1SJeremy L Thompson   CeedScalar *d_grad_1d;
26437930d1SJeremy L Thompson   CeedScalar *d_collo_grad_1d;
27437930d1SJeremy L Thompson   CeedScalar *d_q_weight_1d;
287d8d0e25Snbeams } CeedBasis_Hip_shared;
297d8d0e25Snbeams 
307d8d0e25Snbeams CEED_INTERN int CeedBasisCreateTensorH1_Hip_shared(CeedInt dim, CeedInt P1d,
317d8d0e25Snbeams     CeedInt Q1d, const CeedScalar *interp1d, const CeedScalar *grad1d,
327d8d0e25Snbeams     const CeedScalar *qref1d, const CeedScalar *qweight1d, CeedBasis basis);
33526015bcSnbeams 
343d576824SJeremy L Thompson #endif // _ceed_hip_shared_h
35