DPC++ Runtime
Runtime libraries for oneAPI DPC++
|
|
Go to the documentation of this file.
16 #include <type_traits>
20 #ifdef __SYCL_DEVICE_ONLY__
21 #define SYCL_ESIMD_KERNEL __attribute__((sycl_explicit_simd))
22 #define SYCL_ESIMD_FUNCTION __attribute__((sycl_explicit_simd))
25 #define ESIMD_NODEBUG __attribute__((nodebug))
29 #define ESIMD_PRIVATE \
30 __attribute__((opencl_private)) __attribute__((sycl_explicit_simd))
32 #define ESIMD_REGISTER(n) __attribute__((register_num(n)))
34 #define __ESIMD_API ESIMD_NODEBUG ESIMD_INLINE
36 #define __ESIMD_UNSUPPORTED_ON_HOST
38 #else // __SYCL_DEVICE_ONLY__
39 #define SYCL_ESIMD_KERNEL
40 #define SYCL_ESIMD_FUNCTION
46 #define ESIMD_PRIVATE thread_local
47 #define ESIMD_REGISTER(n)
49 #define __ESIMD_API ESIMD_INLINE
51 #define __ESIMD_UNSUPPORTED_ON_HOST \
52 throw sycl::exception(sycl::errc::feature_not_supported, \
53 "This ESIMD feature is not supported on HOST")
55 #endif // __SYCL_DEVICE_ONLY__
58 #define ESIMD_NOINLINE __attribute__((noinline))
61 #define ESIMD_INLINE inline __attribute__((always_inline))
64 #define __ESIMD_NS sycl::ext::intel::esimd
65 #define __ESIMD_DNS sycl::ext::intel::esimd::detail
66 #define __ESIMD_EMU_DNS sycl::ext::intel::esimd::emu::detail
68 #define __ESIMD_QUOTE1(m) #m
69 #define __ESIMD_QUOTE(m) __ESIMD_QUOTE1(m)
70 #define __ESIMD_NS_QUOTED __ESIMD_QUOTE(__ESIMD_NS)
71 #define __ESIMD_DEPRECATED(new_api) \
72 __SYCL_DEPRECATED("use " __ESIMD_NS_QUOTED "::" __ESIMD_QUOTE(new_api))
77 namespace __ESIMD_NS {
108 template <rgba_channel Ch>
109 static inline constexpr uint8_t
ch = 1 <<
static_cast<int>(Ch);
110 static inline constexpr uint8_t
chR = ch<rgba_channel::R>;
111 static inline constexpr uint8_t
chG = ch<rgba_channel::G>;
112 static inline constexpr uint8_t
chB = ch<rgba_channel::B>;
113 static inline constexpr uint8_t
chA = ch<rgba_channel::A>;
142 int Pos =
static_cast<int>(Ch);
143 return (
static_cast<int>(M) & (1 << Pos)) >> Pos;
atomic_op
Represents an atomic operation.
@ minsint
Minimum (signed integer): *addr = min(*addr, src0).
rgba_channel_mask
Represents a pixel's channel mask - all possible combinations of enabled channels.
@ xchg
Exchange. *addr == src0;
std::bit_xor< T > bit_xor
This type tag represents "saturation off" behavior.
void add(const void *DeviceGlobalPtr, const char *UniqueId)
static constexpr uint8_t ch
static constexpr uint8_t chR
static constexpr saturation_on_tag saturation_on
Type tag object representing "saturation on" behavior.
Gen hardware supports applying saturation to results of certain operations.
static constexpr uint8_t chG
simd< _Tp, _Abi > max(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
@ maxsint
Maximum (signed integer): *addr = max(*addr, src0).
unsigned int SurfaceIndex
Surface index type.
constexpr int get_num_channels_enabled(rgba_channel_mask M)
static constexpr uint8_t chA
static constexpr SurfaceIndex INVALID_BTI
detail::enable_if_t< detail::is_genfloat< T >::value, T > fmax(T x, T y) __NOEXC
detail::enable_if_t< detail::is_genfloat< T >::value, T > fmin(T x, T y) __NOEXC
static constexpr saturation_off_tag saturation_off
Type tag object representing "saturation off" behavior.
We provide new interfaces for matrix muliply in this patch:
std::bit_and< T > bit_and
@ predec
Decrement: *addr = *addr - 1.
@ fcmpwr
Compare and exchange (floating point).
@ sub
Subtraction: *addr = *addr - src0.
@ cmpxchg
Compare and exchange. if (*addr == src0) *sddr = src1;
static constexpr SurfaceIndex SLM_BTI
constexpr stream_manipulator dec
rgba_channel
Represents a pixel's channel.
static constexpr uint8_t chB
@ inc
Increment: *addr = *addr + 1.
constexpr int is_channel_enabled(rgba_channel_mask M, rgba_channel Ch)
simd< _Tp, _Abi > min(const simd< _Tp, _Abi > &, const simd< _Tp, _Abi > &) noexcept
#define __SYCL_INLINE_NAMESPACE(X)