eLynx SDK
v3.0.1 C++ image processing API reference |
#include <ParallelAlgorithms.h>
Public Member Functions | |
IterationRange (size_t iBegin, size_t iEnd, size_t iGrainSize=1, size_t iMinSize=1, ESubRangePosition iPosition=SRP_ALL) | |
IterationRange | Split (size_t iCount) |
bool | IsEmpty () const |
bool | IsSplitable () const |
size_t | GetBegin () const |
size_t | GetEnd () const |
bool | IsFirst () const |
bool | IsMiddle () const |
bool | IsLast () const |
bool | IsAll () const |
Friends | |
class | IterationRangeTask |
Definition at line 45 of file ParallelAlgorithms.h.
eLynx::IterationRange::IterationRange | ( | size_t | iBegin, | |
size_t | iEnd, | |||
size_t | iGrainSize = 1 , |
|||
size_t | iMinSize = 1 , |
|||
ESubRangePosition | iPosition = SRP_ALL | |||
) |
Constructor. [iBegin, iEnd) must represent a valid range.
iBegin | first range element. | |
iEnd | last range element. | |
iGrainSize | iEnd - iBegin after the split must be divisible by iGrainSize. | |
iMinSize | - minimal interval size. | |
iPosition | sub range position inside the original Iteration range. |
IterationRange eLynx::IterationRange::Split | ( | size_t | iCount | ) |
Split current range into two subranges. The first subrange is [_Begin, _Begin + (_End - _Begin) / iCount). The second subrange is [_Begin + (_End - _Begin) / iCount, _End) .
iCount | - the ratio to divide the range. |
bool eLynx::IterationRange::IsEmpty | ( | ) | const |
Tells whether subrange is empty (_Begin == _End) or not
bool eLynx::IterationRange::IsSplitable | ( | ) | const |
Tells whether subrange is splitable (_End - _Begin >= _MinSize) or not.
size_t eLynx::IterationRange::GetBegin | ( | ) | const |
size_t eLynx::IterationRange::GetEnd | ( | ) | const |
bool eLynx::IterationRange::IsFirst | ( | ) | const |
bool eLynx::IterationRange::IsMiddle | ( | ) | const |
bool eLynx::IterationRange::IsLast | ( | ) | const |
bool eLynx::IterationRange::IsAll | ( | ) | const |
friend class IterationRangeTask [friend] |
Definition at line 84 of file ParallelAlgorithms.h.