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

This class encapsulates the reduction variable/accessor, the reduction operator and an optional operator identity. More...

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

Inheritance diagram for cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >:
Collaboration diagram for cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >:

Public Types

using reducer_type = typename algo::reducer_type
 
using rw_accessor_type = typename algo::rw_accessor_type
 
using dw_accessor_type = typename algo::dw_accessor_type
 

Public Member Functions

template<typename _T , typename AllocatorT , std::enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (buffer< _T, 1, AllocatorT > Buffer, handler &CGH, bool InitializeToIdentity)
 SYCL-2020. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (rw_accessor_type &Acc)
 Constructs reduction_impl when the identity value is statically known. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (dw_accessor_type &Acc)
 Constructs reduction_impl when the identity value is statically known. More...
 
template<typename _T , typename AllocatorT , enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (buffer< _T, 1, AllocatorT > Buffer, handler &CGH, const T &, BinaryOperation, bool InitializeToIdentity)
 SYCL-2020. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (rw_accessor_type &Acc, const T &, BinaryOperation)
 Constructs reduction_impl when the identity value is statically known, and user still passed the identity value. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (dw_accessor_type &Acc, const T &, BinaryOperation)
 Constructs reduction_impl when the identity value is statically known, and user still passed the identity value. More...
 
template<typename _T , typename AllocatorT , enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (buffer< _T, 1, AllocatorT > Buffer, handler &CGH, const T &Identity, BinaryOperation BOp, bool InitializeToIdentity)
 SYCL-2020. More...
 
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (rw_accessor_type &Acc, const T &Identity, BinaryOperation BOp)
 Constructs reduction_impl when the identity value is unknown. More...
 
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (dw_accessor_type &Acc, const T &Identity, BinaryOperation BOp)
 Constructs reduction_impl when the identity value is unknown. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (T *VarPtr, bool InitializeToIdentity=false)
 Constructs reduction_impl when the identity value is statically known. More...
 
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (T *VarPtr, const T &Identity, BinaryOperation, bool InitializeToIdentity=false)
 Constructs reduction_impl when the identity value is statically known, and user still passed the identity value. More...
 
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
 reduction_impl (T *VarPtr, const T &Identity, BinaryOperation BOp, bool InitializeToIdentity=false)
 Constructs reduction_impl when the identity value is unknown. More...
 

Detailed Description

template<typename T, class BinaryOperation, int Dims, size_t Extent, class Algorithm>
class cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >

This class encapsulates the reduction variable/accessor, the reduction operator and an optional operator identity.

Definition at line 754 of file reduction.hpp.

Member Typedef Documentation

◆ dw_accessor_type

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
using cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::dw_accessor_type = typename algo::dw_accessor_type

Definition at line 763 of file reduction.hpp.

◆ reducer_type

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
using cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reducer_type = typename algo::reducer_type

Definition at line 761 of file reduction.hpp.

◆ rw_accessor_type

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
using cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::rw_accessor_type = typename algo::rw_accessor_type

Definition at line 762 of file reduction.hpp.

Constructor & Destructor Documentation

◆ reduction_impl() [1/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T , typename AllocatorT , std::enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( buffer< _T, 1, AllocatorT >  Buffer,
handler CGH,
bool  InitializeToIdentity 
)
inline

SYCL-2020.

Constructs reduction_impl when the identity value is statically known.

Definition at line 773 of file reduction.hpp.

References cl::sycl::detail::associateWithHandler(), PI_INVALID_VALUE, and cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::size().

◆ reduction_impl() [2/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( rw_accessor_type Acc)
inline

Constructs reduction_impl when the identity value is statically known.

Definition at line 788 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [3/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( dw_accessor_type Acc)
inline

Constructs reduction_impl when the identity value is statically known.

Definition at line 801 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [4/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T , typename AllocatorT , enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( buffer< _T, 1, AllocatorT >  Buffer,
handler CGH,
const T ,
BinaryOperation  ,
bool  InitializeToIdentity 
)
inline

SYCL-2020.

Constructs reduction_impl when the identity value is statically known, and user still passed the identity value.

Definition at line 816 of file reduction.hpp.

References cl::sycl::detail::associateWithHandler(), PI_INVALID_VALUE, and cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::size().

◆ reduction_impl() [5/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( rw_accessor_type Acc,
const T ,
BinaryOperation   
)
inline

Constructs reduction_impl when the identity value is statically known, and user still passed the identity value.

Definition at line 844 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [6/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( dw_accessor_type Acc,
const T ,
BinaryOperation   
)
inline

Constructs reduction_impl when the identity value is statically known, and user still passed the identity value.

Definition at line 869 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [7/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T , typename AllocatorT , enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( buffer< _T, 1, AllocatorT >  Buffer,
handler CGH,
const T Identity,
BinaryOperation  BOp,
bool  InitializeToIdentity 
)
inline

SYCL-2020.

Constructs reduction_impl when the identity value is NOT known statically.

Definition at line 894 of file reduction.hpp.

References cl::sycl::detail::associateWithHandler(), PI_INVALID_VALUE, and cl::sycl::buffer< T, dimensions, AllocatorT, __Enabled >::size().

◆ reduction_impl() [8/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( rw_accessor_type Acc,
const T Identity,
BinaryOperation  BOp 
)
inline

Constructs reduction_impl when the identity value is unknown.

Definition at line 910 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [9/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( dw_accessor_type Acc,
const T Identity,
BinaryOperation  BOp 
)
inline

Constructs reduction_impl when the identity value is unknown.

Definition at line 922 of file reduction.hpp.

References PI_INVALID_VALUE.

◆ reduction_impl() [10/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( T VarPtr,
bool  InitializeToIdentity = false 
)
inline

Constructs reduction_impl when the identity value is statically known.

The

Parameters
VarPtris a USM pointer to memory, to where the computed reduction value is added using BinaryOperation, i.e. it is expected that the memory is pre-initialized with some meaningful value.

Definition at line 937 of file reduction.hpp.

◆ reduction_impl() [11/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t< IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( T VarPtr,
const T Identity,
BinaryOperation  ,
bool  InitializeToIdentity = false 
)
inline

Constructs reduction_impl when the identity value is statically known, and user still passed the identity value.

The

Parameters
VarPtris a USM pointer to memory, to where the computed reduction value is added using BinaryOperation, i.e. it is expected that the memory is pre-initialized with some meaningful value.

Definition at line 949 of file reduction.hpp.

◆ reduction_impl() [12/12]

template<typename T , class BinaryOperation , int Dims, size_t Extent, class Algorithm >
template<typename _T = T, enable_if_t<!IsKnownIdentityOp< _T, BinaryOperation >::value > * = nullptr>
cl::sycl::ext::oneapi::detail::reduction_impl< T, BinaryOperation, Dims, Extent, Algorithm >::reduction_impl ( T VarPtr,
const T Identity,
BinaryOperation  BOp,
bool  InitializeToIdentity = false 
)
inline

Constructs reduction_impl when the identity value is unknown.

The

Parameters
VarPtris a USM pointer to memory, to where the computed reduction value is added using BinaryOperation, i.e. it is expected that the memory is pre-initialized with some meaningful value.

Definition at line 972 of file reduction.hpp.


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