37#include <blitz/tinyvec2io.cc>
40#include <blitz/array/slice.h>
45#ifdef BZ_HAVE_BOOST_SERIALIZATION
46#include <boost/serialization/serialization.hpp>
56template<
typename P_numtype,
int N_rows,
int N_columns>
58template<
typename P_numtype,
int N_rows,
int N_columns>
59class FastTM2CopyIterator;
61template<
typename P_expr>
65class IndexPlaceholder;
71template<
typename P_numtype,
int N_rows,
int N_columns>
94 template <
typename T_numtype2>
138 {
return data_+
size(); }
141 {
return data_+
size(); }
207 for (
int i=0; i <
rank_; ++i)
228 <<
i0 <<
", " <<
i1 <<
")"
240 {
return const_cast<T_matrix&
>(*this); }
266 template<
int N0,
int N1>
303 template<
typename T_expr>
318#ifdef BZ_DEBUG_TRAVERSE
328 template<
typename T_expr,
typename T_update>
331#ifdef BZ_HAVE_BOOST_SERIALIZATION
332 friend class boost::serialization::access;
334 template<
class T_arch>
345#ifdef BZ_HAVE_BOOST_SERIALIZATION
348 template<
typename T>
struct is_mpi_datatype;
349 template <
typename T,
int N,
int M>
350 struct is_mpi_datatype<
blitz::TinyMatrix<T, N, M> >
351 :
public is_mpi_datatype<T> { };
Definition memblock.h:307
static int base(int rank)
Definition tinymat2.h:102
T_matrix & operator>>=(const T &)
T_numtype *restrict getInitializationIterator()
Definition tinymat2.h:300
static TinyVector< int, 2 > shape()
Definition tinymat2.h:181
static int length(int rank)
Definition tinymat2.h:161
T_matrix & operator^=(const T &)
iterator begin()
Definition tinymat2.h:105
const_iterator begin() const
Definition tinymat2.h:108
static int columns()
Definition tinymat2.h:117
iterator end()
Definition tinymat2.h:137
T_numtype &restrict operator()(unsigned i, unsigned j)
Definition tinymat2.h:248
static TinyVector< int, 2 > lbound()
Definition tinymat2.h:158
const T_numtype * const_iterator
Definition tinymat2.h:82
T_matrix & noConst() const
Definition tinymat2.h:239
T_numtype *restrict data()
Definition tinymat2.h:123
static TinyVector< int, 2 > length()
Definition tinymat2.h:163
static bool canCollapse(int outerRank, int innerRank)
Definition tinymat2.h:317
T_numtype &restrict operator()(T_index i)
Definition tinymat2.h:260
T_iterator beginFast() const
Definition tinymat2.h:111
T_numtype *restrict dataFirst()
Definition tinymat2.h:129
static diffType stride(int rank)
Definition tinymat2.h:190
static int zeroOffset()
Definition tinymat2.h:199
static RectDomain< 2 > domain()
static int rank()
Definition tinymat2.h:175
static bool isRankStoredAscending(int rank)
Definition tinymat2.h:153
TinyVector< int, 2 > T_index
Definition tinymat2.h:78
static const int rank_
Definition tinymat2.h:88
static sizeType numElements()
Definition tinymat2.h:166
static int ubound(int rank)
Definition tinymat2.h:193
T_matrix & operator/=(const T &)
bool isVectorAligned(diffType offset) const
Since data_ is simd aligned by construction, we just have to check the offest.
Definition tinymat2.h:278
T_matrix & operator-=(const T &)
static TinyVector< int, 2 > base()
Definition tinymat2.h:99
T_matrix & operator&=(const T &)
static int lbound(int rank)
Definition tinymat2.h:156
ListInitializationSwitch< T_matrix, T_numtype * > operator=(T_numtype x)
Definition tinymat2.h:293
const T_numtype *restrict dataFirst() const
Definition tinymat2.h:126
P_numtype T_numtype
Definition tinymat2.h:75
static sizeType size()
Definition tinymat2.h:184
const T_numtype &restrict operator()(T_index i) const
Definition tinymat2.h:254
TinyMatrix()
Definition tinymat2.h:90
T_matrix & operator+=(const T &)
static TinyVector< int, 2 > ubound()
Definition tinymat2.h:196
const_iterator end() const
Definition tinymat2.h:140
bool assertInRange(int BZ_DEBUG_PARAM(i0), int BZ_DEBUG_PARAM(i1)) const
Definition tinymat2.h:226
T_matrix & operator|=(const T &)
const T_numtype *restrict data() const
Definition tinymat2.h:120
static const TinyVector< int, 2 > extent()
Definition tinymat2.h:146
FastTM2Iterator< T_numtype, N_rows, N_columns > T_iterator
Definition tinymat2.h:80
static TinyVector< diffType, 2 > stride()
Definition tinymat2.h:187
static TinyVector< int, 2 > ordering()
Definition tinymat2.h:172
static int cols()
Definition tinymat2.h:114
static bool isMinorRank(int rank)
Definition tinymat2.h:151
_bz_ArrayExpr< ArrayIndexMapping< typename asExpr< T_matrix >::T_expr, N0, N1 > > operator()(IndexPlaceholder< N0 >, IndexPlaceholder< N1 >) const
void _tm_evaluate(const T_expr &expr, T_update)
T_matrix & initialize(T_numtype x)
static int extent(int rank)
Definition tinymat2.h:143
static int ordering(int rank)
Definition tinymat2.h:169
FastTM2CopyIterator< P_numtype, N_rows, N_columns > T_range_result
Definition tinymat2.h:83
static int rows()
Definition tinymat2.h:178
T_matrix & operator<<=(const T &)
static bool isMajorRank(int rank)
Definition tinymat2.h:149
T_numtype * iterator
Definition tinymat2.h:81
const T_numtype & fastRead(diffType i) const
Fastread must return reference so the iterator can turn it into an iterator for the contained in case...
Definition tinymat2.h:273
bool isInRange(int i0, int i1) const
Definition tinymat2.h:214
T_matrix & operator%=(const T &)
TinyMatrix(const TinyMatrix< T_numtype2, N_rows, N_columns > &x)
bool assertInRange(const T_index &BZ_DEBUG_PARAM(index)) const
Definition tinymat2.h:219
bool isInRange(const T_index &index) const
Definition tinymat2.h:206
T_matrix & operator=(const ETBase< T_expr > &)
T_matrix & operator*=(const T &)
TinyMatrix(const T_matrix &)
TinyMatrix(T_numtype initValue)
const T_numtype &restrict operator()(unsigned i, unsigned j) const
Definition tinymat2.h:242
static int dimensions()
Definition tinymat2.h:132
TinyMatrix< T_numtype, N_rows, N_columns > T_matrix
Definition tinymat2.h:79
Helper class that defines the width of the simd instructions for a given type.
Definition simdtypes.h:31
#define restrict
Definition compiler.h:95
Definition array-impl.h:66