mirror of
https://github.com/Kitware/CMake.git
synced 2026-11-06 13:27:09 +00:00
Add experimental support for SYCL under an experimental gate. The IntelLLVM and Adaptivecpp compilers are recognized, as well as upstream Clang with libsycl support. Fixes: #27219, #27905
17 lines
440 B
C++
17 lines
440 B
C++
#pragma once
|
|
|
|
#include <sycl/sycl.hpp>
|
|
|
|
// Upstream libsycl supports the attribute without defining SYCL_EXTERNAL.
|
|
#ifndef SYCL_EXTERNAL
|
|
# if __has_cpp_attribute(clang::sycl_external)
|
|
# define SYCL_EXTERNAL [[clang::sycl_external]]
|
|
# else
|
|
# error "The SYCL implementation does not support external device functions"
|
|
# endif
|
|
#endif
|
|
|
|
SYCL_EXTERNAL int device_value(int value);
|
|
SYCL_EXTERNAL int device_offset();
|
|
int launch_kernel();
|