26 template<
typename T>
static std::optional<MinMaxResult<T>>
min_max(
Span<T> values)
37 MinMaxResult<T> result = init;
38 for (const int i : range) {
39 math::min_max(values[i], result.min, result.max);
43 [](
const MinMaxResult<T> &
a,
const MinMaxResult<T> &
b) {
52 template<
typename T,
typename RadiusT>
65 MinMaxResult<T> result = init;
66 for (const int i : range) {
67 result.min = math::min(values[i] - radii[i], result.min);
68 result.max = math::max(values[i] + radii[i], result.max);
72 [](
const MinMaxResult<T> &
a,
const MinMaxResult<T> &
b) {
constexpr const T & first() const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
static std::optional< MinMaxResult< T > > min_max(Span< T > values)
static std::optional< MinMaxResult< T > > min_max_with_radii(Span< T > values, Span< RadiusT > radii)
T min(const T &a, const T &b)
T max(const T &a, const T &b)
Value parallel_reduce(IndexRange range, int64_t grain_size, const Value &identity, const Function &function, const Reduction &reduction)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
MutableSpan< float > radii