xref: /libCEED/backends/hip-gen/ceed-hip-gen.h (revision 3e551a327d6c97f9de071b988b42ffdb7bed19a7)
1 // Copyright (c) 2017-2024, 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   CeedInt       dim;
16   CeedInt       Q_1d;
17   CeedInt       max_P_1d;
18   hipModule_t   module;
19   hipFunction_t op;
20   FieldsInt_Hip indices;
21   Fields_Hip    fields;
22   Fields_Hip    B;
23   Fields_Hip    G;
24   CeedScalar   *W;
25 } CeedOperator_Hip_gen;
26 
27 typedef struct {
28   const char *qfunction_name;
29   void       *d_c;
30 } CeedQFunction_Hip_gen;
31 
32 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf);
33 
34 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op);
35