TF++, Miscellaneous classes and modules in C++:

◆ setToSameDomain()

template<class T , int N>
void tfxx::blitzutil::setToSameDomain ( blitz::Array< T, N > &  array,
const blitz::RectDomain< N > &  domain,
const blitz::GeneralArrayStorage< N > &  storage = blitz::fortranArray 
)

create a second array spanning the same domain

Parameters
arrayA blitz array to be reshaped to domain. Upon return it references a new data area.
domainDomain to apply to array. May by return value of Array member function domain().
storageBlitz++ Array storage layout to be used for array.

Definition at line 90 of file blitzutil.h.

Referenced by main(), and tfxx::hacks::write_grepg_f().

94  {
95  blitz::TinyVector<int, N> extent;
96  for (int i=0; i<N; i++)
97  { extent[i]=domain.ubound()[i]-domain.lbound()[i]+1; }
98  blitz::Array<T, N> result(domain.lbound(),extent,storage);
99  array.reference(result);
100  }
Here is the caller graph for this function: