|
template<typename SimdT , class = std::enable_if_t<__ESIMD_DNS::is_simd_type_v<SimdT> && (length == SimdT::length)>> |
| simd (const SimdT &RHS) |
| Implicit conversion constructor from another simd object of the same length. More...
|
|
template<int N1 = N, class Ty1 = Ty, class SFINAE = std::enable_if_t< (N1 == N) && (N1 <= std::experimental::simd_abi::max_fixed_size< Ty>)&&!detail::is_wrapper_elem_type_v<Ty1>>> |
| simd (const sycl::ext::oneapi::experimental::simd< Ty, N1 > &v) |
|
template<typename T1 , class = std::enable_if_t<detail::is_valid_simd_elem_type_v<T1>>> |
| simd (T1 Val) |
| Broadcast constructor with conversion. More...
|
|
template<class To , class T = simd, class = std::enable_if_t<(T::length == 1) && detail::is_valid_simd_elem_type_v<To>>> |
| operator To () const |
| Converts this object to a scalar. More...
|
|
template<int N1, class Ty1 = Ty, class SFINAE = std::enable_if_t< (N1 == N) && (N1 <= std::experimental::simd_abi::max_fixed_size< Ty>)&&!detail::is_wrapper_elem_type_v<Ty1>>> |
| operator sycl::ext::oneapi::experimental::simd< Ty, N1 > () |
| Implicitly converts this object to a sycl::ext::oneapi::experimental::simd object. More...
|
|
simd & | operator= (const simd &other) noexcept |
| Copy assignment operator. More...
|
|
simd & | operator++ () |
| Prefix increment, increments elements of this object. More...
|
|
simd | operator++ (int) |
| Postfix increment. More...
|
|
simd & | operator-- () |
| Prefix decrement, decrements elements of this object. More...
|
|
simd | operator-- (int) |
| Postfix decrement. More...
|
|
template<typename Ty, int N>
class sycl::_V1::ext::intel::esimd::simd< Ty, N >
The main simd vector class.
A vector of elements, which compiler tries to map to a GPU register. Supports all standard C++ unary and binary operations. See more details in the base class' docs: detail::simd_obj_impl
.
- Template Parameters
-
Ty | element type. Can be any C++ integer or floating point type or sycl::half . |
N | the number of elements. |
Definition at line 34 of file types.hpp.
template<typename Ty , int N>
template<typename SimdT , class = std::enable_if_t<__ESIMD_DNS::is_simd_type_v<SimdT> && (length == SimdT::length)>>
Implicit conversion constructor from another simd object of the same length.
Available when SimdT
is
- instantiation of simd
- has the same number of elements
- Template Parameters
-
SimdT | type of the object to convert from |
- Parameters
-
RHS | object to convert from |
Definition at line 77 of file simd.hpp.
Referenced by sycl::_V1::ext::intel::esimd::simd< uint32_t, 16 >::simd().
template<typename Ty , int N>
template<typename T1 , class = std::enable_if_t<detail::is_valid_simd_elem_type_v<T1>>>
Broadcast constructor with conversion.
Converts given value to element_type and replicates it in all elements. Available when T1
is a valid simd element type.
- Template Parameters
-
T1 | broadcast value type |
Val | broadcast value |
Definition at line 99 of file simd.hpp.
template<typename Ty , int N>
template<int N1, class Ty1 = Ty, class SFINAE = std::enable_if_t< (N1 == N) && (N1 <= std::experimental::simd_abi::max_fixed_size< Ty>)&&!detail::is_wrapper_elem_type_v<Ty1>>>
Implicitly converts this object to a sycl::ext::oneapi::experimental::simd object.
Available when the number of elements does not exceed maximum fixed size of the oneapi's simd_abi and (TODO, temporary limitation) the element type is a primitive type (e.g. can't be sycl::half).
Definition at line 125 of file simd.hpp.
template<typename Ty , int N>
template<class To , class T = simd, class = std::enable_if_t<(T::length == 1) && detail::is_valid_simd_elem_type_v<To>>>
Converts this object to a scalar.
Available when
- this object's length is 1
To
is a valid simd element type - Template Parameters
-
- Returns
- this object's single element value converted to the result type.
Definition at line 111 of file simd.hpp.