DPC++ Runtime
Runtime libraries for oneAPI DPC++
sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > Class Template Reference

Specialization of 'reducer' class for array reductions exposing the subscript operator. More...

#include <sycl/reduction.hpp>

Inheritance diagram for sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >:
Collaboration diagram for sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >:

Public Member Functions

 reducer (const IdentityContainerT &IdentityContainer, BinaryOperation BOp)
 
 reducer (const detail::ReducerToken< BinaryOperation, IdentityContainerT > &Token)
 
 reducer (const reducer &)=delete
 
 reducer (reducer &&)=delete
 
reduceroperator= (const reducer &)=delete
 
reduceroperator= (reducer &&)=delete
 
reducer< T, BinaryOperation, Dims - 1, Extent, IdentityContainerT, true > operator[] (size_t Index)
 
template<bool HasIdentityRelay = has_identity>
std::enable_if_t< HasIdentityRelay &&(HasIdentityRelay==has_identity), T > identity () const
 
- Public Member Functions inherited from sycl::_V1::detail::combiner< reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > >
std::enable_if_t<(_Dims==0) &&IsPlus< _T, BinaryOp >::value &&is_geninteger_v< _T >, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator++ ()
 
std::enable_if_t<(_Dims==0) &&IsPlus< _T, BinaryOp >::value &&is_geninteger_v< _T >, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator++ (int)
 
std::enable_if_t<(_Dims==0) &&IsPlus< _T, BinaryOp >::value, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator+= (const _T &Partial)
 
std::enable_if_t<(_Dims==0) &&IsMultiplies< _T, BinaryOp >::value, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator*= (const _T &Partial)
 
std::enable_if_t<(_Dims==0) &&IsBitOR< _T, BinaryOp >::value, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator|= (const _T &Partial)
 
std::enable_if_t<(_Dims==0) &&IsBitXOR< _T, BinaryOp >::value, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator^= (const _T &Partial)
 
std::enable_if_t<(_Dims==0) &&IsBitAND< _T, BinaryOp >::value, reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > & > operator&= (const _T &Partial)
 
std::enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&(IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value||IsReduOptForAtomic64Op< _T, _BinaryOperation >::value) &&IsPlus< _T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic ADD operation: *ReduVarPtr += MValue;. More...
 
std::enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value &&IsBitOR< _T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic BITWISE OR operation: *ReduVarPtr |= MValue;. More...
 
std::enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value &&IsBitXOR< _T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic BITWISE XOR operation: *ReduVarPtr ^= MValue;. More...
 
std::enable_if_t< std::is_same_v< remove_decoration_t< _T >, _T > &&IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value &&IsBitAND< _T, _BinaryOperation >::value &&(Space==access::address_space::global_space||Space==access::address_space::local_space)> atomic_combine (_T *ReduVarPtr) const
 Atomic BITWISE AND operation: *ReduVarPtr &= MValue;. More...
 
std::enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&(IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value||IsReduOptForAtomic64Op< _T, _BinaryOperation >::value) &&IsMinimum< _T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic MIN operation: *ReduVarPtr = sycl::minimum(*ReduVarPtr, MValue);. More...
 
std::enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&(IsReduOptForFastAtomicFetch< _T, _BinaryOperation >::value||IsReduOptForAtomic64Op< _T, _BinaryOperation >::value) &&IsMaximum< _T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic MAX operation: *ReduVarPtr = sycl::maximum(*ReduVarPtr, MValue);. More...
 

Friends

template<typename ReducerT >
class detail::ReducerAccess
 

Additional Inherited Members

- Public Types inherited from sycl::_V1::detail::reducer_common< T, BinaryOperation, Dims >
using value_type = T
 
using binary_operation = BinaryOperation
 
- Static Public Attributes inherited from sycl::_V1::detail::reducer_common< T, BinaryOperation, Dims >
static constexpr int dimensions = Dims
 

Detailed Description

template<typename T, class BinaryOperation, int Dims, size_t Extent, typename IdentityContainerT, bool View>
class sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >

Specialization of 'reducer' class for array reductions exposing the subscript operator.

Definition at line 699 of file reduction.hpp.

Constructor & Destructor Documentation

◆ reducer() [1/4]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const IdentityContainerT &  IdentityContainer,
BinaryOperation  BOp 
)
inline

Definition at line 714 of file reduction.hpp.

◆ reducer() [2/4]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const detail::ReducerToken< BinaryOperation, IdentityContainerT > &  Token)
inline

Definition at line 717 of file reduction.hpp.

◆ reducer() [3/4]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &  )
delete

◆ reducer() [4/4]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &&  )
delete

Member Function Documentation

◆ identity()

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
template<bool HasIdentityRelay = has_identity>
std::enable_if_t<HasIdentityRelay && (HasIdentityRelay == has_identity), T> sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::identity ( ) const
inline

Definition at line 733 of file reduction.hpp.

◆ operator=() [1/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
reducer& sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::operator= ( const reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &  )
delete

◆ operator=() [2/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
reducer& sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::operator= ( reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &&  )
delete

◆ operator[]()

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
reducer<T, BinaryOperation, Dims - 1, Extent, IdentityContainerT, true> sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==1 &&View==false &&!detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::operator[] ( size_t  Index)
inline

Definition at line 727 of file reduction.hpp.

Friends And Related Function Documentation

◆ detail::ReducerAccess

template<typename T , class BinaryOperation , int Dims, size_t Extent, typename IdentityContainerT , bool View>
template<typename ReducerT >
friend class detail::ReducerAccess
friend

Definition at line 738 of file reduction.hpp.


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