//! More...
Classes | |
class | podarray< eT > |
A lightweight array for POD types. If the amount of memory requested is small, the stack is used. More... | |
Functions | |
podarray::~podarray () | |
podarray::podarray () | |
podarray::podarray (const podarray &x) | |
const podarray & | podarray::operator= (const podarray &x) |
arma_inline | podarray::podarray (const u32 new_N) |
arma_inline | podarray::podarray (const eT *X, const u32 new_N) |
arma_inline eT | podarray::operator[] (const u32 i) const |
arma_inline eT & | podarray::operator[] (const u32 i) |
arma_inline eT | podarray::operator() (const u32 i) const |
arma_inline eT & | podarray::operator() (const u32 i) |
void | podarray::set_size (const u32 new_n_elem) |
void | podarray::fill (const eT val) |
void | podarray::zeros () |
void | podarray::zeros (const u32 new_n_elem) |
arma_inline eT * | podarray::memptr () |
arma_inline const eT * | podarray::memptr () const |
void | podarray::init (const u32 new_n_elem) |
//!
Definition at line 23 of file podarray_meat.hpp.
References arma_config::debug, podarray< eT >::mem, podarray< eT >::mem_local, podarray< eT >::n_elem, and access::rw().
{ arma_extra_debug_sigprint_this(this); if(n_elem > sizeof(mem_local)/sizeof(eT) ) { delete [] mem; } if(arma_config::debug == true) { access::rw(n_elem) = 0; access::rw(mem) = 0; } }
Definition at line 43 of file podarray_meat.hpp.
Definition at line 54 of file podarray_meat.hpp.
References podarray< eT >::operator=().
const podarray< eT > & podarray< eT >::operator= | ( | const podarray< eT > & | x | ) | [inline, inherited] |
Definition at line 68 of file podarray_meat.hpp.
References syslib::copy_elem(), podarray< eT >::init(), podarray< eT >::memptr(), and podarray< eT >::n_elem.
Referenced by podarray< eT >::podarray().
arma_inline podarray< eT >::podarray | ( | const u32 | new_N | ) | [explicit, inherited] |
Definition at line 86 of file podarray_meat.hpp.
References podarray< eT >::init().
arma_inline podarray< eT >::podarray | ( | const eT * | X, | |
const u32 | new_N | |||
) | [explicit, inherited] |
Definition at line 99 of file podarray_meat.hpp.
References syslib::copy_elem(), podarray< eT >::init(), and podarray< eT >::memptr().
: n_elem(0) , mem (0) { arma_extra_debug_sigprint_this(this); init(new_n_elem); syslib::copy_elem( memptr(), X, new_n_elem ); }
Definition at line 115 of file podarray_meat.hpp.
References podarray< eT >::mem.
{ return mem[i]; }
Definition at line 125 of file podarray_meat.hpp.
References podarray< eT >::mem, and access::rw().
{ return access::rw(mem[i]); }
Definition at line 135 of file podarray_meat.hpp.
References podarray< eT >::mem, and podarray< eT >::n_elem.
Definition at line 146 of file podarray_meat.hpp.
References podarray< eT >::mem, podarray< eT >::n_elem, and access::rw().
{ arma_debug_check( (i >= n_elem), "podarray::operator(): index out of bounds"); return access::rw(mem[i]); }
Definition at line 157 of file podarray_meat.hpp.
References podarray< eT >::init().
Referenced by auxlib::inv_inplace(), auxlib::inv_noalias(), auxlib::lu(), auxlib::qr(), and auxlib::svd().
{ arma_extra_debug_sigprint(); init(new_n_elem); }
void podarray< eT >::fill | ( | const eT | val | ) | [inline, inherited] |
Definition at line 169 of file podarray_meat.hpp.
References podarray< eT >::mem, podarray< eT >::n_elem, and access::rw().
Referenced by podarray< eT >::zeros().
{ arma_extra_debug_sigprint(); for(u32 i=0; i<n_elem; ++i) { access::rw(mem[i]) = val; } }
void podarray< eT >::zeros | ( | ) | [inline, inherited] |
Definition at line 184 of file podarray_meat.hpp.
References podarray< eT >::fill().
{ arma_extra_debug_sigprint(); fill(eT(0)); }
Definition at line 196 of file podarray_meat.hpp.
References podarray< eT >::fill(), and podarray< eT >::init().
arma_inline eT * podarray< eT >::memptr | ( | ) | [inherited] |
Definition at line 209 of file podarray_meat.hpp.
References podarray< eT >::mem.
Referenced by op_var::apply(), op_stddev::apply(), op_sort::apply(), op_diagmat::apply(), gemm_mixed_cache< do_trans_A, do_trans_B, use_alpha, use_beta >::apply(), glue_times::apply_inplace(), auxlib::det(), op_var::direct_var(), auxlib::eig_gen(), auxlib::eig_sym(), auxlib::inv_inplace(), auxlib::inv_noalias(), diskio::load_pgm_binary(), diskio::load_ppm_binary(), auxlib::log_det(), auxlib::lu(), podarray< eT >::operator=(), podarray< eT >::podarray(), auxlib::qr(), auxlib::solve(), auxlib::solve_od(), auxlib::solve_ud(), and auxlib::svd().
{ return const_cast<eT*>(mem); }
arma_inline const eT * podarray< eT >::memptr | ( | ) | const [inherited] |
void podarray< eT >::init | ( | const u32 | new_n_elem | ) | [inline, protected, inherited] |
Definition at line 229 of file podarray_meat.hpp.
References podarray< eT >::mem, podarray< eT >::mem_local, podarray< eT >::n_elem, and access::rw().
Referenced by podarray< eT >::operator=(), podarray< eT >::podarray(), podarray< eT >::set_size(), and podarray< eT >::zeros().
{ arma_extra_debug_sigprint(); if(n_elem == new_n_elem) { return; } if(n_elem > sizeof(mem_local)/sizeof(eT) ) { delete [] mem; } if(new_n_elem <= sizeof(mem_local)/sizeof(eT) ) { access::rw(mem) = mem_local; } else { access::rw(mem) = new eT[new_n_elem]; } access::rw(n_elem) = new_n_elem; }