xref: /libCEED/rust/libceed-sys/c-src/backends/sycl-shared/ceed-sycl-shared.hpp (revision 17b5e52fb5f6c474a1e9fc79dd3f8a824f1b6293)
1bd882c8aSJames Wright // Copyright (c) 2017-2022, Lawrence Livermore National Security, LLC and other CEED contributors.
2bd882c8aSJames Wright // All Rights Reserved. See the top-level LICENSE and NOTICE files for details.
3bd882c8aSJames Wright //
4bd882c8aSJames Wright // SPDX-License-Identifier: BSD-2-Clause
5bd882c8aSJames Wright //
6bd882c8aSJames Wright // This file is part of CEED:  http://github.com/ceed
7bd882c8aSJames Wright 
8*17b5e52fSSebastian Grimberg #ifndef CEED_SYCL_SHARED_HPP
9*17b5e52fSSebastian Grimberg #define CEED_SYCL_SHARED_HPP
10bd882c8aSJames Wright 
11bd882c8aSJames Wright #include <ceed/backend.h>
12bd882c8aSJames Wright #include <ceed/ceed.h>
13bd882c8aSJames Wright 
14bd882c8aSJames Wright #include <sycl/sycl.hpp>
15bd882c8aSJames Wright 
16bd882c8aSJames Wright #include "../sycl/ceed-sycl-common.hpp"
17bd882c8aSJames Wright #include "../sycl/ceed-sycl-compile.hpp"
18bd882c8aSJames Wright 
19bd882c8aSJames Wright typedef struct {
20bd882c8aSJames Wright   CeedInt       interp_local_range[3];
21bd882c8aSJames Wright   CeedInt       grad_local_range[3];
22bd882c8aSJames Wright   CeedInt       weight_local_range[3];
23bd882c8aSJames Wright   SyclModule_t *sycl_module;
24bd882c8aSJames Wright   sycl::kernel *interp_kernel;
25bd882c8aSJames Wright   sycl::kernel *interp_transpose_kernel;
26bd882c8aSJames Wright   sycl::kernel *grad_kernel;
27bd882c8aSJames Wright   sycl::kernel *grad_transpose_kernel;
28bd882c8aSJames Wright   sycl::kernel *weight_kernel;
29bd882c8aSJames Wright   CeedScalar   *d_interp_1d;
30bd882c8aSJames Wright   CeedScalar   *d_grad_1d;
31bd882c8aSJames Wright   CeedScalar   *d_collo_grad_1d;  // eliminate
32bd882c8aSJames Wright   CeedScalar   *d_q_weight_1d;
33bd882c8aSJames Wright } CeedBasis_Sycl_shared;
34bd882c8aSJames Wright 
35bd882c8aSJames Wright CEED_INTERN int CeedBasisCreateTensorH1_Sycl_shared(CeedInt dim, CeedInt P_1d, CeedInt Q_1d, const CeedScalar *interp_1d, const CeedScalar *grad_1d,
36bd882c8aSJames Wright                                                     const CeedScalar *q_ref_1d, const CeedScalar *q_weight_1d, CeedBasis basis);
37bd882c8aSJames Wright 
38*17b5e52fSSebastian Grimberg #endif  // CEED_SYCL_SHARED_HPP
39