xref: /libCEED/rust/libceed-sys/c-src/backends/hip-gen/ceed-hip-gen.h (revision 7d8d0e25636a94a27ff75b3dec09737e24cdb0fe) !
1 // Copyright (c) 2017-2018, Lawrence Livermore National Security, LLC.
2 // Produced at the Lawrence Livermore National Laboratory. LLNL-CODE-734707.
3 // All Rights reserved. See files LICENSE and NOTICE for details.
4 //
5 // This file is part of CEED, a collection of benchmarks, miniapps, software
6 // libraries and APIs for efficient high-order finite element and spectral
7 // element discretizations for exascale applications. For more information and
8 // source code availability see http://github.com/ceed.
9 //
10 // The CEED research is supported by the Exascale Computing Project 17-SC-20-SC,
11 // a collaborative effort of two U.S. Department of Energy organizations (Office
12 // of Science and the National Nuclear Security Administration) responsible for
13 // the planning and preparation of a capable exascale ecosystem, including
14 // software, applications, hardware, advanced system engineering and early
15 // testbed platforms, in support of the nation's exascale computing imperative.
16 
17 #include "../hip/ceed-hip.h"
18 
19 typedef struct { const CeedScalar *in[16]; CeedScalar *out[16]; } HipFields;
20 typedef struct { CeedInt *in[16]; CeedInt *out[16]; } HipFieldsInt;
21 
22 typedef struct {
23   CeedInt dim;
24   CeedInt Q1d;
25   CeedInt maxP1d;
26   hipModule_t module;
27   hipFunction_t op;
28   HipFieldsInt indices;
29   HipFields fields;
30   HipFields B;
31   HipFields G;
32   CeedScalar *W;
33 } CeedOperator_Hip_gen;
34 
35 typedef struct {
36   char *qFunctionName;
37   char *qFunctionSource;
38   void *d_c;
39 } CeedQFunction_Hip_gen;
40 
41 typedef struct {
42   Ceed_Hip base;
43 } Ceed_Hip_gen;
44 
45 CEED_INTERN int CeedQFunctionCreate_Hip_gen(CeedQFunction qf);
46 
47 CEED_INTERN int CeedOperatorCreate_Hip_gen(CeedOperator op);
48 
49 CEED_INTERN int CeedCompositeOperatorCreate_Hip_gen(CeedOperator op);
50