DPC++ Runtime
Runtime libraries for oneAPI DPC++
vector_preview.hpp File Reference
#include <sycl/access/access.hpp>
#include <sycl/aliases.hpp>
#include <sycl/detail/common.hpp>
#include <sycl/detail/defines_elementary.hpp>
#include <sycl/detail/generic_type_lists.hpp>
#include <sycl/detail/generic_type_traits.hpp>
#include <sycl/detail/memcpy.hpp>
#include <sycl/detail/type_list.hpp>
#include <sycl/detail/type_traits.hpp>
#include <sycl/detail/vector_arith.hpp>
#include <sycl/detail/vector_convert.hpp>
#include <sycl/detail/vector_traits.hpp>
#include <sycl/half_type.hpp>
#include <sycl/ext/oneapi/bfloat16.hpp>
#include <algorithm>
#include <array>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <functional>
#include <iterator>
#include <ostream>
#include <type_traits>
#include <utility>
#include "swizzles.def"
Include dependency graph for vector_preview.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
 
class  sycl::_V1::detail::GetOp< T >
 
class  sycl::_V1::vec< DataT, NumElements >
 
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::detail::SwizzleOp< VecT, OperationLeftT, OperationRightT, OperationCurrentT, Indexes >
 

Namespaces

 sycl
 
 sycl::_V1
 
 sycl::_V1::detail
 

Macros

#define __SYCL_ALLOW_VECTOR_SIZES(num_elements)
 
#define __SYCL_ALLOW_VECTOR_TYPES(num_elements)
 
#define __SYCL_ACCESS_RETURN   this
 
#define __SYCL_OPASSIGN(OPASSIGN, OP)
 
#define __SYCL_UOP(UOP, OPASSIGN)
 
#define __SYCL_BINOP(BINOP, COND)
 
#define __SYCL_RELLOGOP(RELLOGOP, COND)
 
#define __SYCL_ACCESS_RETURN   m_Vector
 

Typedefs

template<typename T >
using sycl::_V1::detail::rel_t = detail::select_cl_scalar_integral_signed_t< T >
 

Macro Definition Documentation

◆ __SYCL_ACCESS_RETURN [1/2]

#define __SYCL_ACCESS_RETURN   this

Definition at line 1356 of file vector_preview.hpp.

◆ __SYCL_ACCESS_RETURN [2/2]

#define __SYCL_ACCESS_RETURN   m_Vector

Definition at line 1356 of file vector_preview.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

#define __SYCL_BINOP (   BINOP,
  COND 
)
Value:
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_t> operator BINOP( \
const DataT & Lhs, const SwizzleOp & Rhs) { \
vec_t Tmp = Rhs; \
return Lhs BINOP Tmp; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_t> operator BINOP(const SwizzleOp & Lhs, \
const DataT & Rhs) { \
vec_t Tmp = Lhs; \
return Tmp BINOP Rhs; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_t> operator BINOP( \
const vec_t & Lhs, const SwizzleOp & Rhs) { \
vec_t Tmp = Rhs; \
return Lhs BINOP Tmp; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_t> operator BINOP(const SwizzleOp & Lhs, \
const vec_t & Rhs) { \
vec_t Tmp = Lhs; \
return Tmp BINOP Rhs; \
}

Definition at line 935 of file vector_preview.hpp.

◆ __SYCL_OPASSIGN

#define __SYCL_OPASSIGN (   OPASSIGN,
  OP 
)
Value:
friend const SwizzleOp &operator OPASSIGN(const SwizzleOp & Lhs, \
const DataT & Rhs) { \
Lhs.operatorHelper<OP>(vec_t(Rhs)); \
return Lhs; \
} \
template <typename RhsOperation> \
friend const SwizzleOp &operator OPASSIGN(const SwizzleOp & Lhs, \
const RhsOperation & Rhs) { \
Lhs.operatorHelper<OP>(Rhs); \
return Lhs; \
} \
friend const SwizzleOp &operator OPASSIGN(const SwizzleOp & Lhs, \
const vec_t & Rhs) { \
Lhs.operatorHelper<OP>(Rhs); \
return Lhs; \
}
#define OP(op)
Definition: bfloat16.hpp:228

Definition at line 858 of file vector_preview.hpp.

◆ __SYCL_RELLOGOP

#define __SYCL_RELLOGOP (   RELLOGOP,
  COND 
)
Value:
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_rel_t> operator RELLOGOP( \
const DataT & Lhs, const SwizzleOp & Rhs) { \
vec_t Tmp = Rhs; \
return Lhs RELLOGOP Tmp; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_rel_t> operator RELLOGOP( \
const SwizzleOp & Lhs, const DataT & Rhs) { \
vec_t Tmp = Lhs; \
return Tmp RELLOGOP Rhs; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_rel_t> operator RELLOGOP( \
const vec_t & Lhs, const SwizzleOp & Rhs) { \
vec_t Tmp = Rhs; \
return Lhs RELLOGOP Tmp; \
} \
template <typename T = DataT> \
friend std::enable_if_t<(COND), vec_rel_t> operator RELLOGOP( \
const SwizzleOp & Lhs, const vec_t & Rhs) { \
vec_t Tmp = Lhs; \
return Tmp RELLOGOP Rhs; \
}

Definition at line 994 of file vector_preview.hpp.

◆ __SYCL_UOP

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

Definition at line 891 of file vector_preview.hpp.