18 #ifndef viskores_cont_internal_FunctorsGeneral_h
19 #define viskores_cont_internal_FunctorsGeneral_h
46 template <
typename ResultType,
typename Function>
47 struct WrappedBinaryOperator
52 WrappedBinaryOperator(
const Function& f)
58 template <
typename Argument1,
typename Argument2>
61 return static_cast<ResultType
>(m_f(x, y));
65 template <
typename Argument1,
typename Argument2>
67 operator()(
const viskores::internal::ArrayPortalValueReference<Argument1>& x,
68 const viskores::internal::ArrayPortalValueReference<Argument2>& y)
const
70 using ValueTypeX =
typename viskores::internal::ArrayPortalValueReference<Argument1>::ValueType;
71 using ValueTypeY =
typename viskores::internal::ArrayPortalValueReference<Argument2>::ValueType;
72 return static_cast<ResultType
>(m_f((ValueTypeX)x, (ValueTypeY)y));
76 template <
typename Argument1,
typename Argument2>
78 operator()(
const Argument1& x,
79 const viskores::internal::ArrayPortalValueReference<Argument2>& y)
const
81 using ValueTypeY =
typename viskores::internal::ArrayPortalValueReference<Argument2>::ValueType;
82 return static_cast<ResultType
>(m_f(x, (ValueTypeY)y));
86 template <
typename Argument1,
typename Argument2>
88 operator()(
const viskores::internal::ArrayPortalValueReference<Argument1>& x,
89 const Argument2& y)
const
91 using ValueTypeX =
typename viskores::internal::ArrayPortalValueReference<Argument1>::ValueType;
92 return static_cast<ResultType
>(m_f((ValueTypeX)x, y));
99 template <
typename T,
typename U,
class BinaryCompare = DefaultCompareFunctor>
106 explicit KeyCompare(BinaryCompare c)
119 BinaryCompare CompareFunctor;
122 template <
typename PortalConstType,
typename T,
typename BinaryFunctor>
125 PortalConstType Portal;
127 BinaryFunctor BinaryOperator;
140 ReduceKernel(
const PortalConstType& portal, T initialValue, BinaryFunctor binary_functor)
142 , InitialValue(initialValue)
143 , BinaryOperator(binary_functor)
144 , PortalLength(portal.GetNumberOfValues())
155 if (offset + reduceWidth >= this->PortalLength)
159 T partialSum =
static_cast<T
>(BinaryOperator(this->InitialValue, this->Portal.Get(offset)));
161 while (currentIndex < this->PortalLength)
163 partialSum =
static_cast<T
>(BinaryOperator(partialSum, this->Portal.Get(currentIndex)));
173 static_cast<T
>(BinaryOperator(this->Portal.Get(offset), this->Portal.Get(offset + 1)));
174 for (
int i = 2; i < reduceWidth; ++i)
176 partialSum =
static_cast<T
>(BinaryOperator(partialSum, this->Portal.Get(offset + i)));
183 struct ReduceKeySeriesStates
190 ReduceKeySeriesStates(
bool start =
false,
bool end =
false)
197 template <
typename InputPortalType,
typename KeyStatePortalType>
200 InputPortalType Input;
201 KeyStatePortalType KeyState;
204 ReduceStencilGeneration(
const InputPortalType& input,
const KeyStatePortalType& kstate)
214 using ValueType =
typename InputPortalType::ValueType;
215 using KeyStateType =
typename KeyStatePortalType::ValueType;
230 if (centerIndex == 0)
235 const ValueType centerValue = this->Input.Get(centerIndex);
236 const ValueType rightValue = this->Input.Get(rightIndex);
237 const KeyStateType state = ReduceKeySeriesStates(
true, rightValue != centerValue);
238 this->KeyState.Set(centerIndex, state);
240 else if (rightIndex == this->Input.GetNumberOfValues())
244 const ValueType centerValue = this->Input.Get(centerIndex);
245 const ValueType leftValue = this->Input.Get(leftIndex);
246 const KeyStateType state = ReduceKeySeriesStates(leftValue != centerValue,
true);
247 this->KeyState.Set(centerIndex, state);
251 const ValueType centerValue = this->Input.Get(centerIndex);
252 const bool leftMatches(this->Input.Get(leftIndex) == centerValue);
253 const bool rightMatches(this->Input.Get(rightIndex) == centerValue);
256 KeyStateType state = ReduceKeySeriesStates(!leftMatches, !rightMatches);
257 this->KeyState.Set(centerIndex, state);
262 template <
typename BinaryFunctor>
263 struct ReduceByKeyAdd
265 BinaryFunctor BinaryOperator;
267 ReduceByKeyAdd(BinaryFunctor binary_functor)
268 : BinaryOperator(binary_functor)
272 template <
typename T>
288 return ReturnType(this->BinaryOperator(a.
first, b.
first),
295 struct ReduceByKeyUnaryStencilOp
298 bool operator()(ReduceKeySeriesStates keySeriesState)
const {
return keySeriesState.fEnd; }
301 template <
typename T,
302 typename InputPortalType,
303 typename KeyStatePortalType,
304 typename OutputPortalType>
307 InputPortalType Input;
308 KeyStatePortalType KeyState;
309 OutputPortalType Output;
312 ShiftCopyAndInit(
const InputPortalType& _input,
313 const KeyStatePortalType& kstate,
314 OutputPortalType& _output,
326 if (this->KeyState.Get(index).fStart)
328 Output.Set(index, initValue);
332 Output.Set(index, Input.Get(index - 1));
337 template <
class BitsPortal,
class IndicesPortal>
340 using WordType =
typename BitsPortal::WordTypePreferred;
346 CacheLineSize /
static_cast<viskores::Id>(
sizeof(WordType));
347 static constexpr
viskores::Id CacheLinesPerInstance = 2;
348 static constexpr
viskores::Id WordsPerInstance = CacheLinesPerInstance * WordsPerCacheLine;
354 BitFieldToUnorderedSetFunctor(
const BitsPortal& input,
355 IndicesPortal& output,
356 std::atomic<viskores::UInt64>& popCount)
360 , FinalWordIndex{ input.GetNumberOfWords() - 1 }
361 , FinalWordMask(input.GetFinalWordMask())
367 const auto numWords = this->Input.GetNumberOfWords();
368 return (numWords + WordsPerInstance - 1) / WordsPerInstance;
373 const viskores::Id numWords = this->Input.GetNumberOfWords();
374 const viskores::Id wordStart = viskores::Min(instanceIdx * WordsPerInstance, numWords);
375 const viskores::Id wordEnd = viskores::Min(wordStart + WordsPerInstance, numWords);
377 if (wordStart != wordEnd)
379 this->ExecuteRange(wordStart, wordEnd);
385 #ifndef VISKORES_CUDA_DEVICE_PASS // for std::atomic call from VISKORES_EXEC function:
390 viskores::UInt64 outIdx = this->PopCount.fetch_add(chunkBits, std::memory_order_relaxed);
392 this->ProcessWords(wordStart, wordEnd,
static_cast<viskores::Id>(outIdx));
402 return PopCount.load(std::memory_order_relaxed);
409 const bool isFinalChunk = wordEnd == (this->FinalWordIndex + 1);
413 wordEnd = this->FinalWordIndex;
436 const bool isFinalChunk = wordEnd == (this->FinalWordIndex + 1);
440 wordEnd = this->FinalWordIndex;
446 WordType word = this->Input.GetWord(i);
451 this->Output.Set(outputStartIdx++, firstBitIdx + bit);
460 WordType word = this->Input.GetWord(i) & this->FinalWordMask;
465 this->Output.Set(outputStartIdx++, firstBitIdx + bit);
472 IndicesPortal Output;
473 std::atomic<viskores::UInt64>& PopCount;
476 WordType FinalWordMask{ 0 };
479 template <
class InputPortalType,
class OutputPortalType>
482 InputPortalType InputPortal;
483 OutputPortalType OutputPortal;
488 CopyKernel(InputPortalType inputPortal,
489 OutputPortalType outputPortal,
492 : InputPortal(inputPortal)
493 , OutputPortal(outputPortal)
494 , InputOffset(inputOffset)
495 , OutputOffset(outputOffset)
502 using ValueType =
typename OutputPortalType::ValueType;
503 this->OutputPortal.Set(
504 index + this->OutputOffset,
505 static_cast<ValueType
>(this->InputPortal.Get(index + this->InputOffset)));
509 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
512 template <
typename BitsPortal>
515 using WordType =
typename BitsPortal::WordTypePreferred;
522 CacheLineSize /
static_cast<viskores::Id>(
sizeof(WordType));
523 static constexpr
viskores::Id CacheLinesPerInstance = 2;
524 static constexpr
viskores::Id WordsPerInstance = CacheLinesPerInstance * WordsPerCacheLine;
527 CountSetBitsFunctor(
const BitsPortal& input, std::atomic<viskores::UInt64>& popCount)
530 , FinalWordIndex{ input.GetNumberOfWords() - 1 }
531 , FinalWordMask{ input.GetFinalWordMask() }
537 const auto numWords = this->Input.GetNumberOfWords();
538 return (numWords + WordsPerInstance - 1) / WordsPerInstance;
543 const viskores::Id numWords = this->Input.GetNumberOfWords();
544 const viskores::Id wordStart = viskores::Min(instanceIdx * WordsPerInstance, numWords);
545 const viskores::Id wordEnd = viskores::Min(wordStart + WordsPerInstance, numWords);
547 if (wordStart != wordEnd)
549 this->ExecuteRange(wordStart, wordEnd);
555 return PopCount.load(std::memory_order_relaxed);
561 #ifndef VISKORES_CUDA_DEVICE_PASS // for std::atomic call from VISKORES_EXEC function:
564 this->PopCount.fetch_add(chunkBits, std::memory_order_relaxed);
574 const bool isFinalChunk = wordEnd == (this->FinalWordIndex + 1);
578 wordEnd = this->FinalWordIndex;
597 std::atomic<viskores::UInt64>& PopCount;
600 WordType FinalWordMask{ 0 };
607 template <
typename WordType,
typename =
typename std::enable_if<(sizeof(WordType) >= 4)>::type>
608 static constexpr
VISKORES_CONT WordType RepeatTo32BitsIfNeeded(WordType pattern)
622 return RepeatTo32BitsIfNeeded(
static_cast<viskores::UInt16>(pattern << 8 | pattern));
625 template <
typename BitsPortal,
typename WordType>
629 FillBitFieldFunctor(
const BitsPortal& portal, WordType mask)
637 this->Portal.SetWord(wordIdx, this->Mask);
645 template <
typename PortalType>
648 using ValueType =
typename PortalType::ValueType;
651 FillArrayHandleFunctor(
const PortalType& portal, ValueType value)
664 template <
typename Iterator,
typename IteratorTag>
670 for (
auto it = from; it != to; ++it)
677 template <
typename Iterator>
680 std::random_access_iterator_tag)
685 #if defined(VISKORES_HIP)
687 template <
typename Iterator>
688 __host__
static inline viskores::Id IteratorDistance(
const Iterator& from,
const Iterator& to)
690 return static_cast<viskores::Id>(std::distance(from, to));
693 template <
typename Iterator>
694 __device__
static inline viskores::Id IteratorDistance(
const Iterator& from,
const Iterator& to)
696 return IteratorDistanceImpl(
697 from, to,
typename std::iterator_traits<Iterator>::iterator_category{});
702 template <
typename Iterator>
705 #ifndef VISKORES_CUDA_DEVICE_PASS
706 return static_cast<viskores::Id>(std::distance(from, to));
708 return IteratorDistanceImpl(
709 from, to,
typename std::iterator_traits<Iterator>::iterator_category{});
715 template <
class InputPortalType,
class ValuesPortalType,
class OutputPortalType>
716 struct LowerBoundsKernel
718 InputPortalType InputPortal;
719 ValuesPortalType ValuesPortal;
720 OutputPortalType OutputPortal;
723 LowerBoundsKernel(InputPortalType inputPortal,
724 ValuesPortalType valuesPortal,
725 OutputPortalType outputPortal)
726 : InputPortal(inputPortal)
727 , ValuesPortal(valuesPortal)
728 , OutputPortal(outputPortal)
744 InputIteratorsType inputIterators(this->InputPortal);
746 inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index));
748 viskores::Id resultIndex = IteratorDistance(inputIterators.GetBegin(), resultPos);
749 this->OutputPortal.Set(index, resultIndex);
753 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
756 template <
class InputPortalType,
757 class ValuesPortalType,
758 class OutputPortalType,
760 struct LowerBoundsComparisonKernel
762 InputPortalType InputPortal;
763 ValuesPortalType ValuesPortal;
764 OutputPortalType OutputPortal;
765 BinaryCompare CompareFunctor;
768 LowerBoundsComparisonKernel(InputPortalType inputPortal,
769 ValuesPortalType valuesPortal,
770 OutputPortalType outputPortal,
771 BinaryCompare binary_compare)
772 : InputPortal(inputPortal)
773 , ValuesPortal(valuesPortal)
774 , OutputPortal(outputPortal)
775 , CompareFunctor(binary_compare)
791 InputIteratorsType inputIterators(this->InputPortal);
793 inputIterators.GetEnd(),
794 this->ValuesPortal.Get(index),
795 this->CompareFunctor);
797 viskores::Id resultIndex = IteratorDistance(inputIterators.GetBegin(), resultPos);
798 this->OutputPortal.Set(index, resultIndex);
802 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
805 template <
typename PortalType>
806 struct SetConstantKernel
808 using ValueType =
typename PortalType::ValueType;
813 SetConstantKernel(
const PortalType& portal, ValueType value)
821 void operator()(
viskores::Id index)
const { this->Portal.Set(index, this->Value); }
824 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
827 template <
typename PortalType,
typename BinaryCompare>
831 BinaryCompare Compare;
835 BitonicSortMergeKernel(
const PortalType& portal,
836 const BinaryCompare& compare,
840 , GroupSize(groupSize)
848 using ValueType =
typename PortalType::ValueType;
854 viskores::Id lowIndex = blockIndex * blockSize + groupIndex;
857 if (highIndex < this->Portal.GetNumberOfValues())
859 ValueType lowValue = this->Portal.Get(lowIndex);
860 ValueType highValue = this->Portal.Get(highIndex);
861 if (this->Compare(highValue, lowValue))
863 this->Portal.Set(highIndex, lowValue);
864 this->Portal.Set(lowIndex, highValue);
870 template <
typename PortalType,
typename BinaryCompare>
874 BinaryCompare Compare;
878 BitonicSortCrossoverKernel(
const PortalType& portal,
879 const BinaryCompare& compare,
883 , GroupSize(groupSize)
891 using ValueType =
typename PortalType::ValueType;
897 viskores::Id lowIndex = blockIndex * blockSize + groupIndex;
898 viskores::Id highIndex = blockIndex * blockSize + (blockSize - groupIndex - 1);
900 if (highIndex < this->Portal.GetNumberOfValues())
902 ValueType lowValue = this->Portal.Get(lowIndex);
903 ValueType highValue = this->Portal.Get(highIndex);
904 if (this->Compare(highValue, lowValue))
906 this->Portal.Set(highIndex, lowValue);
907 this->Portal.Set(lowIndex, highValue);
913 template <
class StencilPortalType,
class OutputPortalType,
class UnaryPredicate>
914 struct StencilToIndexFlagKernel
916 using StencilValueType =
typename StencilPortalType::ValueType;
917 StencilPortalType StencilPortal;
918 OutputPortalType OutputPortal;
919 UnaryPredicate Predicate;
922 StencilToIndexFlagKernel(StencilPortalType stencilPortal,
923 OutputPortalType outputPortal,
924 UnaryPredicate unary_predicate)
925 : StencilPortal(stencilPortal)
926 , OutputPortal(outputPortal)
927 , Predicate(unary_predicate)
935 StencilValueType value = this->StencilPortal.Get(index);
936 this->OutputPortal.Set(index, this->Predicate(value) ? 1 : 0);
940 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
943 template <
class InputPortalType,
944 class StencilPortalType,
945 class IndexPortalType,
946 class OutputPortalType,
947 class PredicateOperator>
950 InputPortalType InputPortal;
951 StencilPortalType StencilPortal;
952 IndexPortalType IndexPortal;
953 OutputPortalType OutputPortal;
954 PredicateOperator Predicate;
957 CopyIfKernel(InputPortalType inputPortal,
958 StencilPortalType stencilPortal,
959 IndexPortalType indexPortal,
960 OutputPortalType outputPortal,
961 PredicateOperator unary_predicate)
962 : InputPortal(inputPortal)
963 , StencilPortal(stencilPortal)
964 , IndexPortal(indexPortal)
965 , OutputPortal(outputPortal)
966 , Predicate(unary_predicate)
974 using StencilValueType =
typename StencilPortalType::ValueType;
975 StencilValueType stencilValue = this->StencilPortal.Get(index);
976 if (Predicate(stencilValue))
978 viskores::Id outputIndex = this->IndexPortal.Get(index);
980 using OutputValueType =
typename OutputPortalType::ValueType;
981 OutputValueType value = this->InputPortal.Get(index);
983 this->OutputPortal.Set(outputIndex, value);
988 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
991 template <
class InputPortalType,
class StencilPortalType>
992 struct ClassifyUniqueKernel
994 InputPortalType InputPortal;
995 StencilPortalType StencilPortal;
998 ClassifyUniqueKernel(InputPortalType inputPortal, StencilPortalType stencilPortal)
999 : InputPortal(inputPortal)
1000 , StencilPortal(stencilPortal)
1008 using ValueType =
typename StencilPortalType::ValueType;
1012 this->StencilPortal.Set(index, ValueType(1));
1016 ValueType flag = ValueType(this->InputPortal.Get(index - 1) != this->InputPortal.Get(index));
1017 this->StencilPortal.Set(index, flag);
1022 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
1025 template <
class InputPortalType,
class StencilPortalType,
class BinaryCompare>
1026 struct ClassifyUniqueComparisonKernel
1028 InputPortalType InputPortal;
1029 StencilPortalType StencilPortal;
1030 BinaryCompare CompareFunctor;
1033 ClassifyUniqueComparisonKernel(InputPortalType inputPortal,
1034 StencilPortalType stencilPortal,
1035 BinaryCompare binary_compare)
1036 : InputPortal(inputPortal)
1037 , StencilPortal(stencilPortal)
1038 , CompareFunctor(binary_compare)
1046 using ValueType =
typename StencilPortalType::ValueType;
1050 this->StencilPortal.Set(index, ValueType(1));
1056 !(this->CompareFunctor(this->InputPortal.Get(index - 1), this->InputPortal.Get(index)));
1057 ValueType flag = ValueType(same);
1058 this->StencilPortal.Set(index, flag);
1063 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
1066 template <
class InputPortalType,
class ValuesPortalType,
class OutputPortalType>
1067 struct UpperBoundsKernel
1069 InputPortalType InputPortal;
1070 ValuesPortalType ValuesPortal;
1071 OutputPortalType OutputPortal;
1074 UpperBoundsKernel(InputPortalType inputPortal,
1075 ValuesPortalType valuesPortal,
1076 OutputPortalType outputPortal)
1077 : InputPortal(inputPortal)
1078 , ValuesPortal(valuesPortal)
1079 , OutputPortal(outputPortal)
1095 InputIteratorsType inputIterators(this->InputPortal);
1097 inputIterators.GetBegin(), inputIterators.GetEnd(), this->ValuesPortal.Get(index));
1099 viskores::Id resultIndex = IteratorDistance(inputIterators.GetBegin(), resultPos);
1100 this->OutputPortal.Set(index, resultIndex);
1104 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
1107 template <
class InputPortalType,
1108 class ValuesPortalType,
1109 class OutputPortalType,
1110 class BinaryCompare>
1111 struct UpperBoundsKernelComparisonKernel
1113 InputPortalType InputPortal;
1114 ValuesPortalType ValuesPortal;
1115 OutputPortalType OutputPortal;
1116 BinaryCompare CompareFunctor;
1119 UpperBoundsKernelComparisonKernel(InputPortalType inputPortal,
1120 ValuesPortalType valuesPortal,
1121 OutputPortalType outputPortal,
1122 BinaryCompare binary_compare)
1123 : InputPortal(inputPortal)
1124 , ValuesPortal(valuesPortal)
1125 , OutputPortal(outputPortal)
1126 , CompareFunctor(binary_compare)
1142 InputIteratorsType inputIterators(this->InputPortal);
1144 inputIterators.GetEnd(),
1145 this->ValuesPortal.Get(index),
1146 this->CompareFunctor);
1148 viskores::Id resultIndex = IteratorDistance(inputIterators.GetBegin(), resultPos);
1149 this->OutputPortal.Set(index, resultIndex);
1153 void SetErrorMessageBuffer(
const viskores::exec::internal::ErrorMessageBuffer&) {}
1156 template <
typename InPortalType,
typename OutPortalType,
typename BinaryFunctor>
1159 using ValueType =
typename InPortalType::ValueType;
1161 InPortalType InPortal;
1162 OutPortalType OutPortal;
1163 BinaryFunctor BinaryOperator;
1164 ValueType InitialValue;
1167 InclusiveToExclusiveKernel(
const InPortalType& inPortal,
1168 const OutPortalType& outPortal,
1169 BinaryFunctor& binaryOperator,
1170 ValueType initialValue)
1171 : InPortal(inPortal)
1172 , OutPortal(outPortal)
1173 , BinaryOperator(binaryOperator)
1174 , InitialValue(initialValue)
1182 const ValueType result = (index == 0)
1183 ? this->InitialValue
1184 : this->BinaryOperator(this->InitialValue, this->InPortal.Get(index - 1));
1186 this->OutPortal.Set(index, result);
1190 template <
typename InPortalType,
typename OutPortalType,
typename BinaryFunctor>
1193 using ValueType =
typename InPortalType::ValueType;
1195 InPortalType InPortal;
1196 OutPortalType OutPortal;
1197 BinaryFunctor BinaryOperator;
1198 ValueType InitialValue;
1199 ValueType FinalValue;
1202 InclusiveToExtendedKernel(
const InPortalType& inPortal,
1203 const OutPortalType& outPortal,
1204 BinaryFunctor& binaryOperator,
1205 ValueType initialValue,
1206 ValueType finalValue)
1207 : InPortal(inPortal)
1208 , OutPortal(outPortal)
1209 , BinaryOperator(binaryOperator)
1210 , InitialValue(initialValue)
1211 , FinalValue(finalValue)
1221 const ValueType result = (index == 0) ? this->InitialValue
1222 : (index == this->InPortal.GetNumberOfValues())
1224 : this->BinaryOperator(this->InitialValue, this->InPortal.Get(index - 1));
1226 this->OutPortal.Set(index, result);
1230 template <
typename PortalType,
typename BinaryFunctor>
1234 BinaryFunctor BinaryOperator;
1240 ScanKernel(
const PortalType& portal,
1241 BinaryFunctor binary_functor,
1245 , BinaryOperator(binary_functor)
1248 , Distance(stride / 2)
1256 using ValueType =
typename PortalType::ValueType;
1258 viskores::Id leftIndex = this->Offset + index * this->Stride;
1261 if (rightIndex < this->Portal.GetNumberOfValues())
1263 ValueType leftValue = this->Portal.Get(leftIndex);
1264 ValueType rightValue = this->Portal.Get(rightIndex);
1265 this->Portal.Set(rightIndex, BinaryOperator(leftValue, rightValue));
1270 template <
typename InPortalType1,
1271 typename InPortalType2,
1272 typename OutPortalType,
1273 typename BinaryFunctor>
1276 InPortalType1 InPortal1;
1277 InPortalType2 InPortal2;
1278 OutPortalType OutPortal;
1279 BinaryFunctor BinaryOperator;
1282 BinaryTransformKernel(
const InPortalType1& inPortal1,
1283 const InPortalType2& inPortal2,
1284 const OutPortalType& outPortal,
1285 BinaryFunctor binaryOperator)
1286 : InPortal1(inPortal1)
1287 , InPortal2(inPortal2)
1288 , OutPortal(outPortal)
1289 , BinaryOperator(binaryOperator)
1297 this->OutPortal.Set(
1298 index, this->BinaryOperator(this->InPortal1.Get(index), this->InPortal2.Get(index)));
1305 #endif //viskores_cont_internal_FunctorsGeneral_h