SHOGUN  4.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
List of all members | Public Member Functions
Parallel Class Reference

Detailed Description

Class Parallel provides helper functions for multithreading.

For example it can be used to determine the number of CPU cores in your computer and is the place where you define the number of CPUs that shall be used in computations.

Definition at line 27 of file Parallel.h.

Public Member Functions

 Parallel ()
 
 Parallel (const Parallel &orig)
 
virtual ~Parallel ()
 
int32_t get_num_cpus () const
 
void set_num_threads (int32_t n)
 
int32_t get_num_threads () const
 
int32_t ref ()
 
int32_t ref_count () const
 
int32_t unref ()
 

Constructor & Destructor Documentation

Parallel ( )

constructor

Definition at line 26 of file Parallel.cpp.

Parallel ( const Parallel orig)

copy constructor

Definition at line 32 of file Parallel.cpp.

~Parallel ( )
virtual

destructor

Definition at line 38 of file Parallel.cpp.

Member Function Documentation

int32_t get_num_cpus ( ) const

get num of cpus

Returns
number of CPUs

Definition at line 43 of file Parallel.cpp.

int32_t get_num_threads ( ) const

get number of threads

Returns
number of threads

Definition at line 64 of file Parallel.cpp.

int32_t ref ( )

ref

Returns
current ref counter

Definition at line 69 of file Parallel.cpp.

int32_t ref_count ( ) const

get ref count

Returns
current ref counter

Definition at line 74 of file Parallel.cpp.

void set_num_threads ( int32_t  n)

set number of threads

Parameters
nnumber of threads

Definition at line 56 of file Parallel.cpp.

int32_t unref ( )

unref

Returns
current ref counter

Definition at line 79 of file Parallel.cpp.


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

SHOGUN Machine Learning Toolbox - Documentation