Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
concurrent.h
Go to the documentation of this file.
1#pragma once
2
3#include <cstddef>
4#include <functional>
5
6namespace ph
7{
8
9class FixedSizeThreadPool;
10
17void parallel_work(
18 const std::size_t numWorkers,
19
20 std::function<
21 void(std::size_t workerIdx)
22 > work);
23
32void parallel_work(
33 const std::size_t totalWorkSize,
34 const std::size_t numWorkers,
35
36 std::function<
37 void(std::size_t workerIdx, std::size_t workBegin, std::size_t workEnd)
38 > work);
39
48void parallel_work(
49 FixedSizeThreadPool& workers,
50 const std::size_t totalWorkSize,
51
52 std::function<
53 void(std::size_t workerIdx, std::size_t workBegin, std::size_t workEnd)
54 > work);
55
56}// end namespace ph
The root for all renderer implementations.
Definition EEngineProject.h:6
void parallel_work(const std::size_t numWorkers, std::function< void(std::size_t workerIdx) > work)
Runs specified works in parallel. The function will block the calling thread until all works are comp...
Definition concurrent.cpp:14