DPC++ Runtime
Runtime libraries for oneAPI Data Parallel C++
cl::sycl::marray< Type, NumElements > Class Template Reference

Provides a cross-patform math array class template that works on SYCL devices as well as in host C++ code. More...

#include <CL/sycl/detail/helpers.hpp>

Public Types

using value_type = Type
 
using reference = Type &
 
using const_reference = const Type &
 
using iterator = Type *
 
using const_iterator = const Type *
 

Public Member Functions

constexpr marray ()
 
constexpr marray (const Type &Arg)
 
template<typename... ArgTN, typename = EnableIfSuitableTypes<ArgTN...>, typename = typename std::enable_if<sizeof...(ArgTN) == NumElements>::type>
constexpr marray (const ArgTN &... Args)
 
constexpr marray (const marray< Type, NumElements > &Rhs)
 
constexpr marray (marray< Type, NumElements > &&Rhs)
 
template<std::size_t Size = NumElements, typename = typename std::enable_if<Size == 1>>
 operator Type () const
 
reference operator[] (std::size_t index)
 
const_reference operator[] (std::size_t index) const
 
marrayoperator= (const marray< Type, NumElements > &Rhs)
 
marrayoperator= (const Type &Rhs)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 

Static Public Member Functions

static constexpr std::size_t size () noexcept
 

Friends

template<typename T = DataT>
std::enable_if< std::is_integral< T >::value, marray >::type operator~ (const marray &Lhs)
 
marray< bool, NumElements > operator! (const marray &Lhs)
 
marray operator+ (const marray &Lhs)
 
marray operator- (const marray &Lhs)
 

Detailed Description

template<typename Type, std::size_t NumElements>
class cl::sycl::marray< Type, NumElements >

Provides a cross-patform math array class template that works on SYCL devices as well as in host C++ code.

Definition at line 34 of file helpers.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename Type , std::size_t NumElements>
using cl::sycl::marray< Type, NumElements >::const_iterator = const Type *

Definition at line 32 of file marray.hpp.

◆ const_reference

template<typename Type , std::size_t NumElements>
using cl::sycl::marray< Type, NumElements >::const_reference = const Type &

Definition at line 30 of file marray.hpp.

◆ iterator

template<typename Type , std::size_t NumElements>
using cl::sycl::marray< Type, NumElements >::iterator = Type *

Definition at line 31 of file marray.hpp.

◆ reference

template<typename Type , std::size_t NumElements>
using cl::sycl::marray< Type, NumElements >::reference = Type &

Definition at line 29 of file marray.hpp.

◆ value_type

template<typename Type , std::size_t NumElements>
using cl::sycl::marray< Type, NumElements >::value_type = Type

Definition at line 28 of file marray.hpp.

Constructor & Destructor Documentation

◆ marray() [1/5]

template<typename Type , std::size_t NumElements>
constexpr cl::sycl::marray< Type, NumElements >::marray ( )
inlineconstexpr

Definition at line 52 of file marray.hpp.

◆ marray() [2/5]

template<typename Type , std::size_t NumElements>
constexpr cl::sycl::marray< Type, NumElements >::marray ( const Type &  Arg)
inlineexplicitconstexpr

Definition at line 54 of file marray.hpp.

◆ marray() [3/5]

template<typename Type , std::size_t NumElements>
template<typename... ArgTN, typename = EnableIfSuitableTypes<ArgTN...>, typename = typename std::enable_if<sizeof...(ArgTN) == NumElements>::type>
constexpr cl::sycl::marray< Type, NumElements >::marray ( const ArgTN &...  Args)
inlineconstexpr

Definition at line 63 of file marray.hpp.

◆ marray() [4/5]

template<typename Type , std::size_t NumElements>
constexpr cl::sycl::marray< Type, NumElements >::marray ( const marray< Type, NumElements > &  Rhs)
inlineconstexpr

Definition at line 65 of file marray.hpp.

◆ marray() [5/5]

template<typename Type , std::size_t NumElements>
constexpr cl::sycl::marray< Type, NumElements >::marray ( marray< Type, NumElements > &&  Rhs)
inlineconstexpr

Definition at line 71 of file marray.hpp.

Member Function Documentation

◆ begin() [1/2]

template<typename Type , std::size_t NumElements>
iterator cl::sycl::marray< Type, NumElements >::begin ( )
inline

Definition at line 107 of file marray.hpp.

◆ begin() [2/2]

template<typename Type , std::size_t NumElements>
const_iterator cl::sycl::marray< Type, NumElements >::begin ( ) const
inline

Definition at line 109 of file marray.hpp.

◆ end() [1/2]

template<typename Type , std::size_t NumElements>
iterator cl::sycl::marray< Type, NumElements >::end ( )
inline

Definition at line 111 of file marray.hpp.

◆ end() [2/2]

template<typename Type , std::size_t NumElements>
const_iterator cl::sycl::marray< Type, NumElements >::end ( ) const
inline

Definition at line 113 of file marray.hpp.

◆ operator Type()

template<typename Type , std::size_t NumElements>
template<std::size_t Size = NumElements, typename = typename std::enable_if<Size == 1>>
cl::sycl::marray< Type, NumElements >::operator Type ( ) const
inline

Definition at line 80 of file marray.hpp.

◆ operator=() [1/2]

template<typename Type , std::size_t NumElements>
marray& cl::sycl::marray< Type, NumElements >::operator= ( const marray< Type, NumElements > &  Rhs)
inline

Definition at line 91 of file marray.hpp.

◆ operator=() [2/2]

template<typename Type , std::size_t NumElements>
marray& cl::sycl::marray< Type, NumElements >::operator= ( const Type &  Rhs)
inline

Definition at line 99 of file marray.hpp.

◆ operator[]() [1/2]

template<typename Type , std::size_t NumElements>
reference cl::sycl::marray< Type, NumElements >::operator[] ( std::size_t  index)
inline

Definition at line 87 of file marray.hpp.

◆ operator[]() [2/2]

template<typename Type , std::size_t NumElements>
const_reference cl::sycl::marray< Type, NumElements >::operator[] ( std::size_t  index) const
inline

Definition at line 89 of file marray.hpp.

◆ size()

template<typename Type , std::size_t NumElements>
static constexpr std::size_t cl::sycl::marray< Type, NumElements >::size ( )
inlinestaticconstexprnoexcept

Definition at line 84 of file marray.hpp.

Friends And Related Function Documentation

◆ operator!

template<typename Type , std::size_t NumElements>
marray<bool, NumElements> operator! ( const marray< Type, NumElements > &  Lhs)
friend

Definition at line 287 of file marray.hpp.

◆ operator+

template<typename Type , std::size_t NumElements>
marray operator+ ( const marray< Type, NumElements > &  Lhs)
friend

Definition at line 295 of file marray.hpp.

◆ operator-

template<typename Type , std::size_t NumElements>
marray operator- ( const marray< Type, NumElements > &  Lhs)
friend

Definition at line 303 of file marray.hpp.

◆ operator~

template<typename Type , std::size_t NumElements>
template<typename T = DataT>
std::enable_if<std::is_integral<T>::value, marray>::type operator~ ( const marray< Type, NumElements > &  Lhs)
friend

Definition at line 279 of file marray.hpp.


The documentation for this class was generated from the following files: