#include <matrix.hpp>
Definition at line 71 of file matrix.hpp.
Definition at line 79 of file matrix.hpp.
00079 { 00080 nat nc = Mat::def_rows; 00081 nat nr = Mat::def_cols; 00082 nat l = aligned_size<C,V> (nr * nc); 00083 C* tab= mmx_formatted_new<C> (l, fm); 00084 rep= new Matrix_rep (tab, nr, nc, false, fm); 00085 }
matrix | ( | const T & | c | ) | [inline] |
Definition at line 88 of file matrix.hpp.
00088 { 00089 Format fm= get_format (as<C> (c)); 00090 nat nr = Mat::init_rows; 00091 nat nc = Mat::init_cols; 00092 nat l = aligned_size<C,V> (nr * nc); 00093 C* tab= mmx_formatted_new<C> (l, fm); 00094 rep= new Matrix_rep (tab, nr, nc, true, fm); 00095 Mat::set (rep->a, as<C> (c), nr, nc); 00096 }
Definition at line 99 of file matrix.hpp.
00099 { 00100 nat nr = Mat::init_rows; 00101 nat nc = Mat::init_cols; 00102 nat l = aligned_size<C,V> (nr * nc); 00103 C* tab= mmx_formatted_new<C> (l, fm); 00104 rep= new Matrix_rep (tab, nr, nc, true, fm); 00105 Mat::set (rep->a, as<C> (c), nr, nc); 00106 }
Definition at line 109 of file matrix.hpp.
Definition at line 118 of file matrix.hpp.
00118 { 00119 nat l= aligned_size<C,V> (rows(m) * cols(m)); 00120 C* t= mmx_formatted_new<C> (l, fm); 00121 rep= new Matrix_rep (t, rows(m), cols(m), is_a_scalar (m), fm); 00122 Vec::cast (rep->a, tab(m), rows(m) * cols(m)); 00123 }
Definition at line 125 of file matrix.hpp.
Definition at line 135 of file matrix.hpp.
Definition at line 143 of file matrix.hpp.
00143 { 00144 rep= new Matrix_rep (tab, nr, nc, false, fm); 00145 }
Definition at line 147 of file matrix.hpp.
00147 { 00148 rep= new Matrix_rep (tab, nr, nc, flag, fm); 00149 }
Definition at line 151 of file matrix.hpp.
00151 { 00152 Format fm= CF(it); 00153 nat i, j, nr= Mat::def_rows, nc= Mat::def_cols; 00154 if (nr==0) nr=1; 00155 nat l = aligned_size<C,V> (nr * nc); 00156 C* tab= mmx_formatted_new<C> (l, fm); 00157 for (i=0; i<nr; i++, ++it) 00158 for (j=0; j<nc; j++, ++it) 00159 tab[Mat::index (i, j, nr, nc)]= *it; 00160 rep= new Matrix_rep (tab, nc, nr, false, fm); 00161 }
C& operator() | ( | nat | i, | |
nat | j | |||
) | [inline] |
Definition at line 168 of file matrix.hpp.
00168 { 00169 VERIFY (is_non_scalar (*this), "non-scalar matrix expected"); 00170 VERIFY (i<rep->nr, "row out of range"); 00171 VERIFY (j<rep->nc, "column out of range"); 00172 return rep->a[Mat::index (i, j, rows (*this), cols(*this))]; }
const C& operator() | ( | nat | i, | |
nat | j | |||
) | const [inline] |
Definition at line 163 of file matrix.hpp.
00163 { 00164 VERIFY (is_non_scalar (*this), "non-scalar matrix expected"); 00165 VERIFY (i<rep->nr, "row out of range"); 00166 VERIFY (j<rep->nc, "column out of range"); 00167 return rep->a[Mat::index (i, j, rows (*this), cols(*this))]; }
C& scalar | ( | ) | [inline] |
Definition at line 176 of file matrix.hpp.
00176 { 00177 VERIFY (is_a_scalar (*this), "scalar matrix expected"); 00178 return rep->a[0]; }
C scalar | ( | ) | const [inline] |
Definition at line 173 of file matrix.hpp.
Referenced by mmx::binary_map(), mmx::binary_map_scalar(), mmx::binary_test(), mmx::operator*(), mmx::unary_map(), mmx::unary_set(), and mmx::unary_set_scalar().
00173 { 00174 VERIFY (is_a_scalar (*this), "scalar matrix expected"); 00175 return rep->a[0]; }