DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
types.hpp File Reference
#include <CL/sycl/detail/generic_type_traits.hpp>
#include <CL/sycl/access/access.hpp>
#include <CL/sycl/aliases.hpp>
#include <CL/sycl/detail/common.hpp>
#include <CL/sycl/detail/helpers.hpp>
#include <CL/sycl/detail/type_traits.hpp>
#include <CL/sycl/half_type.hpp>
#include <CL/sycl/marray.hpp>
#include <CL/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  cl::sycl::elem
 
struct  cl::sycl::detail::vec_helper< T >
 
class  cl::sycl::detail::SwizzleOp< VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes >
 
class  cl::sycl::detail::BaseCLTypeConverter< T, N >
 
class  cl::sycl::detail::GetOp< T >
 
class  cl::sycl::detail::GetScalarOp< T >
 
struct  cl::sycl::detail::EqualTo< T >
 
struct  cl::sycl::detail::NotEqualTo< T >
 
struct  cl::sycl::detail::GreaterEqualTo< T >
 
struct  cl::sycl::detail::LessEqualTo< T >
 
struct  cl::sycl::detail::GreaterThan< T >
 
struct  cl::sycl::detail::LessThan< T >
 
struct  cl::sycl::detail::LogicalAnd< T >
 
struct  cl::sycl::detail::LogicalOr< T >
 
struct  cl::sycl::detail::RShift< T >
 
struct  cl::sycl::detail::LShift< T >
 
class  cl::sycl::detail::RoundedRangeKernel< TransformedArgType, Dims, KernelType >
 
class  cl::sycl::detail::RoundedRangeKernelWithKH< TransformedArgType, Dims, KernelType >
 
class  cl::sycl::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  cl::sycl::detail::SwizzleOp< VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes >
 
struct  cl::sycl::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  cl::sycl::is_device_copyable< T, std::enable_if_t< std::is_trivially_copyable< T >::value > >
 
struct  cl::sycl::is_device_copyable< std::tuple<> >
 
struct  cl::sycl::is_device_copyable< std::tuple< T, Ts... > >
 
struct  cl::sycl::is_device_copyable< sycl::marray< T, N >, std::enable_if_t< is_device_copyable< T >::value &&!std::is_trivially_copyable< T >::value > >
 
struct  cl::sycl::detail::IsDeprecatedDeviceCopyable< T, typename >
 

Namespaces

 cl
 We provide new interfaces for matrix muliply in this patch:
 
 cl::sycl
 
 cl::sycl::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 cl::sycl::detail::rel_t = typename detail::conditional_t< sizeof(DataT)==sizeof(cl_char), cl_char, typename detail::conditional_t< sizeof(DataT)==sizeof(cl_short), cl_short, typename detail::conditional_t< sizeof(DataT)==sizeof(cl_int), cl_int, typename detail::conditional_t< sizeof(DataT)==sizeof(cl_long), cl_long, bool > >> >
 
template<typename T , typename R >
using cl::sycl::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 cl::sycl::detail::is_sint_to_sint = std::integral_constant< bool, is_sigeninteger< T >::value &&is_sigeninteger< R >::value >
 
template<typename T , typename R >
using cl::sycl::detail::is_uint_to_uint = std::integral_constant< bool, is_sugeninteger< T >::value &&is_sugeninteger< R >::value >
 
template<typename T , typename R >
using cl::sycl::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 cl::sycl::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 cl::sycl::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 cl::sycl::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 cl::sycl::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 cl::sycl::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 cl::sycl::detail::is_standard_type = std::integral_constant< bool, detail::is_sgentype< T >::value >
 
template<typename T >
using cl::sycl::vec_data = detail::vec_helper< T >
 
template<typename T >
using cl::sycl::vec_data_t = typename detail::vec_helper< T >::RetType
 
using __half_t = cl::sycl::detail::half_impl::StorageT
 
using __half2_vec_t = cl::sycl::detail::half_impl::Vec2StorageT
 
using __half3_vec_t = cl::sycl::detail::half_impl::Vec3StorageT
 
using __half4_vec_t = cl::sycl::detail::half_impl::Vec4StorageT
 
using __half8_vec_t = cl::sycl::detail::half_impl::Vec8StorageT
 
using __half16_vec_t = cl::sycl::detail::half_impl::Vec16StorageT
 
template<typename T , typename T8 , typename T16 , typename T32 , typename T64 >
using cl::sycl::detail::select_apply_cl_t = conditional_t< sizeof(T)==1, T8, conditional_t< sizeof(T)==2, T16, conditional_t< sizeof(T)==4, T32, T64 > >>
 

Enumerations

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

Functions

template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
detail::enable_if_t< std::is_same< T, R >::value, R > cl::sycl::detail::convertImpl (T Value)
 
template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
detail::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 > cl::sycl::detail::convertImpl (T Value)
 
template<typename T , typename R , rounding_mode roundingMode, typename OpenCLT , typename OpenCLR >
detail::enable_if_t< is_float_to_int< T, R >::value, R > cl::sycl::detail::convertImpl (T Value)
 
template<typename T >
struct cl::sycl::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 1869 of file types.hpp.

◆ __SYCL_ACCESS_RETURN [2/2]

#define __SYCL_ACCESS_RETURN   m_Vector

Definition at line 1869 of file types.hpp.

◆ __SYCL_ALIGNED_VAR

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

Definition at line 551 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...> \
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...> \
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...> \
: detail::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 1980 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 detail::enable_if_t< \
std::is_convertible<DataT, T>::value && \
(std::is_fundamental<vec_data_t<T>>::value || \
std::is_same<typename detail::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 detail::enable_if_t<Num != 1, vec &> operator OPASSIGN( \
const DataT &Rhs) { \
*this = *this BINOP vec(Rhs); \
return *this; \
}

Definition at line 1980 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)>; \
};

Definition at line 2204 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 2326 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 2160 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)>; \
};

Definition at line 2182 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 2280 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 2219 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; \
}; \
}

Definition at line 2290 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 2190 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 2231 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); \
};

Definition at line 2244 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; \
};

Definition at line 2225 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 2196 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 2316 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 2166 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 2260 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)>; \
};

Definition at line 2174 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 2270 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 2250 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 2303 of file types.hpp.

◆ __SYCL_GET_CL_HALF_TYPE

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

Definition at line 2146 of file types.hpp.

◆ __SYCL_GET_CL_TYPE

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

Definition at line 2136 of file types.hpp.

◆ __SYCL_GET_SCALAR_CL_TYPE

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

Definition at line 2137 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 1504 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 detail::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)); \
}

Definition at line 2034 of file types.hpp.

◆ __SYCL_RELLOGOP [2/2]

#define __SYCL_RELLOGOP (   RELLOGOP)

Definition at line 2034 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 1530 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 1530 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 2388 of file types.hpp.

Typedef Documentation

◆ __half16_vec_t

◆ __half2_vec_t

◆ __half3_vec_t

◆ __half4_vec_t

◆ __half8_vec_t

◆ __half_t

Definition at line 2140 of file types.hpp.

T
cl::sycl::ulong
unsigned long ulong
Definition: aliases.hpp:73
detail
Definition: pi_opencl.cpp:86
cl::sycl::half
cl::sycl::detail::half_impl::half half
Definition: aliases.hpp:76
cl::sycl::detail::select_apply_cl_t
conditional_t< sizeof(T)==1, T8, conditional_t< sizeof(T)==2, T16, conditional_t< sizeof(T)==4, T32, T64 > >> select_apply_cl_t
Definition: types.hpp:2157
cl::sycl::detail::conditional_t
typename std::conditional< B, T, F >::type conditional_t
Definition: stl_type_traits.hpp:27
__SYCL_GET_SCALAR_CL_TYPE
#define __SYCL_GET_SCALAR_CL_TYPE(target)
Definition: types.hpp:2137
__SYCL_GET_CL_HALF_TYPE
#define __SYCL_GET_CL_HALF_TYPE(target, num)
Definition: types.hpp:2146
std::get
constexpr tuple_element< I, tuple< Types... > >::type & get(cl::sycl::detail::tuple< Types... > &Arg) noexcept
Definition: tuple.hpp:199
cl::sycl::uchar
unsigned char uchar
Definition: aliases.hpp:70
__half_t
cl::sycl::detail::half_impl::StorageT __half_t
Definition: types.hpp:2140
cl::sycl::ushort
unsigned short ushort
Definition: aliases.hpp:71
cl::sycl::uint
unsigned int uint
Definition: aliases.hpp:72
cl::sycl::detail::enable_if_t
typename std::enable_if< B, T >::type enable_if_t
Definition: stl_type_traits.hpp:24
cl::sycl::schar
signed char schar
Definition: aliases.hpp:69
__SYCL_GET_CL_TYPE
#define __SYCL_GET_CL_TYPE(target, num)
Definition: types.hpp:2136