Parallel-Impl.hpp File Reference
#include <Core/Utils/Constants.hpp>
#include <Core/Utils/Parallel.hpp>
#include <algorithm>
#include <cmath>
#include <future>
#include <vector>

Go to the source code of this file.

Namespaces

 CubbyFlow
 
 CubbyFlow::Internal
 

Typedefs

template<typename Task >
using CubbyFlow::Internal::future = std::future< Task >
 
template<typename TASK >
using CubbyFlow::Internal::operator_return_t = typename std::invoke_result_t< TASK >
 

Functions

template<typename TASK >
auto CubbyFlow::Internal::Async (TASK &&fn) -> future< operator_return_t< TASK >>
 
template<typename RandomIterator , typename RandomIterator2 , typename CompareFunction >
void CubbyFlow::Internal::Merge (RandomIterator a, size_t size, RandomIterator2 temp, CompareFunction compareFunction)
 
template<typename RandomIterator , typename RandomIterator2 , typename CompareFunction >
void CubbyFlow::Internal::ParallelMergeSort (RandomIterator a, size_t size, RandomIterator2 temp, unsigned int numThreads, CompareFunction compareFunction)
 
template<typename RandomIterator , typename T >
void CubbyFlow::ParallelFill (const RandomIterator &begin, const RandomIterator &end, const T &value, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Fills from begin to end with value in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelFor (IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a for-loop from beginIndex to endIndex in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelRangeFor (IndexType beginIndex, IndexType endIndex, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a range-loop from beginIndex to endIndex in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelFor (IndexType beginIndexX, IndexType endIndexX, IndexType beginIndexY, IndexType endIndexY, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a 2D nested for-loop in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelRangeFor (IndexType beginIndexX, IndexType endIndexX, IndexType beginIndexY, IndexType endIndexY, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a 2D nested range-loop in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelFor (IndexType beginIndexX, IndexType endIndexX, IndexType beginIndexY, IndexType endIndexY, IndexType beginIndexZ, IndexType endIndexZ, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a 3D nested for-loop in parallel. More...
 
template<typename IndexType , typename Function >
void CubbyFlow::ParallelRangeFor (IndexType beginIndexX, IndexType endIndexX, IndexType beginIndexY, IndexType endIndexY, IndexType beginIndexZ, IndexType endIndexZ, const Function &function, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Makes a 3D nested range-loop in parallel. More...
 
template<typename IndexType , typename Value , typename Function , typename Reduce >
Value CubbyFlow::ParallelReduce (IndexType beginIndex, IndexType endIndex, const Value &identity, const Function &function, const Reduce &reduce, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Performs reduce operation in parallel. More...
 
template<typename RandomIterator >
void CubbyFlow::ParallelSort (RandomIterator begin, RandomIterator end, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Sorts a container in parallel. More...
 
template<typename RandomIterator , typename CompareFunction >
void CubbyFlow::ParallelSort (RandomIterator begin, RandomIterator end, CompareFunction compare, ExecutionPolicy policy=ExecutionPolicy::Parallel)
 Sorts a container in parallel with a custom compare function. More...