openGPMP
Open Source Mathematics Package
Classes | Namespaces | Macros | Functions
threads.hpp File Reference

openGPMP Thread Pool More...

#include <condition_variable>
#include <functional>
#include <future>
#include <mutex>
#include <queue>
#include <thread>
#include <vector>

Go to the source code of this file.

Classes

class  gpmp::core::ThreadPool
 
class  gpmp::core::ThreadDispatch
 A class that provides a function to dispatch a function call to a thread pool and return a future object for obtaining the result. More...
 

Namespaces

 gpmp
 The source C++ openGPMP namespace.
 
 gpmp::core
 

Macros

#define PARALLEL_FOR_BEGIN(nb_elements)   gpmp::core::parallel_for(nb_elements, [&](int start, int end){ for(int i = start; i < end; ++i)
 Marcro defs for parallelized for loops. More...
 
#define PARALLEL_FOR_END()    })
 

Functions

static void gpmp::core::parallel_for (unsigned nb_elements, std::function< void(int start, int end)> functor, bool use_threads=true)
 Thread rudimentary for loops. More...
 

Detailed Description

openGPMP Thread Pool

Definition in file threads.hpp.

Macro Definition Documentation

◆ PARALLEL_FOR_BEGIN

#define PARALLEL_FOR_BEGIN (   nb_elements)    gpmp::core::parallel_for(nb_elements, [&](int start, int end){ for(int i = start; i < end; ++i)

Marcro defs for parallelized for loops.

Definition at line 52 of file threads.hpp.

◆ PARALLEL_FOR_END

#define PARALLEL_FOR_END ( )     })

Definition at line 53 of file threads.hpp.