DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::marray< Type, NumElements > Class Template Reference

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

#include <sycl/marray.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 = std::enable_if_t< AllSuitableArgTypes<ArgTN...>::value && detail::GetMArrayArgsSize<ArgTN...>::value == NumElements>>
constexpr marray (const ArgTN &...Args)
 
constexpr marray (const marray< Type, NumElements > &Rhs)=default
 
constexpr marray (marray< Type, NumElements > &&Rhs)=default
 
template<std::size_t Size = NumElements, typename = std::enable_if_t<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)=default
 
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 Type_ , std::size_t NumElements_>
class marray
 
template<typename T = DataT>
std::enable_if_t< std::is_integral_v< T >, marrayoperator~ (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 sycl::_V1::marray< Type, NumElements >

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

Definition at line 48 of file marray.hpp.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 56 of file marray.hpp.

◆ const_reference

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

Definition at line 54 of file marray.hpp.

◆ iterator

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

Definition at line 55 of file marray.hpp.

◆ reference

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

Definition at line 53 of file marray.hpp.

◆ value_type

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

Definition at line 52 of file marray.hpp.

Constructor & Destructor Documentation

◆ marray() [1/5]

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

Definition at line 115 of file marray.hpp.

◆ marray() [2/5]

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

Definition at line 117 of file marray.hpp.

◆ marray() [3/5]

template<typename Type , std::size_t NumElements>
template<typename... ArgTN, typename = std::enable_if_t< AllSuitableArgTypes<ArgTN...>::value && detail::GetMArrayArgsSize<ArgTN...>::value == NumElements>>
constexpr sycl::_V1::marray< Type, NumElements >::marray ( const ArgTN &...  Args)
inlineconstexpr

Definition at line 125 of file marray.hpp.

◆ marray() [4/5]

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

◆ marray() [5/5]

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

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 158 of file marray.hpp.

◆ begin() [2/2]

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

Definition at line 160 of file marray.hpp.

◆ end() [1/2]

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

Definition at line 162 of file marray.hpp.

◆ end() [2/2]

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

Definition at line 164 of file marray.hpp.

◆ operator Type()

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

Definition at line 136 of file marray.hpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Definition at line 150 of file marray.hpp.

◆ operator[]() [1/2]

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

Definition at line 143 of file marray.hpp.

◆ operator[]() [2/2]

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

Definition at line 145 of file marray.hpp.

◆ size()

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

Definition at line 140 of file marray.hpp.

Friends And Related Function Documentation

◆ marray

template<typename Type , std::size_t NumElements>
template<typename Type_ , std::size_t NumElements_>
friend class marray
friend

Definition at line 101 of file marray.hpp.

◆ operator!

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

Definition at line 341 of file marray.hpp.

◆ operator+

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

Definition at line 349 of file marray.hpp.

◆ operator-

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

Definition at line 357 of file marray.hpp.

◆ operator~

template<typename Type , std::size_t NumElements>
template<typename T = DataT>
std::enable_if_t<std::is_integral_v<T>, marray> operator~ ( const marray< Type, NumElements > &  Lhs)
friend

Definition at line 333 of file marray.hpp.


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