14#ifndef NANOVDB_FOREACH_H_HAS_BEEN_INCLUDED
15#define NANOVDB_FOREACH_H_HAS_BEEN_INCLUDED
20#include <tbb/parallel_for.h>
39template <
typename RangeT,
typename FuncT>
42 if (range.empty())
return;
44 tbb::parallel_for(range,
func);
46 if (
const size_t threadCount = std::thread::hardware_concurrency()>>1) {
66template <
typename FuncT>
73template <
template<
typename...>
class ContainerT,
typename... T,
typename FuncT>
80template <
template<
typename...>
class ContainerT,
typename... T,
typename FuncT>
Custom Range class that is compatible with the tbb::blocked_range classes.
Definition DenseGrid.h:402
uint64_t size() const
Returns the size in bytes of the raw memory buffer managed by this DenseGridHandle's allocator.
Definition DenseGrid.h:440
void forEach(RangeT range, const FuncT &func)
simple wrapper for tbb::parallel_for with a naive std fallback
Definition ForEach.h:40
Range< 1, size_t > Range1D
Definition Range.h:30