DPC++ Runtime
Runtime libraries for oneAPI DPC++
cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation > Class Template Reference

Templated class for common functionality of all reduction implementation classes. More...

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

Inheritance diagram for cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >:
Collaboration diagram for cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >:

Public Member Functions

template<typename _T = T, class _BinaryOperation = BinaryOperation>
constexpr enable_if_t< IsKnownIdentityOp< _T, _BinaryOperation >::value, _T > getIdentity ()
 Returns the statically known identity value. More...
 
template<typename _T = T, class _BinaryOperation = BinaryOperation>
enable_if_t<!IsKnownIdentityOp< _T, _BinaryOperation >::value, _T > getIdentity ()
 Returns the identity value given by user. More...
 
BinaryOperation getBinaryOperation () const
 Returns the binary operation associated with the reduction. More...
 
bool initializeToIdentity () const
 

Protected Member Functions

 reduction_impl_common (const T &Identity, BinaryOperation BinaryOp, bool Init=false)
 

Protected Attributes

const T MIdentity
 Identity of the BinaryOperation. More...
 
BinaryOperation MBinaryOp
 
bool InitializeToIdentity
 

Detailed Description

template<typename T, class BinaryOperation>
class cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >

Templated class for common functionality of all reduction implementation classes.

Definition at line 455 of file reduction.hpp.

Constructor & Destructor Documentation

◆ reduction_impl_common()

template<typename T , class BinaryOperation >
cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::reduction_impl_common ( const T Identity,
BinaryOperation  BinaryOp,
bool  Init = false 
)
inlineprotected

Definition at line 457 of file reduction.hpp.

Member Function Documentation

◆ getBinaryOperation()

template<typename T , class BinaryOperation >
BinaryOperation cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::getBinaryOperation ( ) const
inline

Returns the binary operation associated with the reduction.

Definition at line 477 of file reduction.hpp.

◆ getIdentity() [1/2]

template<typename T , class BinaryOperation >
template<typename _T = T, class _BinaryOperation = BinaryOperation>
constexpr enable_if_t<IsKnownIdentityOp<_T, _BinaryOperation>::value, _T> cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::getIdentity ( )
inlineconstexpr

Returns the statically known identity value.

Definition at line 465 of file reduction.hpp.

◆ getIdentity() [2/2]

template<typename T , class BinaryOperation >
template<typename _T = T, class _BinaryOperation = BinaryOperation>
enable_if_t<!IsKnownIdentityOp<_T, _BinaryOperation>::value, _T> cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::getIdentity ( )
inline

Returns the identity value given by user.

Definition at line 472 of file reduction.hpp.

◆ initializeToIdentity()

template<typename T , class BinaryOperation >
bool cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::initializeToIdentity ( ) const
inline

Definition at line 478 of file reduction.hpp.

References cl::sycl::detail::InitializeToIdentity.

Member Data Documentation

◆ InitializeToIdentity

template<typename T , class BinaryOperation >
bool cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::InitializeToIdentity
protected

Definition at line 486 of file reduction.hpp.

◆ MBinaryOp

template<typename T , class BinaryOperation >
BinaryOperation cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::MBinaryOp
protected

Definition at line 485 of file reduction.hpp.

◆ MIdentity

template<typename T , class BinaryOperation >
const T cl::sycl::ext::oneapi::detail::reduction_impl_common< T, BinaryOperation >::MIdentity
protected

Identity of the BinaryOperation.

The result of BinaryOperation(X, MIdentity) is equal to X for any X.

Definition at line 483 of file reduction.hpp.


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