18 #ifndef viskores_exec_kokkos_internal_TaskBasic_h
19 #define viskores_exec_kokkos_internal_TaskBasic_h
35 template <
typename WType,
typename IType,
typename H
ints>
41 TaskBasic1D(
const WType& worklet,
const IType& invocation)
43 , Invocation(invocation)
47 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer& buffer)
49 this->Worklet.SetErrorMessageBuffer(buffer);
55 viskores::exec::internal::detail::DoWorkletInvokeFunctor(
58 this->Worklet.GetThreadIndices(index,
59 this->Invocation.OutputToInputMap,
60 this->Invocation.VisitArray,
61 this->Invocation.ThreadToOutputMap,
62 this->Invocation.GetInputDomain()));
66 typename std::remove_const<WType>::type Worklet;
70 template <
typename WType,
typename H
ints>
76 explicit TaskBasic1D(
const WType& worklet)
81 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer& buffer)
83 this->Worklet.SetErrorMessageBuffer(buffer);
87 void operator()(
viskores::Id index)
const { this->Worklet(index); }
90 typename std::remove_const<WType>::type Worklet;
93 template <
typename WType,
typename IType,
typename H
ints>
99 TaskBasic3D(
const WType& worklet,
const IType& invocation)
101 , Invocation(invocation)
105 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer& buffer)
107 this->Worklet.SetErrorMessageBuffer(buffer);
113 viskores::exec::internal::detail::DoWorkletInvokeFunctor(
116 this->Worklet.GetThreadIndices(flatIdx,
118 this->Invocation.OutputToInputMap,
119 this->Invocation.VisitArray,
120 this->Invocation.ThreadToOutputMap,
121 this->Invocation.GetInputDomain()));
125 typename std::remove_const<WType>::type Worklet;
129 template <
typename WType,
typename H
ints>
135 explicit TaskBasic3D(
const WType& worklet)
140 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer& buffer)
142 this->Worklet.SetErrorMessageBuffer(buffer);
149 typename std::remove_const<WType>::type Worklet;
156 #endif //viskores_exec_kokkos_internal_TaskBasic_h