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

Specialization of the generic class 'reducer'. More...

#include <sycl/reduction.hpp>

Inheritance diagram for sycl::_V1::reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >:

Public Member Functions

 reducer ()
 
 reducer (const IdentityContainerT &, BinaryOperation)
 
 reducer (const detail::ReducerToken< BinaryOperation, IdentityContainerT > &Token)
 
 reducer (const reducer &)=delete
 
 reducer (reducer &&)=delete
 
reduceroperator= (const reducer &)=delete
 
reduceroperator= (reducer &&)=delete
 
reducercombine (const T &Partial)
 
identity () const
 
- Public Member Functions inherited from sycl::_V1::detail::combiner< reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >

Specialization of the generic class 'reducer'.

It is used for reductions of those types and operations for which the identity value is known.

It allows to reduce the size of the 'reducer' object by not holding the identity field inside it and allows to add a default constructor.

Definition at line 607 of file reduction.hpp.

Constructor & Destructor Documentation

◆ reducer() [1/5]

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( )
inline

Definition at line 622 of file reduction.hpp.

◆ reducer() [2/5]

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const IdentityContainerT &  ,
BinaryOperation   
)
inline

Definition at line 623 of file reduction.hpp.

◆ reducer() [3/5]

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const detail::ReducerToken< BinaryOperation, IdentityContainerT > &  Token)
inline

Definition at line 625 of file reduction.hpp.

◆ reducer() [4/5]

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &  )
delete

◆ reducer() [5/5]

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &&  )
delete

Member Function Documentation

◆ combine()

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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::combine ( const T &  Partial)
inline

Definition at line 634 of file reduction.hpp.

◆ identity()

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

Definition at line 640 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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::operator= ( const reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==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==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > >::operator= ( reducer< T, BinaryOperation, Dims, Extent, IdentityContainerT, View, std::enable_if_t< Dims==0 &&Extent==1 &&View==false &&detail::IsKnownIdentityOp< T, BinaryOperation >::value > > &&  )
delete

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 643 of file reduction.hpp.


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