Go to the documentation of this file.
19 #ifndef viskores_LowerBound_h
20 #define viskores_LowerBound_h
37 template <
typename IterT,
typename T,
typename Comp>
40 #if defined(VISKORES_CUDA) || defined(VISKORES_HIP)
41 auto len = last - first;
44 const auto halfLen = len / 2;
45 IterT mid = first + halfLen;
57 #else // VISKORES_CUDA || VISKORES_HIP
58 return std::lower_bound(first, last, val, std::move(comp));
59 #endif // VISKORES_CUDA || VISKORES_HIP
62 template <
typename IterT,
typename T>
68 template <
typename PortalT,
typename T,
typename Comp>
77 template <
typename PortalT,
typename T>
89 #endif // viskores_LowerBound_h
Binary Predicate that takes two arguments argument x, and y and returns True if and only if x is less...
Definition: BinaryPredicates.h:53
IterT LowerBound(IterT first, IterT last, const T &val, Comp comp)
Implementation of std::lower_bound that is appropriate for both control and execution environments.
Definition: LowerBound.h:38
viskores::cont::ArrayPortalToIterators< PortalType >::IteratorType ArrayPortalToIteratorEnd(const PortalType &portal)
Convenience function for converting an ArrayPortal to an end iterator.
Definition: ArrayPortalToIterators.h:200
#define VISKORES_EXEC_CONT
Definition: ExportMacros.h:60
viskores::Int64 Id
Base type to use to index arrays.
Definition: Types.h:235
Groups connected points that have the same field value.
Definition: Atomic.h:27
viskores::cont::ArrayPortalToIterators< PortalType >::IteratorType ArrayPortalToIteratorBegin(const PortalType &portal)
Convenience function for converting an ArrayPortal to a begin iterator.
Definition: ArrayPortalToIterators.h:189