@@ -317,57 +317,38 @@ bool SYCL_Compilation_Available() {
317317#endif
318318
319319#if SYCL_EXT_JIT_ENABLE
320-
321320#include " ../jit_compiler.hpp"
321+ #endif
322322
323323namespace sycl {
324324inline namespace _V1 {
325325namespace ext ::oneapi::experimental {
326326namespace detail {
327327
328328bool SYCLJIT_Compilation_Available () {
329+ #if SYCL_EXT_JIT_ENABLE
329330 return sycl::detail::jit_compiler::get_instance ().isAvailable ();
331+ #else
332+ return false ;
333+ #endif
330334}
331335
332- spirv_vec_t
333- SYCLJIT_to_SPIRV (const std::string &SYCLSource, include_pairs_t IncludePairs,
334- const std::vector<std::string> &UserArgs, std::string *LogPtr,
335- const std::vector<std::string> &RegisteredKernelNames) {
336+ spirv_vec_t SYCLJIT_to_SPIRV (
337+ [[maybe_unused]] const std::string &SYCLSource,
338+ [[maybe_unused]] include_pairs_t IncludePairs,
339+ [[maybe_unused]] const std::vector<std::string> &UserArgs,
340+ [[maybe_unused]] std::string *LogPtr,
341+ [[maybe_unused]] const std::vector<std::string> &RegisteredKernelNames) {
342+ #if SYCL_EXT_JIT_ENABLE
336343 return sycl::detail::jit_compiler::get_instance ().compileSYCL (
337344 SYCLSource, IncludePairs, UserArgs, LogPtr, RegisteredKernelNames);
338- }
339-
340- } // namespace detail
341- } // namespace ext::oneapi::experimental
342- } // namespace _V1
343- } // namespace sycl
344-
345345#else
346-
347- namespace sycl {
348- inline namespace _V1 {
349- namespace ext ::oneapi::experimental {
350- namespace detail {
351-
352- bool SYCLJIT_Compilation_Available () { return false ; }
353-
354- spirv_vec_t
355- SYCLJIT_to_SPIRV (const std::string &SYCLSource, include_pairs_t IncludePairs,
356- const std::vector<std::string> &UserArgs, std::string *LogPtr,
357- const std::vector<std::string> &RegisteredKernelNames) {
358- (void )SYCLSource;
359- (void )IncludePairs;
360- (void )UserArgs;
361- (void )LogPtr;
362- (void )RegisteredKernelNames;
363-
364346 throw sycl::exception (sycl::errc::build,
365347 " kernel_compiler via sycl-jit is not available" );
348+ #endif
366349}
367350
368351} // namespace detail
369352} // namespace ext::oneapi::experimental
370353} // namespace _V1
371354} // namespace sycl
372-
373- #endif // SYCL_EXT_JIT_ENABLE
0 commit comments