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

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

#include <sycl/ext/oneapi/reduction.hpp>

Inheritance diagram for cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >:
Collaboration diagram for cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >:

Public Member Functions

 reducer ()
 
 reducer (const T &, BinaryOperation)
 
void combine (const T &Partial)
 
TgetElement (size_t)
 
const TgetElement (size_t) const
 
- Public Member Functions inherited from cl::sycl::ext::oneapi::detail::combiner< reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > > >
enable_if_t<(_Dims==0) &&sycl::detail::IsPlus< _T, BinaryOperation >::value &&sycl::detail::is_geninteger< _T >::value > operator++ ()
 
enable_if_t<(_Dims==0) &&sycl::detail::IsPlus< _T, BinaryOperation >::value &&sycl::detail::is_geninteger< _T >::value > operator++ (int)
 
enable_if_t<(_Dims==0) &&sycl::detail::IsPlus< _T, BinaryOperation >::value > operator+= (const _T &Partial)
 
enable_if_t<(_Dims==0) &&sycl::detail::IsMultiplies< _T, BinaryOperation >::value > operator*= (const _T &Partial)
 
enable_if_t<(_Dims==0) &&sycl::detail::IsBitOR< _T, BinaryOperation >::value > operator|= (const _T &Partial)
 
enable_if_t<(_Dims==0) &&sycl::detail::IsBitXOR< _T, BinaryOperation >::value > operator^= (const _T &Partial)
 
enable_if_t<(_Dims==0) &&sycl::detail::IsBitAND< _T, BinaryOperation >::value > operator&= (const _T &Partial)
 
enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&(IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value||IsReduOptForAtomic64Add< T, _BinaryOperation >::value) &&sycl::detail::IsPlus< T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic ADD operation: *ReduVarPtr += MValue;. More...
 
enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value &&sycl::detail::IsBitOR< T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic BITWISE OR operation: *ReduVarPtr |= MValue;. More...
 
enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value &&sycl::detail::IsBitXOR< T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic BITWISE XOR operation: *ReduVarPtr ^= MValue;. More...
 
enable_if_t< std::is_same< typename remove_AS< _T >::type, T >::value &&IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value &&sycl::detail::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...
 
enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value &&sycl::detail::IsMinimum< T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic MIN operation: *ReduVarPtr = sycl::minimum(*ReduVarPtr, MValue);. More...
 
enable_if_t< BasicCheck< _T, Space, _BinaryOperation > &&IsReduOptForFastAtomicFetch< T, _BinaryOperation >::value &&sycl::detail::IsMaximum< T, _BinaryOperation >::value > atomic_combine (_T *ReduVarPtr) const
 Atomic MAX operation: *ReduVarPtr = sycl::maximum(*ReduVarPtr, MValue);. More...
 

Static Public Member Functions

static T getIdentity ()
 

Public Attributes

T MValue
 

Detailed Description

template<typename T, class BinaryOperation, int Dims, size_t Extent, class Algorithm, bool View>
class cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&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 343 of file reduction.hpp.

Constructor & Destructor Documentation

◆ reducer() [1/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( )
inline

Definition at line 351 of file reduction.hpp.

◆ reducer() [2/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::reducer ( const T ,
BinaryOperation   
)
inline

Definition at line 352 of file reduction.hpp.

Member Function Documentation

◆ combine()

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
void cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::combine ( const T Partial)
inline

Definition at line 354 of file reduction.hpp.

◆ getElement() [1/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
T& cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::getElement ( size_t  )
inline

Definition at line 363 of file reduction.hpp.

◆ getElement() [2/2]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
const T& cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::getElement ( size_t  ) const
inline

Definition at line 364 of file reduction.hpp.

◆ getIdentity()

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
static T cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::getIdentity ( )
inlinestatic

Definition at line 359 of file reduction.hpp.

Member Data Documentation

◆ MValue

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm , bool View>
T cl::sycl::ext::oneapi::detail::reducer< T, BinaryOperation, Dims, Extent, Algorithm, View, enable_if_t< Dims==0 &&Extent==1 &&View==false &&IsKnownIdentityOp< T, BinaryOperation >::value > >::MValue

Definition at line 365 of file reduction.hpp.


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