OmniSciDB  2e3a973ef4
Intervals.h File Reference
#include <limits>
#include <type_traits>
+ Include dependency graph for Intervals.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Interval< T >
 
class  Intervals< T >
 
class  Intervals< T >::Iterator
 

Functions

template<typename T >
Intervals< T > makeIntervals (T begin, T end, std::size_t n_workers)
 

Function Documentation

◆ makeIntervals()

template<typename T >
Intervals<T> makeIntervals ( begin,
end,
std::size_t  n_workers 
)

Definition at line 108 of file Intervals.h.

References Interval< T >::begin, Interval< T >::end, run_benchmark_import::type, and Unsigned.

Referenced by Intervals< T >::end(), ColumnarResults::materializeAllColumnsThroughIteration(), and ColumnarResults::materializeAllLazyColumns().

108  {
109  using Unsigned = typename std::make_unsigned<T>::type;
110  if constexpr (sizeof(Unsigned) < sizeof(std::size_t)) {
111  if (std::numeric_limits<Unsigned>::max() < n_workers) {
112  n_workers = std::numeric_limits<Unsigned>::max();
113  }
114  }
115  return {begin, end, static_cast<Unsigned>(n_workers)};
116 }
+ Here is the caller graph for this function: