blitz  Version 1.0.2
blitz::Range Class Reference

#include <range.h>

Inheritance diagram for blitz::Range:
Inheritance graph
Collaboration diagram for blitz::Range:
Collaboration graph

Classes

class  SliceInfo
 
struct  tvresult
 The vectorized return type for a Range should be another range, but that's not useful since a vectorized TinyVector assignment can not contain index placeholders. More...
 

Public Types

typedef int T_numtype
 
typedef opType< T_numtype >::T_optype T_optype
 
typedef asET< T_numtype >::T_wrapped T_typeprop
 
typedef unwrapET< T_typeprop >::T_unwrapped T_result
 
typedef void T_ctorArg1
 
typedef char T_ctorArg2
 
typedef TinyVector< int, 1 > T_index
 
typedef Range T_range_result
 
- Public Types inherited from blitz::ETBase< Range >
typedef Range T_unwrapped
 

Public Member Functions

 Range ()
 
 Range (const Range &r)
 
 Range (T_numtype slicePosition)
 
 Range (T_numtype first, T_numtype last, diffType stride=1)
 
T_numtype operator* () const
 
T_numtype first_value () const
 
int ascending (const int) const
 
int ordering (const int) const
 
int lbound (const int) const
 
int ubound (const int) const
 
RectDomain< rank_domain () const
 
bool assertInRange (const T_index &BZ_DEBUG_PARAM(index)) const
 
template<int N_rank>
T_numtype operator() (const TinyVector< int, N_rank > &i) const
 
T_numtype operator[] (int i) const
 
T_numtype operator() (int i) const
 
template<int N_rank>
const Range operator() (const RectDomain< N_rank > &d) const
 
void push (int)
 
void pop (int)
 
void advance ()
 
void advance (int)
 
void loadStride (int)
 
bool isUnitStride (int) const
 
void advanceUnitStride ()
 
bool canCollapse (int, int) const
 
T_numtype fastRead (diffType) const
 
template<int N>
tvresult< N >::Type fastRead_tv (diffType) const
 
void _bz_offsetData (sizeType i) const
 
void _bz_offsetData (sizeType offset, int dim) const
 
void _bz_offsetData (sizeType offset1, int dim1, sizeType offset2, int dim2) const
 
diffType suggestStride (int) const
 
bool isStride (int, diffType) const
 
void moveTo (int) const
 
T_numtype shift (int offset, int dim) const
 
T_numtype shift (int offset1, int dim1, int offset2, int dim2) const
 
template<int N_rank>
void moveTo (const TinyVector< int, N_rank > &) const
 
void prettyPrint (std::string &str, prettyPrintFormat &format) const
 
T_numtype first (T_numtype lowRange=0) const
 
T_numtype last (T_numtype highRange=0) const
 
int length (int=0) const
 
diffType stride () const
 
bool isAscendingContiguous () const
 
void setRange (T_numtype first, T_numtype last, diffType stride=1)
 
bool isUnitStride () const
 
Range operator- (T_numtype shift) const
 
Range operator+ (T_numtype shift) const
 
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 >
SliceInfo< T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11 >::T_slice operator() (T1 r1, T2 r2, T3 r3, T4 r4, T5 r5, T6 r6, T7 r7, T8 r8, T9 r9, T10 r10, T11 r11) const
 
- Public Member Functions inherited from blitz::ETBase< Range >
 ETBase ()
 
 ETBase (const ETBase< Range > &)
 
Rangeunwrap ()
 
const Rangeunwrap () const
 
ETBase< Range > & wrap ()
 
const ETBase< Range > & wrap () const
 

Static Public Member Functions

static Range all ()
 

Static Public Attributes

static const int numArrayOperands = 0
 
static const int numTVOperands = 0
 
static const int numTMOperands = 0
 
static const int numIndexPlaceholders = 1
 
static const int minWidth = simdTypes<T_numtype>::vecWidth
 
static const int maxWidth = simdTypes<T_numtype>::vecWidth
 
static const int rank_ = 1
 

Private Attributes

T_numtype first_
 
T_numtype last_
 
diffType stride_
 

Friends

ostream & operator<< (ostream &os, const Range &range)
 

Member Typedef Documentation

typedef asET<T_numtype>::T_wrapped blitz::Range::T_typeprop

Constructor & Destructor Documentation

blitz::Range::Range ( )
inline

References first_, blitz::fromStart, last_, stride_, and blitz::toEnd.

Referenced by all(), operator+(), and operator-().

blitz::Range::Range ( const Range r)
inline

References first_, last_, and stride_.

blitz::Range::Range ( T_numtype  slicePosition)
inlineexplicit

References first_, last_, and stride_.

blitz::Range::Range ( T_numtype  first,
T_numtype  last,
diffType  stride = 1 
)
inline

References stride().

Member Function Documentation

void blitz::Range::_bz_offsetData ( sizeType  i) const
inline
void blitz::Range::_bz_offsetData ( sizeType  offset,
int  dim 
) const
inline
void blitz::Range::_bz_offsetData ( sizeType  offset1,
int  dim1,
sizeType  offset2,
int  dim2 
) const
inline
void blitz::Range::advance ( )
inline
void blitz::Range::advance ( int  )
inline
void blitz::Range::advanceUnitStride ( )
inline
static Range blitz::Range::all ( )
inlinestatic

References Range().

int blitz::Range::ascending ( const int  ) const
inline
bool blitz::Range::assertInRange ( const T_index BZ_DEBUG_PARAMindex) const

Referenced by operator()().

bool blitz::Range::canCollapse ( int  ,
int   
) const
inline
RectDomain<rank_> blitz::Range::domain ( ) const
T_numtype blitz::Range::fastRead ( diffType  ) const
inline
template<int N>
tvresult<N>::Type blitz::Range::fastRead_tv ( diffType  ) const
inline
T_numtype blitz::Range::first ( T_numtype  lowRange = 0) const
inline

References first_.

Referenced by blitz::Array< P_numtype, 1 >::Array(), and setRange().

T_numtype blitz::Range::first_value ( ) const
inline
bool blitz::Range::isAscendingContiguous ( ) const
inline

References first_, last_, and stride_.

Referenced by blitz::Array< P_numtype, 1 >::Array().

bool blitz::Range::isStride ( int  ,
diffType   
) const
inline
bool blitz::Range::isUnitStride ( int  ) const
inline
bool blitz::Range::isUnitStride ( ) const
inline
Todo:
this talks about the stride of the RANGE, not the expression stride.

References stride_.

T_numtype blitz::Range::last ( T_numtype  highRange = 0) const
inline

References last_.

Referenced by setRange().

int blitz::Range::lbound ( const int  ) const
inline
int blitz::Range::length ( int  = 0) const
inline

References first_, last_, and stride_.

Referenced by blitz::Array< P_numtype, 1 >::Array(), and ubound().

void blitz::Range::loadStride ( int  )
inline
void blitz::Range::moveTo ( int  ) const
inline
template<int N_rank>
void blitz::Range::moveTo ( const TinyVector< int, N_rank > &  ) const
inline
template<int N_rank>
T_numtype blitz::Range::operator() ( const TinyVector< int, N_rank > &  i) const
inline

References assertInRange(), and operator[]().

T_numtype blitz::Range::operator() ( int  i) const
inline

References operator[]().

template<int N_rank>
const Range blitz::Range::operator() ( const RectDomain< N_rank > &  d) const
inline
template<typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 >
SliceInfo<T1,T2,T3,T4,T5,T6,T7,T8,T9,T10,T11>::T_slice blitz::Range::operator() ( T1  r1,
T2  r2,
T3  r3,
T4  r4,
T5  r5,
T6  r6,
T7  r7,
T8  r8,
T9  r9,
T10  r10,
T11  r11 
) const
inline
T_numtype blitz::Range::operator* ( ) const
inline
Range blitz::Range::operator+ ( T_numtype  shift) const
inline

References first_, last_, Range(), and stride_.

Range blitz::Range::operator- ( T_numtype  shift) const
inline

References first_, last_, Range(), and stride_.

T_numtype blitz::Range::operator[] ( int  i) const

Referenced by operator()().

int blitz::Range::ordering ( const int  ) const
inline
void blitz::Range::pop ( int  )
inline
void blitz::Range::prettyPrint ( std::string &  str,
prettyPrintFormat format 
) const
inline

References first_, last_, and stride_.

void blitz::Range::push ( int  )
inline
void blitz::Range::setRange ( T_numtype  first,
T_numtype  last,
diffType  stride = 1 
)
inline

References first(), first_, last(), last_, stride(), and stride_.

T_numtype blitz::Range::shift ( int  offset,
int  dim 
) const
inline
T_numtype blitz::Range::shift ( int  offset1,
int  dim1,
int  offset2,
int  dim2 
) const
inline
diffType blitz::Range::stride ( ) const
inline

References stride_.

Referenced by Range(), and setRange().

diffType blitz::Range::suggestStride ( int  ) const
inline
int blitz::Range::ubound ( const int  ) const
inline

References length().

Friends And Related Function Documentation

ostream& operator<< ( ostream &  os,
const Range range 
)
friend

Member Data Documentation

const int blitz::Range::maxWidth = simdTypes<T_numtype>::vecWidth
static
const int blitz::Range::minWidth = simdTypes<T_numtype>::vecWidth
static
const int blitz::Range::numArrayOperands = 0
static
const int blitz::Range::numIndexPlaceholders = 1
static
const int blitz::Range::numTMOperands = 0
static
const int blitz::Range::numTVOperands = 0
static
const int blitz::Range::rank_ = 1
static

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