50 lines
1.7 KiB
C++
50 lines
1.7 KiB
C++
#ifndef _TRISKELE_DEAL_THREADS_HPP
|
|
#define _TRISKELE_DEAL_THREADS_HPP
|
|
|
|
#ifdef INTEL_TBB_THREAD
|
|
#include <tbb/tbb.h>
|
|
#endif
|
|
#include <boost/thread.hpp>
|
|
|
|
#include "triskeleDebug.hpp"
|
|
|
|
namespace triskele {
|
|
|
|
template<typename DimImg, typename FunctId>
|
|
inline void
|
|
dealThreadRange (const DimImg &maxId, const unsigned int &coreCount, const FunctId &functId/* functId (id) */);
|
|
|
|
template<typename DimImg, typename FunctThreadId>
|
|
inline void
|
|
dealThreadThreadRange (const DimImg &maxId, const unsigned int &coreCount, const FunctThreadId &functThreadId/* functThreadId (threadId, id) */);
|
|
|
|
template<typename DimImg, typename FunctMinMax>
|
|
inline void
|
|
dealThreadBound (const DimImg &maxId, const unsigned int &coreCount, const FunctMinMax &functMinMax/* functMinMax (minVal, maxVal) */);
|
|
|
|
template<typename DimImg>
|
|
inline std::vector<DimImg>
|
|
getDealThreadBounds (const DimImg &maxId, const unsigned int &coreCount);
|
|
|
|
template<typename DimImg, typename FunctThreadMinMax>
|
|
inline void
|
|
dealThread (const DimImg &maxId, unsigned int coreCount, const FunctThreadMinMax &functThreadMinMax/* functThreadMinMax (threadId, minVal, maxVal) */);
|
|
|
|
template <typename DimImg, class OutputIterator, class T>
|
|
inline void
|
|
dealThreadFill_n (const DimImg &maxId, unsigned int coreCount, OutputIterator first, const T& val);
|
|
|
|
template<typename DimImg, typename WeightT, typename WeightFunct, typename CmpFunct, typename CallFunct>
|
|
inline void
|
|
callOnSortedSets (const std::vector<DimImg> &sizes,
|
|
const WeightFunct &getWeight/* getWeight (vectId, itemId) */,
|
|
CmpFunct isWeightInf/* isWeightInf (w1, w2) */,
|
|
const CallFunct &callIdId/* callIdId (vectId, itemId) */);
|
|
|
|
#include "triskeleDealThreads.tpp"
|
|
|
|
} // triskele
|
|
|
|
|
|
#endif // _TRISKELE_DEAL_THREADS_HPP
|