Loading...
Searching...
No Matches
Parallel.hpp
Go to the documentation of this file.
1// This code is based on Jet framework.
2// Copyright (c) 2018 Doyub Kim
3// CubbyFlow is voxel-based fluid simulation engine for computer games.
4// Copyright (c) 2020 CubbyFlow Team
5// Core Part: Chris Ohk, Junwoo Hwang, Jihong Sin, Seungwoo Yoo
6// AI Part: Dongheon Cho, Minseo Kim
7// We are making my contributions/submissions to this project solely in our
8// personal capacity and are not conveying any rights to any intellectual
9// property of any third parties.
10
11#ifndef CUBBYFLOW_PARALLEL_HPP
12#define CUBBYFLOW_PARALLEL_HPP
13
14namespace CubbyFlow
15{
18{
19 Serial,
21};
22
38template <typename RandomIterator, typename T>
39void ParallelFill(const RandomIterator& begin, const RandomIterator& end,
40 const T& value,
42
58template <typename IndexType, typename Function>
60 const Function& function,
62
80template <typename IndexType, typename Function>
82 const Function& function,
84
103template <typename IndexType, typename Function>
106 const Function& function,
108
128template <typename IndexType, typename Function>
131 const Function& function,
133
154template <typename IndexType, typename Function>
158 const Function& function,
160
182template <typename IndexType, typename Function>
186 const Function& function,
188
206template <typename IndexType, typename Value, typename Function,
207 typename Reduce>
209 const Value& identity, const Function& function,
210 const Reduce& reduce,
212
224template <typename RandomIterator>
227
243template <typename RandomIterator, typename CompareFunction>
247
250
253} // namespace CubbyFlow
254
256
257#endif
Definition Matrix.hpp:30
Definition pybind11Utils.hpp:21
void ParallelSort(RandomIterator begin, RandomIterator end, ExecutionPolicy policy)
Sorts a container in parallel.
Definition Parallel-Impl.hpp:523
void ParallelFill(const RandomIterator &begin, const RandomIterator &end, const T &value, ExecutionPolicy policy)
Fills from begin to end with value in parallel.
Definition Parallel-Impl.hpp:191
void SetMaxNumberOfThreads(unsigned int numThreads)
Sets maximum number of threads to use.
void ParallelFor(IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy)
Makes a for-loop from beginIndex to endIndex in parallel.
Definition Parallel-Impl.hpp:212
Matrix< T, Rows, 1 > Vector
Definition Matrix.hpp:738
unsigned int GetMaxNumberOfThreads()
Returns maximum number of threads to use.
void ParallelRangeFor(IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy)
Makes a range-loop from beginIndex to endIndex in parallel.
Definition Parallel-Impl.hpp:307
Value ParallelReduce(IndexType beginIndex, IndexType endIndex, const Value &identity, const Function &function, const Reduce &reduce, ExecutionPolicy policy)
Performs reduce operation in parallel.
Definition Parallel-Impl.hpp:436
ExecutionPolicy
Execution policy tag.
Definition Parallel.hpp:18