xref: /libCEED/backends/hip-gen/ceed-hip-gen.h (revision 6eb06d7cb0f5787c494a4969c0aa6769f3bcfbd0)
1 // Copyright (c) 2017-2025, Lawrence Livermore National Security, LLC and other CEED contributors.
2 // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3 //
4 // SPDX-License-Identifier: BSD-2-Clause
5 //
6 // This file is part of CEED:  http://github.com/ceed
7 #pragma once
8 
9 #include <ceed.h>
10 #include <ceed/backend.h>
11 #include <ceed/jit-source/hip/hip-types.h>
12 #include <hip/hip_runtime.h>
13 
14 typedef struct {
15   bool          use_fallback;
16   CeedInt       dim;
17   CeedInt       Q, Q_1d;
18   CeedInt       max_P_1d;
19   CeedInt       thread_1d;
20   hipModule_t   module;
21   hipFunction_t op;
22   FieldsInt_Hip indices;
23   Fields_Hip    fields;
24   Fields_Hip    B;
25   Fields_Hip    G;
26   CeedScalar   *W;
27   Points_Hip    points;
28 } CeedOperator_Hip_gen;
29 
30 typedef struct {
31   const char *qfunction_name;
32   void       *d_c;
33 } CeedQFunction_Hip_gen;
34 
35 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf);
36 
37 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op);
38