OpenVDB 11.0.0

Loading...
Searching...
No Matches
Namespaces | Functions
Reduce.h File Reference

A unified wrapper for tbb::parallel_reduce and a naive std::future analog. More...

`#include "Range.h"`
`#include <thread>`
`#include <future>`
`#include <vector>`

Go to the source code of this file.

## Namespaces
namespace | nanovdb
| Convert a base-pointer to an openvdb grid, denoted srcGrid, to a nanovdb grid of the same type, e.g. float -> float or openvdb::Vec3f -> nanovdb::Vec3f.

## Functions
template<typename RangeT , typename T , typename FuncT , typename JoinT >
T | reduce (RangeT range, const T &identity, const FuncT &func, const JoinT &join)
template<typename T , typename FuncT , typename JoinT >
T | reduce (size_t begin, size_t end, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join)
| Simple wrapper to the function defined above.
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT >
T | reduce (const ContainerT< ArgT... > &c, const T &identity, const FuncT &func, const JoinT &join)
| Simple wrapper that works with std::containers.
template<template< typename... > class ContainerT, typename... ArgT, typename T , typename FuncT , typename JoinT >
T | reduce (const ContainerT< ArgT... > &c, size_t grainSize, const T &identity, const FuncT &func, const JoinT &join)
| Simple wrapper that works with std::containers.

## Detailed Description

A unified wrapper for tbb::parallel_reduce and a naive std::future analog.

Author
  Ken Museth

Date
  March 4, 2021