#include <TensorReductionSycl.h>
◆ LocalAccessor
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ Op
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ OpDef
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ SecondStepFullReducer()
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
static EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE type get_op(Op &op)
Definition: TensorReductionSycl.h:41
Op op
Definition: TensorReductionSycl.h:87
OutputAccessor outAcc
Definition: TensorReductionSycl.h:86
LocalAccessor scratch
Definition: TensorReductionSycl.h:84
InputAccessor aI
Definition: TensorReductionSycl.h:85
◆ operator()()
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
99 const Index localid = itemID.get_local_id(0);
100 auto aInPtr =
aI + localid;
102 CoeffReturnType *scratchptr =
scratch.get_pointer();
103 CoeffReturnType accumulator = *aInPtr;
105 scratchptr[localid] =
op.finalize(accumulator);
106 for (
Index offset = itemID.get_local_range(0) / 2; offset > 0; offset /= 2) {
107 itemID.barrier(cl::sycl::access::fence_space::local_space);
108 if (localid < offset) {
109 op.reduce(scratchptr[localid + offset], &accumulator);
110 scratchptr[localid] =
op.finalize(accumulator);
113 if (localid == 0) *aOutPtr =
op.finalize(accumulator);
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
References Eigen::TensorSycl::internal::SecondStepFullReducer< CoeffReturnType, OpType, InputAccessor, OutputAccessor, Index, local_range >::aI, Eigen::TensorSycl::internal::SecondStepFullReducer< CoeffReturnType, OpType, InputAccessor, OutputAccessor, Index, local_range >::op, Eigen::TensorSycl::internal::SecondStepFullReducer< CoeffReturnType, OpType, InputAccessor, OutputAccessor, Index, local_range >::outAcc, and Eigen::TensorSycl::internal::SecondStepFullReducer< CoeffReturnType, OpType, InputAccessor, OutputAccessor, Index, local_range >::scratch.
◆ aI
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ op
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ outAcc
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
◆ scratch
template<typename CoeffReturnType , typename OpType , typename InputAccessor , typename OutputAccessor , typename Index , Index local_range>
The documentation for this struct was generated from the following file: