xref: /libCEED/backends/sycl/ceed-sycl-compile.hpp (revision ca94c3ddc8f82b7d93a79f9e4812e99b8be840ff)
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_SYCL_COMPILE_HPP
9 #define CEED_SYCL_COMPILE_HPP
10 
11 #include <ceed/backend.h>
12 #include <ceed/ceed.h>
13 
14 #include <map>
15 #include <sycl/sycl.hpp>
16 
17 using SyclModule_t = sycl::kernel_bundle<sycl::bundle_state::executable>;
18 
19 CEED_INTERN int CeedBuildModule_Sycl(Ceed ceed, const std::string &kernel_source, SyclModule_t **sycl_module,
20                                      const std::map<std::string, CeedInt> &constants = {});
21 CEED_INTERN int CeedGetKernel_Sycl(Ceed ceed, const SyclModule_t *sycl_module, const std::string &kernel_name, sycl::kernel **sycl_kernel);
22 
23 CEED_INTERN int CeedRunKernelDimSharedSycl(Ceed ceed, sycl::kernel *kernel, const int grid_size, const int block_size_x, const int block_size_y,
24                                            const int block_size_z, const int shared_mem_size, void **args);
25 
26 #endif  // CEED_SYCL_COMPILE_HPP
27