xref: /libCEED/rust/libceed-sys/c-src/backends/hip-gen/ceed-hip-gen.h (revision 74398b5adbecd200ffa32cb282fd0f9b2ec0d708)
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
7509d4af6SJeremy L Thompson #pragma once
83d576824SJeremy L Thompson 
949aac155SJeremy L Thompson #include <ceed.h>
10ec3da8bcSJed Brown #include <ceed/backend.h>
1149aac155SJeremy L Thompson #include <ceed/jit-source/hip/hip-types.h>
123d576824SJeremy L Thompson #include <hip/hip_runtime.h>
132b730f8bSJeremy L Thompson 
147d8d0e25Snbeams typedef struct {
158d12f40eSJeremy L Thompson   bool          use_fallback;
167d8d0e25Snbeams   CeedInt       dim;
17*74398b5aSJeremy L Thompson   CeedInt       Q, Q_1d;
189e201c85SYohann   CeedInt       max_P_1d;
197d8d0e25Snbeams   hipModule_t   module;
207d8d0e25Snbeams   hipFunction_t op;
219e201c85SYohann   FieldsInt_Hip indices;
229e201c85SYohann   Fields_Hip    fields;
239e201c85SYohann   Fields_Hip    B;
249e201c85SYohann   Fields_Hip    G;
257d8d0e25Snbeams   CeedScalar   *W;
263a2968d6SJeremy L Thompson   Points_Hip    points;
277d8d0e25Snbeams } CeedOperator_Hip_gen;
287d8d0e25Snbeams 
297d8d0e25Snbeams typedef struct {
3009095acaSJeremy L Thompson   const char *qfunction_name;
317d8d0e25Snbeams   void       *d_c;
327d8d0e25Snbeams } CeedQFunction_Hip_gen;
337d8d0e25Snbeams 
347d8d0e25Snbeams CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf);
357d8d0e25Snbeams 
367d8d0e25Snbeams CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op);
37