vSMC
vSMC: Scalable Monte Carlo
Public Member Functions | Static Public Member Functions | List of all members
vsmc::ThreadNum Class Reference

Number of threads used by algorithms. More...

#include <vsmc/thread/thread_num.hpp>

Public Member Functions

template<typename Range >
std::vector< Range > partition (const Range &range) const
 
std::size_t thread_num () const
 
std::size_t thread_num (std::size_t num)
 Set a new number of threads, return the old number. More...
 

Static Public Member Functions

static ThreadNum & instance ()
 

Detailed Description

Number of threads used by algorithms.

Definition at line 42 of file thread_num.hpp.

Member Function Documentation

static ThreadNum& vsmc::ThreadNum::instance ( )
inlinestatic

Definition at line 46 of file thread_num.hpp.

template<typename Range >
std::vector<Range> vsmc::ThreadNum::partition ( const Range &  range) const
inline

Definition at line 65 of file thread_num.hpp.

std::size_t vsmc::ThreadNum::thread_num ( ) const
inline

Definition at line 53 of file thread_num.hpp.

std::size_t vsmc::ThreadNum::thread_num ( std::size_t  num)
inline

Set a new number of threads, return the old number.

Definition at line 56 of file thread_num.hpp.