DPC++ Runtime
Runtime libraries for oneAPI DPC++
types.hpp File Reference
#include <sycl/detail/generic_type_traits.hpp>
#include <sycl/access/access.hpp>
#include <sycl/aliases.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/helpers.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/half_type.hpp>
#include <sycl/marray.hpp>
#include <sycl/multi_ptr.hpp>
#include <array>
#include <cmath>
#include <cstring>
#include <cfenv>
#include "swizzles.def"
Include dependency graph for types.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sycl::_V1::elem
 
struct  sycl::_V1::detail::vec_helper< T >
 
class  sycl::_V1::detail::GetOp< T >
 
class  sycl::_V1::detail::GetScalarOp< T >
 
struct  sycl::_V1::detail::EqualTo< T >
 
struct  sycl::_V1::detail::NotEqualTo< T >
 
struct  sycl::_V1::detail::GreaterEqualTo< T >
 
struct  sycl::_V1::detail::LessEqualTo< T >
 
struct  sycl::_V1::detail::GreaterThan< T >
 
struct  sycl::_V1::detail::LessThan< T >
 
struct  sycl::_V1::detail::LogicalAnd< T >
 
struct  sycl::_V1::detail::LogicalOr< T >
 
struct  sycl::_V1::detail::RShift< T >
 
struct  sycl::_V1::detail::LShift< T >
 
class  sycl::_V1::vec< Type, NumElements >
 Provides a cross-patform vector class template that works efficiently on SYCL devices as well as in host C++ code. More...
 
class  sycl::_V1::detail::SwizzleOp< VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes >
 
struct  sycl::_V1::is_device_copyable< T, typename >
 is_device_copyable is a user specializable class template to indicate that a type T is device copyable, which means that SYCL implementation may copy objects of the type T between host and device or between two devices. More...
 
struct  sycl::_V1::is_device_copyable< T, std::enable_if_t< std::is_trivially_copyable< T >::value > >
 
struct  sycl::_V1::is_device_copyable< std::tuple<> >
 
struct  sycl::_V1::is_device_copyable< std::tuple< T, Ts... > >
 
struct  sycl::_V1::is_device_copyable< sycl::marray< T, N >, std::enable_if_t< is_device_copyable< T >::value &&!std::is_trivially_copyable< T >::value > >
 
struct  sycl::_V1::detail::IsDeprecatedDeviceCopyable< T, typename >
 

Namespaces

 sycl
 ---— Error handling, matching OpenCL plugin semantics.
 
 sycl::_V1
 
 sycl::_V1::detail
 

Macros

#define __SYCL_ALIGNED_VAR(type, x, var)   alignas(x) type var
 
#define __SYCL_ALLOW_VECTOR_SIZES(num_elements)
 
#define __SYCL_ALLOW_VECTOR_TYPES(num_elements)
 
#define __SYCL_ACCESS_RETURN   this
 
#define __SYCL_BINOP(BINOP, OPASSIGN)
 
#define __SYCL_RELLOGOP(RELLOGOP)
 
#define __SYCL_UOP(UOP, OPASSIGN)
 
#define __SYCL_OPASSIGN(OPASSIGN, OP)
 
#define __SYCL_UOP(UOP, OPASSIGN)
 
#define __SYCL_ACCESS_RETURN   m_Vector
 
#define __SYCL_BINOP(BINOP)
 
#define __SYCL_RELLOGOP(RELLOGOP)
 
#define __SYCL_GET_CL_TYPE(target, num)   ::cl_##target##num
 
#define __SYCL_GET_SCALAR_CL_TYPE(target)   ::cl_##target
 
#define __SYCL_GET_CL_HALF_TYPE(target, num)   __##target##num##_vec_t
 
#define __SYCL_DECLARE_CONVERTER(base, num)
 
#define __SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, num)
 
#define __SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, num)
 
#define __SYCL_DECLARE_FLOAT_CONVERTER(base, num)
 
#define __SYCL_DECLARE_LONGLONG_CONVERTER(base, num)
 
#define __SYCL_DECLARE_SCHAR_CONVERTER(num)
 
#define __SYCL_DECLARE_BOOL_CONVERTER(num)
 
#define __SYCL_DECLARE_HALF_CONVERTER(base, num)
 
#define __SYCL_DECLARE_SCALAR_SCHAR_CONVERTER
 
#define __SYCL_DECLARE_SCALAR_BOOL_CONVERTER
 
#define __SYCL_DECLARE_SCALAR_CONVERTER(base)
 
#define __SYCL_DECLARE_VECTOR_CONVERTERS(base)
 
#define __SYCL_DECLARE_SIGNED_INTEGRAL_VECTOR_CONVERTERS(base)
 
#define __SYCL_DECLARE_UNSIGNED_INTEGRAL_VECTOR_CONVERTERS(base)
 
#define __SYCL_DECLARE_FLOAT_VECTOR_CONVERTERS(base)
 
#define __SYCL_DECLARE_HALF_VECTOR_CONVERTERS(base)
 
#define __SYCL_DECLARE_VECTOR_LONGLONG_CONVERTERS(base)
 
#define __SYCL_DECLARE_SCHAR_VECTOR_CONVERTERS
 
#define __SYCL_DECLARE_BOOL_VECTOR_CONVERTERS
 
#define SYCL_DEVICE_COPYABLE   1
 This macro must be defined to 1 when SYCL implementation allows user applications to explicitly declare certain class types as device copyable by adding specializations of is_device_copyable type trait class. More...
 

Typedefs

template<typename DataT >
using sycl::_V1::detail::rel_t = typename std::conditional_t< sizeof(DataT)==sizeof(cl_char), cl_char, typename std::conditional_t< sizeof(DataT)==sizeof(cl_short), cl_short, typename std::conditional_t< sizeof(DataT)==sizeof(cl_int), cl_int, typename std::conditional_t< sizeof(DataT)==sizeof(cl_long), cl_long, bool > >> >
 
template<typename T , typename R >
using sycl::_V1::detail::is_int_to_int = std::integral_constant< bool, std::is_integral< T >::value &&std::is_integral< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_sint_to_sint = std::integral_constant< bool, is_sigeninteger< T >::value &&is_sigeninteger< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_uint_to_uint = std::integral_constant< bool, is_sugeninteger< T >::value &&is_sugeninteger< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_sint_to_from_uint = std::integral_constant< bool,(is_sugeninteger< T >::value &&is_sigeninteger< R >::value)||(is_sigeninteger< T >::value &&is_sugeninteger< R >::value)>
 
template<typename T , typename R >
using sycl::_V1::detail::is_sint_to_float = std::integral_constant< bool, std::is_integral< T >::value &&!(std::is_unsigned< T >::value) &&detail::is_floating_point< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_uint_to_float = std::integral_constant< bool, std::is_unsigned< T >::value &&detail::is_floating_point< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_int_to_float = std::integral_constant< bool, std::is_integral< T >::value &&detail::is_floating_point< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_float_to_int = std::integral_constant< bool, detail::is_floating_point< T >::value &&std::is_integral< R >::value >
 
template<typename T , typename R >
using sycl::_V1::detail::is_float_to_float = std::integral_constant< bool, detail::is_floating_point< T >::value &&detail::is_floating_point< R >::value >
 
template<typename T >
using sycl::_V1::detail::is_standard_type = std::integral_constant< bool, detail::is_sgentype< T >::value >
 
template<typename T >
using sycl::_V1::vec_data = detail::vec_helper< T >
 
template<typename T >
using sycl::_V1::vec_data_t = typename detail::vec_helper< T >::RetType
 
using __half_t = sycl::detail::half_impl::StorageT
 
using __half2_vec_t = sycl::detail::half_impl::Vec2StorageT
 
using __half3_vec_t = sycl::detail::half_impl::Vec3StorageT
 
using __half4_vec_t = sycl::detail::half_impl::Vec4StorageT
 
using __half8_vec_t = sycl::detail::half_impl::Vec8StorageT
 
using __half16_vec_t = sycl::detail::half_impl::Vec16StorageT
 
template<typename T , typename T8 , typename T16 , typename T32 , typename T64 >
using sycl::_V1::detail::select_apply_cl_t = std::conditional_t< sizeof(T)==1, T8, std::conditional_t< sizeof(T)==2, T16, std::conditional_t< sizeof(T)==4, T32, T64 > >>
 

Enumerations

enum class  sycl::_V1::rounding_mode {
  sycl::_V1::automatic = 0 , sycl::_V1::rte = 1 , sycl::_V1::rtz = 2 , sycl::_V1::rtp = 3 ,
  sycl::_V1::rtn = 4
}
 

Functions

template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
std::enable_if_t< std::is_same< T, R >::value, R > sycl::_V1::detail::convertImpl (T Value)
 
template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
std::enable_if_t<!std::is_same< T, R >::value &&(is_int_to_int< T, R >::value||is_int_to_float< T, R >::value||is_float_to_float< T, R >::value), R > sycl::_V1::detail::convertImpl (T Value)
 
template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
std::enable_if_t< is_float_to_int< T, R >::value, R > sycl::_V1::detail::convertImpl (T Value)
 
template<typename T >
struct sycl::_V1::detail::__SYCL2020_DEPRECATED ("This type isn't device copyable in SYCL 2020") IsDeprecatedDeviceCopyable< T
 

Macro Definition Documentation

◆ __SYCL_ACCESS_RETURN [1/2]

#define __SYCL_ACCESS_RETURN   this

Definition at line 1867 of file types.hpp.

◆ __SYCL_ACCESS_RETURN [2/2]

#define __SYCL_ACCESS_RETURN   m_Vector

Definition at line 1867 of file types.hpp.

◆ __SYCL_ALIGNED_VAR

#define __SYCL_ALIGNED_VAR (   type,
  x,
  var 
)    alignas(x) type var

Definition at line 550 of file types.hpp.

◆ __SYCL_ALLOW_VECTOR_SIZES

#define __SYCL_ALLOW_VECTOR_SIZES (   num_elements)
Value:
template <int Counter, int MaxValue, typename DataT_, class... tail> \
struct SizeChecker<Counter, MaxValue, vec<DataT_, num_elements>, tail...> \
: std::conditional_t< \
Counter + (num_elements) <= MaxValue, \
SizeChecker<Counter + (num_elements), MaxValue, tail...>, \
std::false_type> {}; \
template <int Counter, int MaxValue, typename DataT_, typename T2, \
typename T3, template <typename> class T4, int... T5, \
class... tail> \
struct SizeChecker< \
Counter, MaxValue, \
detail::SwizzleOp<vec<DataT_, num_elements>, T2, T3, T4, T5...>, \
tail...> \
: std::conditional_t< \
Counter + sizeof...(T5) <= MaxValue, \
SizeChecker<Counter + sizeof...(T5), MaxValue, tail...>, \
std::false_type> {}; \
template <int Counter, int MaxValue, typename DataT_, typename T2, \
typename T3, template <typename> class T4, int... T5, \
class... tail> \
struct SizeChecker< \
Counter, MaxValue, \
detail::SwizzleOp<const vec<DataT_, num_elements>, T2, T3, T4, T5...>, \
tail...> \
: std::conditional_t< \
Counter + sizeof...(T5) <= MaxValue, \
SizeChecker<Counter + sizeof...(T5), MaxValue, tail...>, \
std::false_type> {};

◆ __SYCL_ALLOW_VECTOR_TYPES

#define __SYCL_ALLOW_VECTOR_TYPES (   num_elements)
Value:
template <typename DataT_> \
struct TypeChecker<vec<DataT_, num_elements>, DataT_> : std::true_type {}; \
template <typename DataT_, typename T2, typename T3, \
template <typename> class T4, int... T5> \
struct TypeChecker< \
detail::SwizzleOp<vec<DataT_, num_elements>, T2, T3, T4, T5...>, DataT_> \
: std::true_type {}; \
template <typename DataT_, typename T2, typename T3, \
template <typename> class T4, int... T5> \
struct TypeChecker< \
detail::SwizzleOp<const vec<DataT_, num_elements>, T2, T3, T4, T5...>, \
DataT_> : std::true_type {};

◆ __SYCL_BINOP [1/2]

#define __SYCL_BINOP (   BINOP)

Definition at line 1978 of file types.hpp.

◆ __SYCL_BINOP [2/2]

#define __SYCL_BINOP (   BINOP,
  OPASSIGN 
)
Value:
vec operator BINOP(const vec &Rhs) const { \
vec Ret; \
for (size_t I = 0; I < NumElements; ++I) { \
Ret.setValue(I, (getValue(I) BINOP Rhs.getValue(I))); \
} \
return Ret; \
} \
template <typename T> \
typename std::enable_if_t< \
std::is_convertible<DataT, T>::value && \
(std::is_fundamental<vec_data_t<T>>::value || \
std::is_same<typename std::remove_const_t<T>, half>::value), \
vec> \
operator BINOP(const T &Rhs) const { \
return *this BINOP vec(static_cast<const DataT &>(Rhs)); \
} \
vec &operator OPASSIGN(const vec &Rhs) { \
*this = *this BINOP Rhs; \
return *this; \
} \
template <int Num = NumElements> \
typename std::enable_if_t<Num != 1, vec &> operator OPASSIGN( \
const DataT &Rhs) { \
*this = *this BINOP vec(Rhs); \
return *this; \
}
sycl::detail::half_impl::half half
Definition: aliases.hpp:77

Definition at line 1978 of file types.hpp.

◆ __SYCL_DECLARE_BOOL_CONVERTER

#define __SYCL_DECLARE_BOOL_CONVERTER (   num)
Value:
template <> class BaseCLTypeConverter<bool, num> { \
public: \
using DataType = detail::select_apply_cl_t< \
bool, __SYCL_GET_CL_TYPE(char, num), __SYCL_GET_CL_TYPE(short, num), \
__SYCL_GET_CL_TYPE(int, num), __SYCL_GET_CL_TYPE(long, num)>; \
};
std::conditional_t< sizeof(T)==1, T8, std::conditional_t< sizeof(T)==2, T16, std::conditional_t< sizeof(T)==4, T32, T64 > >> select_apply_cl_t
Definition: types.hpp:2149
#define __SYCL_GET_CL_TYPE(target, num)
Definition: types.hpp:2128

Definition at line 2196 of file types.hpp.

◆ __SYCL_DECLARE_BOOL_VECTOR_CONVERTERS

#define __SYCL_DECLARE_BOOL_VECTOR_CONVERTERS
Value:
namespace detail { \
__SYCL_DECLARE_BOOL_CONVERTER(2) \
__SYCL_DECLARE_BOOL_CONVERTER(3) \
__SYCL_DECLARE_BOOL_CONVERTER(4) \
__SYCL_DECLARE_BOOL_CONVERTER(8) \
__SYCL_DECLARE_BOOL_CONVERTER(16) \
__SYCL_DECLARE_SCALAR_BOOL_CONVERTER \
}

Definition at line 2318 of file types.hpp.

◆ __SYCL_DECLARE_CONVERTER

#define __SYCL_DECLARE_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base, num> { \
public: \
using DataType = __SYCL_GET_CL_TYPE(base, num); \
};

Definition at line 2152 of file types.hpp.

◆ __SYCL_DECLARE_FLOAT_CONVERTER

#define __SYCL_DECLARE_FLOAT_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base, num> { \
public: \
using DataType = detail::select_apply_cl_t< \
base, std::false_type, __SYCL_GET_CL_HALF_TYPE(half, num), \
__SYCL_GET_CL_TYPE(float, num), __SYCL_GET_CL_TYPE(double, num)>; \
};
#define __SYCL_GET_CL_HALF_TYPE(target, num)
Definition: types.hpp:2138

Definition at line 2174 of file types.hpp.

◆ __SYCL_DECLARE_FLOAT_VECTOR_CONVERTERS

#define __SYCL_DECLARE_FLOAT_VECTOR_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_FLOAT_CONVERTER(base, 2) \
__SYCL_DECLARE_FLOAT_CONVERTER(base, 3) \
__SYCL_DECLARE_FLOAT_CONVERTER(base, 4) \
__SYCL_DECLARE_FLOAT_CONVERTER(base, 8) \
__SYCL_DECLARE_FLOAT_CONVERTER(base, 16) \
__SYCL_DECLARE_SCALAR_CONVERTER(base) \
}

Definition at line 2272 of file types.hpp.

◆ __SYCL_DECLARE_HALF_CONVERTER

#define __SYCL_DECLARE_HALF_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base, num> { \
public: \
using DataType = __SYCL_GET_CL_HALF_TYPE(base, num); \
};

Definition at line 2211 of file types.hpp.

◆ __SYCL_DECLARE_HALF_VECTOR_CONVERTERS

#define __SYCL_DECLARE_HALF_VECTOR_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_HALF_CONVERTER(base, 2) \
__SYCL_DECLARE_HALF_CONVERTER(base, 3) \
__SYCL_DECLARE_HALF_CONVERTER(base, 4) \
__SYCL_DECLARE_HALF_CONVERTER(base, 8) \
__SYCL_DECLARE_HALF_CONVERTER(base, 16) \
template <> class BaseCLTypeConverter<base, 1> { \
public: \
using DataType = __half_t; \
}; \
}
sycl::detail::half_impl::StorageT __half_t
Definition: types.hpp:2132

Definition at line 2282 of file types.hpp.

◆ __SYCL_DECLARE_LONGLONG_CONVERTER

#define __SYCL_DECLARE_LONGLONG_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base##long, num> { \
public: \
using DataType = __SYCL_GET_CL_TYPE(base, num); \
};

Definition at line 2182 of file types.hpp.

◆ __SYCL_DECLARE_SCALAR_BOOL_CONVERTER

#define __SYCL_DECLARE_SCALAR_BOOL_CONVERTER
Value:
template <> class BaseCLTypeConverter<bool, 1> { \
public: \
using DataType = bool; \
};

Definition at line 2223 of file types.hpp.

◆ __SYCL_DECLARE_SCALAR_CONVERTER

#define __SYCL_DECLARE_SCALAR_CONVERTER (   base)
Value:
template <> class BaseCLTypeConverter<base, 1> { \
public: \
using DataType = __SYCL_GET_SCALAR_CL_TYPE(base); \
};
#define __SYCL_GET_SCALAR_CL_TYPE(target)
Definition: types.hpp:2129

Definition at line 2236 of file types.hpp.

◆ __SYCL_DECLARE_SCALAR_SCHAR_CONVERTER

#define __SYCL_DECLARE_SCALAR_SCHAR_CONVERTER
Value:
template <> class BaseCLTypeConverter<schar, 1> { \
public: \
using DataType = schar; \
};
signed char schar
Definition: aliases.hpp:70

Definition at line 2217 of file types.hpp.

◆ __SYCL_DECLARE_SCHAR_CONVERTER

#define __SYCL_DECLARE_SCHAR_CONVERTER (   num)
Value:
template <> class BaseCLTypeConverter<schar, num> { \
public: \
using DataType = detail::select_apply_cl_t< \
schar, __SYCL_GET_CL_TYPE(char, num), __SYCL_GET_CL_TYPE(short, num), \
__SYCL_GET_CL_TYPE(int, num), __SYCL_GET_CL_TYPE(long, num)>; \
};

Definition at line 2188 of file types.hpp.

◆ __SYCL_DECLARE_SCHAR_VECTOR_CONVERTERS

#define __SYCL_DECLARE_SCHAR_VECTOR_CONVERTERS
Value:
namespace detail { \
__SYCL_DECLARE_SCHAR_CONVERTER(2) \
__SYCL_DECLARE_SCHAR_CONVERTER(3) \
__SYCL_DECLARE_SCHAR_CONVERTER(4) \
__SYCL_DECLARE_SCHAR_CONVERTER(8) \
__SYCL_DECLARE_SCHAR_CONVERTER(16) \
__SYCL_DECLARE_SCALAR_SCHAR_CONVERTER \
}

Definition at line 2308 of file types.hpp.

◆ __SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER

#define __SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base, num> { \
public: \
using DataType = detail::select_apply_cl_t< \
base, __SYCL_GET_CL_TYPE(char, num), __SYCL_GET_CL_TYPE(short, num), \
__SYCL_GET_CL_TYPE(int, num), __SYCL_GET_CL_TYPE(long, num)>; \
};

Definition at line 2158 of file types.hpp.

◆ __SYCL_DECLARE_SIGNED_INTEGRAL_VECTOR_CONVERTERS

#define __SYCL_DECLARE_SIGNED_INTEGRAL_VECTOR_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, 2) \
__SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, 3) \
__SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, 4) \
__SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, 8) \
__SYCL_DECLARE_SIGNED_INTEGRAL_CONVERTER(base, 16) \
__SYCL_DECLARE_SCALAR_CONVERTER(base) \
}

Definition at line 2252 of file types.hpp.

◆ __SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER

#define __SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER (   base,
  num 
)
Value:
template <> class BaseCLTypeConverter<base, num> { \
public: \
using DataType = detail::select_apply_cl_t< \
__SYCL_GET_CL_TYPE(uint, num), __SYCL_GET_CL_TYPE(ulong, num)>; \
};
unsigned int uint
Definition: aliases.hpp:73
unsigned char uchar
Definition: aliases.hpp:71
unsigned short ushort
Definition: aliases.hpp:72
unsigned long ulong
Definition: aliases.hpp:74

Definition at line 2166 of file types.hpp.

◆ __SYCL_DECLARE_UNSIGNED_INTEGRAL_VECTOR_CONVERTERS

#define __SYCL_DECLARE_UNSIGNED_INTEGRAL_VECTOR_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, 2) \
__SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, 3) \
__SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, 4) \
__SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, 8) \
__SYCL_DECLARE_UNSIGNED_INTEGRAL_CONVERTER(base, 16) \
__SYCL_DECLARE_SCALAR_CONVERTER(base) \
}

Definition at line 2262 of file types.hpp.

◆ __SYCL_DECLARE_VECTOR_CONVERTERS

#define __SYCL_DECLARE_VECTOR_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_CONVERTER(base, 2) \
__SYCL_DECLARE_CONVERTER(base, 3) \
__SYCL_DECLARE_CONVERTER(base, 4) \
__SYCL_DECLARE_CONVERTER(base, 8) \
__SYCL_DECLARE_CONVERTER(base, 16) \
__SYCL_DECLARE_SCALAR_CONVERTER(base) \
}

Definition at line 2242 of file types.hpp.

◆ __SYCL_DECLARE_VECTOR_LONGLONG_CONVERTERS

#define __SYCL_DECLARE_VECTOR_LONGLONG_CONVERTERS (   base)
Value:
namespace detail { \
__SYCL_DECLARE_LONGLONG_CONVERTER(base, 2) \
__SYCL_DECLARE_LONGLONG_CONVERTER(base, 3) \
__SYCL_DECLARE_LONGLONG_CONVERTER(base, 4) \
__SYCL_DECLARE_LONGLONG_CONVERTER(base, 8) \
__SYCL_DECLARE_LONGLONG_CONVERTER(base, 16) \
template <> class BaseCLTypeConverter<base##long, 1> { \
public: \
using DataType = base##long; \
}; \
}

Definition at line 2295 of file types.hpp.

◆ __SYCL_GET_CL_HALF_TYPE

#define __SYCL_GET_CL_HALF_TYPE (   target,
  num 
)    __##target##num##_vec_t

Definition at line 2138 of file types.hpp.

◆ __SYCL_GET_CL_TYPE

#define __SYCL_GET_CL_TYPE (   target,
  num 
)    ::cl_##target##num

Definition at line 2128 of file types.hpp.

◆ __SYCL_GET_SCALAR_CL_TYPE

#define __SYCL_GET_SCALAR_CL_TYPE (   target)    ::cl_##target

Definition at line 2129 of file types.hpp.

◆ __SYCL_OPASSIGN

#define __SYCL_OPASSIGN (   OPASSIGN,
  OP 
)
Value:
SwizzleOp &operator OPASSIGN(const DataT &Rhs) { \
operatorHelper<OP>(vec_t(Rhs)); \
return *this; \
} \
template <typename RhsOperation> \
SwizzleOp &operator OPASSIGN(const RhsOperation &Rhs) { \
operatorHelper<OP>(Rhs); \
return *this; \
}

Definition at line 1503 of file types.hpp.

◆ __SYCL_RELLOGOP [1/2]

#define __SYCL_RELLOGOP (   RELLOGOP)
Value:
vec<rel_t, NumElements> operator RELLOGOP(const vec &Rhs) const { \
vec<rel_t, NumElements> Ret; \
for (size_t I = 0; I < NumElements; ++I) { \
Ret.setValue(I, -(vec_data<DataT>::get(getValue(I)) \
RELLOGOP vec_data<DataT>::get(Rhs.getValue(I)))); \
} \
return Ret; \
} \
template <typename T> \
typename std::enable_if_t<std::is_convertible<T, DataT>::value && \
(std::is_fundamental<vec_data_t<T>>::value || \
std::is_same<T, half>::value), \
vec<rel_t, NumElements>> \
operator RELLOGOP(const T &Rhs) const { \
return *this RELLOGOP vec(static_cast<const DataT &>(Rhs)); \
}
constexpr tuple_element< I, tuple< Types... > >::type & get(sycl::detail::tuple< Types... > &Arg) noexcept
Definition: tuple.hpp:199

Definition at line 2032 of file types.hpp.

◆ __SYCL_RELLOGOP [2/2]

#define __SYCL_RELLOGOP (   RELLOGOP)

Definition at line 2032 of file types.hpp.

◆ __SYCL_UOP [1/2]

#define __SYCL_UOP (   UOP,
  OPASSIGN 
)
Value:
vec &operator UOP() { \
*this OPASSIGN vec_data<DataT>::get(1); \
return *this; \
} \
vec operator UOP(int) { \
vec Ret(*this); \
*this OPASSIGN vec_data<DataT>::get(1); \
return Ret; \
}

Definition at line 1529 of file types.hpp.

◆ __SYCL_UOP [2/2]

#define __SYCL_UOP (   UOP,
  OPASSIGN 
)
Value:
SwizzleOp &operator UOP() { \
*this OPASSIGN static_cast<DataT>(1); \
return *this; \
} \
vec_t operator UOP(int) { \
vec_t Ret = *this; \
*this OPASSIGN static_cast<DataT>(1); \
return Ret; \
}

Definition at line 1529 of file types.hpp.

◆ SYCL_DEVICE_COPYABLE

#define SYCL_DEVICE_COPYABLE   1

This macro must be defined to 1 when SYCL implementation allows user applications to explicitly declare certain class types as device copyable by adding specializations of is_device_copyable type trait class.

Definition at line 2380 of file types.hpp.

Typedef Documentation

◆ __half16_vec_t

using __half16_vec_t = sycl::detail::half_impl::Vec16StorageT

Definition at line 2137 of file types.hpp.

◆ __half2_vec_t

using __half2_vec_t = sycl::detail::half_impl::Vec2StorageT

Definition at line 2133 of file types.hpp.

◆ __half3_vec_t

using __half3_vec_t = sycl::detail::half_impl::Vec3StorageT

Definition at line 2134 of file types.hpp.

◆ __half4_vec_t

using __half4_vec_t = sycl::detail::half_impl::Vec4StorageT

Definition at line 2135 of file types.hpp.

◆ __half8_vec_t

using __half8_vec_t = sycl::detail::half_impl::Vec8StorageT

Definition at line 2136 of file types.hpp.

◆ __half_t

using __half_t = sycl::detail::half_impl::StorageT

Definition at line 2132 of file types.hpp.