eLynx SDK v3.0.1
C++ image processing API reference

eLynx::IterationRange Class Reference

#include <ParallelAlgorithms.h>

List of all members.


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

Detailed Description

IterationRange represents half-open range [i,j) that can be recursively split. The type of i and j must model random access iterators, raw pointers or integer types.

Definition at line 45 of file ParallelAlgorithms.h.


Constructor & Destructor Documentation

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.

Parameters:
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.


Member Function Documentation

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) .

Parameters:
iCount - the ratio to divide the range.
Returns:
first subrange.

bool eLynx::IterationRange::IsEmpty (  )  const

Tells whether subrange is empty (_Begin == _End) or not

Returns:
true if subrange is empty.

bool eLynx::IterationRange::IsSplitable (  )  const

Tells whether subrange is splitable (_End - _Begin >= _MinSize) or not.

Returns:
true if subrange is empty.

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


Friends And Related Function Documentation

friend class IterationRangeTask [friend]

Definition at line 84 of file ParallelAlgorithms.h.


The documentation for this class was generated from the following file:

Generated on 14 Apr 2009 by doxygen 1.5.8