#include <range.h>
Public Types | |
enum | { fromStart = INT_MIN, toEnd = INT_MIN } |
typedef int | T_numtype |
Public Member Functions | |
Range () | |
Range (int slicePosition) | |
Range (int first, int last, int stride=1) | |
int | first (int lowRange=0) const |
int | last (int highRange=0) const |
unsigned | length (int=0) const |
int | stride () const |
bool | isAscendingContiguous () const |
void | setRange (int first, int last, int stride=1) |
bool | isUnitStride () const |
Range | operator- (int shift) const |
Range | operator+ (int shift) const |
int | operator[] (unsigned i) const |
int | operator() (unsigned i) const |
bool | _bz_hasFastAccess () const |
T_numtype | _bz_fastAccess (unsigned i) const |
unsigned | _bz_suggestLength () const |
_bz_VecExpr< Range > | _bz_asVecExpr () const |
Static Public Member Functions | |
static Range | all () |
Static Public Attributes | |
static const int | _bz_staticLengthCount = 0 |
static const int | _bz_dynamicLengthCount = 0 |
static const int | _bz_staticLength = 0 |
Private Attributes | |
int | first_ |
int | last_ |
int | stride_ |
Friends | |
ostream & | operator<< (ostream &os, const Range &range) |
typedef int Range::T_numtype |
Range::Range | ( | ) | [inline] |
References first_, fromStart, last_, stride_, and toEnd.
Referenced by all(), operator+(), and operator-().
Range::Range | ( | int | first, | |
int | last, | |||
int | stride = 1 | |||
) | [inline] |
_bz_VecExpr<Range> Range::_bz_asVecExpr | ( | ) | const [inline] |
bool Range::_bz_hasFastAccess | ( | ) | const [inline] |
References stride_.
unsigned Range::_bz_suggestLength | ( | ) | const [inline] |
int Range::first | ( | int | lowRange = 0 |
) | const [inline] |
References first_, and fromStart.
Referenced by Array< P_numtype, N_rank >::Array(), and Vector< T_numtype >::Vector().
bool Range::isAscendingContiguous | ( | ) | const [inline] |
bool Range::isUnitStride | ( | ) | const [inline] |
References stride_.
int Range::last | ( | int | highRange = 0 |
) | const [inline] |
unsigned Range::length | ( | int | = 0 |
) | const [inline] |
References first_, fromStart, last_, stride_, and toEnd.
Referenced by _bz_suggestLength(), and Array< P_numtype, N_rank >::Array().
Range Range::operator+ | ( | int | shift | ) | const [inline] |
Range Range::operator- | ( | int | shift | ) | const [inline] |
void Range::setRange | ( | int | first, | |
int | last, | |||
int | stride = 1 | |||
) | [inline] |
int Range::stride | ( | ) | const [inline] |
ostream& operator<< | ( | ostream & | os, | |
const Range & | range | |||
) | [friend] |
const int Range::_bz_dynamicLengthCount = 0 [static] |
const int Range::_bz_staticLength = 0 [static] |
const int Range::_bz_staticLengthCount = 0 [static] |
int Range::first_ [private] |
Referenced by _bz_fastAccess(), first(), isAscendingContiguous(), length(), operator()(), operator+(), operator-(), operator[](), Range(), and setRange().
int Range::last_ [private] |
Referenced by isAscendingContiguous(), last(), length(), operator+(), operator-(), Range(), and setRange().
int Range::stride_ [private] |
Referenced by _bz_hasFastAccess(), isAscendingContiguous(), isUnitStride(), length(), operator()(), operator+(), operator-(), operator[](), Range(), setRange(), and stride().