CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::ThreadPartitioner Class Reference

A partitioner that splits the ranges until it identifies we are not moving to new threads. More...

#include <CeresEngine/Foundation/Algorithm/Partitioner.hpp>

Public Member Functions

 ThreadPartitioner (const std::size_t minimumGrainSize, const std::size_t occupancy=hardware_concurrency())
 
template<typename I , typename S >
auto operator() (I first, S last)
 

Private Attributes

std::size_t mMinimumGrainSize
 
std::size_t mThreadCount {hardware_concurrency()}
 

Detailed Description

A partitioner that splits the ranges until it identifies we are not moving to new threads.

This partitioner splits the ranges until it identifies we are not moving to new threads. Apart from that, it behaves as a HalvePartitioner, splitting the range up to a minimum grain size.

Constructor & Destructor Documentation

◆ ThreadPartitioner()

CeresEngine::ThreadPartitioner::ThreadPartitioner ( const std::size_t  minimumGrainSize,
const std::size_t  occupancy = hardware_concurrency() 
)
inlineexplicit

Member Function Documentation

◆ operator()()

template<typename I , typename S >
auto CeresEngine::ThreadPartitioner::operator() ( I  first,
S  last 
)
inline

Member Data Documentation

◆ mMinimumGrainSize

std::size_t CeresEngine::ThreadPartitioner::mMinimumGrainSize
private

◆ mThreadCount

std::size_t CeresEngine::ThreadPartitioner::mThreadCount {hardware_concurrency()}
private

The documentation for this class was generated from the following file: