xref: /libCEED/backends/hip-gen/ceed-hip-gen.h (revision 4fee36f0a30516a0b5ad51bf7eb3b32d83efd623)
1 // Copyright (c) 2017-2022, 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 
8 #ifndef _ceed_hip_gen_h
9 #define _ceed_hip_gen_h
10 
11 #include <ceed/backend.h>
12 #include <ceed/ceed.h>
13 #include <hip/hip_runtime.h>
14 
15 #include "../hip/ceed-hip-common.h"
16 
17 typedef struct {
18   CeedInt       dim;
19   CeedInt       Q_1d;
20   CeedInt       max_P_1d;
21   hipModule_t   module;
22   hipFunction_t op;
23   FieldsInt_Hip indices;
24   Fields_Hip    fields;
25   Fields_Hip    B;
26   Fields_Hip    G;
27   CeedScalar   *W;
28 } CeedOperator_Hip_gen;
29 
30 typedef struct {
31   char *q_function_name;
32   char *q_function_source;
33   void *d_c;
34 } CeedQFunction_Hip_gen;
35 
36 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf);
37 
38 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op);
39 
40 #endif  // _ceed_hip_gen_h
41