Debug

Namespaces

namespace  junk

Functions

template<typename T1 >
void arma_stop (const T1 &x)
 print a message to std::cout and/or throw a run-time error exception
void arma_print ()
template<typename T1 >
void arma_print (const T1 &x)
template<typename T1 , typename T2 >
void arma_print (const T1 &x, const T2 &y)
template<typename T1 >
void arma_print (const arma_boost::basic_format< T1 > &x)
template<typename T1 , typename T2 >
void arma_print (const arma_boost::basic_format< T1, T2 > &x)
void arma_sigprint (const char *x)
 print a message on cout, with a preceding @ character. used for printing the signature of a function (see the arma_extra_debug_sigprint macro)
void arma_bktprint ()
template<typename T1 >
void arma_bktprint (const T1 &x)
template<typename T1 , typename T2 >
void arma_bktprint (const T1 &x, const T2 &y)
template<typename T1 >
void arma_bktprint (const arma_boost::basic_format< T1 > &x)
template<typename T1 , typename T2 >
void arma_bktprint (const arma_boost::basic_format< T1, T2 > &x)
void arma_thisprint (void *this_ptr)
template<typename T1 >
void arma_hot arma_warn (const bool state, const T1 &x)
 if state is true, print a message on cout
template<typename T1 , typename T2 >
void arma_hot arma_warn (const bool state, const T1 &x, const T2 &y)
template<typename T1 >
void arma_hot arma_warn (const bool state, const arma_boost::basic_format< T1 > &x)
template<typename T1 , typename T2 >
void arma_hot arma_warn (const bool state, const arma_boost::basic_format< T1, T2 > &x)
template<typename T1 >
void arma_hot arma_check (const bool state, const T1 &x)
 if state is true, abort program
template<typename T1 , typename T2 >
void arma_hot arma_check (const bool state, const T1 &x, const T2 &y)
template<typename T1 >
void arma_hot arma_check (const bool state, const arma_boost::basic_format< T1 > &x)
template<typename T1 , typename T2 >
void arma_hot arma_check (const bool state, const arma_boost::basic_format< T1, T2 > &x)
std::string arma_incompat_size_string (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x)
void arma_hot arma_assert_same_size (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const char *x)
 stop if given matrices have different sizes
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Proxy< eT1 > &A, const Proxy< eT2 > &B, const char *x)
 stop if given proxies have different sizes
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview< eT1 > &A, const subview< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Mat< eT1 > &A, const subview< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview< eT1 > &A, const Mat< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Mat< eT1 > &A, const Proxy< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Proxy< eT1 > &A, const Mat< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Proxy< eT1 > &A, const subview< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview< eT1 > &A, const Proxy< eT2 > &B, const char *x)
std::string arma_incompat_size_string (const u32 A_n_rows, const u32 A_n_cols, const u32 A_n_slices, const u32 B_n_rows, const u32 B_n_cols, const u32 B_n_slices, const char *x)
void arma_hot arma_assert_same_size (const u32 A_n_rows, const u32 A_n_cols, const u32 A_n_slices, const u32 B_n_rows, const u32 B_n_cols, const u32 B_n_slices, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Cube< eT1 > &A, const Cube< eT2 > &B, const char *x)
 stop if given cubes have different sizes
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Cube< eT1 > &A, const subview_cube< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview_cube< eT1 > &A, const Cube< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview_cube< eT1 > &A, const subview_cube< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const ProxyCube< eT1 > &A, const ProxyCube< eT2 > &B, const char *x)
 stop if given cube proxies have different sizes
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Cube< eT1 > &A, const Mat< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Mat< eT1 > &A, const Cube< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const subview_cube< eT1 > &A, const Mat< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size (const Mat< eT1 > &A, const subview_cube< eT2 > &B, const char *x)
void arma_hot arma_assert_mul_size (const u32 A_n_rows, const u32 A_n_cols, const u32 B_n_rows, const u32 B_n_cols, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const char *x)
 stop if given matrices are incompatible for multiplication
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size (const Mat< eT1 > &A, const Mat< eT2 > &B, const bool do_trans_A, const bool do_trans_B, const char *x)
 stop if given matrices are incompatible for multiplication
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size (const Mat< eT1 > &A, const subview< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size (const subview< eT1 > &A, const Mat< eT2 > &B, const char *x)
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size (const subview< eT1 > &A, const subview< eT2 > &B, const char *x)

Function Documentation

template<typename T1 >
void arma_stop ( const T1 &  x  )  [inline]

print a message to std::cout and/or throw a run-time error exception

Definition at line 28 of file debug.hpp.

Referenced by eglue_cube_core< eglue_type >::apply(), eglue_cube_core< eglue_type >::apply_inplace_div(), eglue_core< eglue_type >::apply_inplace_div(), eglue_cube_core< eglue_type >::apply_inplace_minus(), eglue_core< eglue_type >::apply_inplace_minus(), eglue_cube_core< eglue_type >::apply_inplace_plus(), eglue_core< eglue_type >::apply_inplace_plus(), eglue_cube_core< eglue_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_inplace_schur(), eglue_core< eglue_type >::apply_proxy(), eglue_core< eglue_type >::apply_unwrap(), arma_assert_mul_size(), arma_assert_same_size(), arma_check(), auxlib::chol(), auxlib::det(), eig_gen(), auxlib::eig_gen(), auxlib::eig_sym(), eglue_cube_core< eglue_type >::get_elem(), eglue_core< eglue_type >::get_elem(), auxlib::inv_inplace(), auxlib::inv_noalias(), Mat< eT >::load(), field_aux::load(), Cube< eT >::load(), auxlib::log_det(), auxlib::lu(), eop_cube_core< eop_cube_type >::process(), eop_core< eop_type >::process(), auxlib::qr(), Mat< eT >::save(), field_aux::save(), Cube< eT >::save(), auxlib::solve(), auxlib::solve_od(), auxlib::solve_ud(), auxlib::svd(), wall_clock::tic(), and wall_clock::toc().

00029   {
00030   std::cerr.flush();
00031   std::cout.flush();
00032   
00033   std::cout << '\n';
00034   std::cout << "run-time error: " << x << '\n';
00035   std::cout << '\n';
00036   std::cout.flush();
00037   
00038   throw std::runtime_error("");
00039   }

void arma_print (  )  [inline]
template<typename T1 >
void arma_print ( const T1 &  x  )  [inline]

Definition at line 58 of file debug.hpp.

00059   {
00060   std::cout << x << std::endl;
00061   }

template<typename T1 , typename T2 >
void arma_print ( const T1 &  x,
const T2 &  y 
) [inline]

Definition at line 68 of file debug.hpp.

00069   {
00070   std::cout << x << y << std::endl;
00071   }

template<typename T1 >
void arma_print ( const arma_boost::basic_format< T1 > &  x  )  [inline]

Definition at line 79 of file debug.hpp.

00080     {
00081     std::cout << x << std::endl;
00082     }

template<typename T1 , typename T2 >
void arma_print ( const arma_boost::basic_format< T1, T2 > &  x  )  [inline]

Definition at line 87 of file debug.hpp.

00088     {
00089     std::cout << x << std::endl;
00090     }

void arma_sigprint ( const char *  x  )  [inline]

print a message on cout, with a preceding @ character. used for printing the signature of a function (see the arma_extra_debug_sigprint macro)

Definition at line 103 of file debug.hpp.

00104   {
00105   std::cout << "@ " << x;
00106   }

void arma_bktprint (  )  [inline]

Definition at line 116 of file debug.hpp.

00117   {
00118   std::cout << std::endl;
00119   }

template<typename T1 >
void arma_bktprint ( const T1 &  x  )  [inline]

Definition at line 125 of file debug.hpp.

00126   {
00127   std::cout << " [" << x << ']' << std::endl;
00128   }

template<typename T1 , typename T2 >
void arma_bktprint ( const T1 &  x,
const T2 &  y 
) [inline]

Definition at line 135 of file debug.hpp.

00136   {
00137   std::cout << " [" << x << y << ']' << std::endl;
00138   }

template<typename T1 >
void arma_bktprint ( const arma_boost::basic_format< T1 > &  x  )  [inline]

Definition at line 146 of file debug.hpp.

00147     {
00148     std::cout << " [" << x << ']' << std::endl;
00149     }

template<typename T1 , typename T2 >
void arma_bktprint ( const arma_boost::basic_format< T1, T2 > &  x  )  [inline]

Definition at line 154 of file debug.hpp.

00155     {
00156     std::cout << " [" << x << ']' << std::endl;
00157     }

void arma_thisprint ( void *  this_ptr  )  [inline]

Definition at line 168 of file debug.hpp.

00169   {
00170   std::cout << " [this = " << this_ptr << ']' << std::endl;
00171   }

template<typename T1 >
void arma_hot arma_warn ( const bool  state,
const T1 &  x 
) [inline]

if state is true, print a message on cout

Definition at line 183 of file debug.hpp.

References arma_print().

Referenced by op_inv::apply(), det(), linspace(), diskio::safe_rename(), diskio::save_arma_ascii(), diskio::save_arma_binary(), diskio::save_pgm_binary(), diskio::save_ppm_binary(), diskio::save_raw_ascii(), and diskio::save_std_string().

00184   {
00185   if(state==true)
00186     {
00187     arma_print(x);
00188     }
00189   }

template<typename T1 , typename T2 >
void arma_hot arma_warn ( const bool  state,
const T1 &  x,
const T2 &  y 
) [inline]

Definition at line 196 of file debug.hpp.

References arma_print().

00197   {
00198   if(state==true)
00199     {
00200     arma_print(x,y);
00201     }
00202   }

template<typename T1 >
void arma_hot arma_warn ( const bool  state,
const arma_boost::basic_format< T1 > &  x 
) [inline]

Definition at line 210 of file debug.hpp.

References arma_print().

00211     {
00212     if(state==true)
00213       arma_print(x);
00214     }

template<typename T1 , typename T2 >
void arma_hot arma_warn ( const bool  state,
const arma_boost::basic_format< T1, T2 > &  x 
) [inline]

Definition at line 220 of file debug.hpp.

References arma_print().

00221     {
00222     if(state==true)
00223       arma_print(x);
00224     }

template<typename T1 >
void arma_hot arma_check ( const bool  state,
const T1 &  x 
) [inline]
template<typename T1 , typename T2 >
void arma_hot arma_check ( const bool  state,
const T1 &  x,
const T2 &  y 
) [inline]

Definition at line 250 of file debug.hpp.

References arma_stop().

00251   {
00252   if(state==true)
00253     {
00254     arma_stop( std::string(x) + std::string(y) );
00255     }
00256   }

template<typename T1 >
void arma_hot arma_check ( const bool  state,
const arma_boost::basic_format< T1 > &  x 
) [inline]

Definition at line 264 of file debug.hpp.

References arma_stop(), and arma_boost::str().

00265     {
00266     if(state==true)
00267       {
00268       arma_stop(str(x));
00269       }
00270     }

template<typename T1 , typename T2 >
void arma_hot arma_check ( const bool  state,
const arma_boost::basic_format< T1, T2 > &  x 
) [inline]

Definition at line 276 of file debug.hpp.

References arma_stop(), and arma_boost::str().

00277     {
00278     if(state==true)
00279       {
00280       arma_stop(str(x));
00281       }
00282     }

std::string arma_incompat_size_string ( const u32  A_n_rows,
const u32  A_n_cols,
const u32  B_n_rows,
const u32  B_n_cols,
const char *  x 
) [inline]

Definition at line 294 of file debug.hpp.

Referenced by arma_assert_mul_size(), and arma_assert_same_size().

00295   {
00296   std::stringstream tmp;
00297   
00298   tmp << x << ": incompatible matrix dimensions: (" << A_n_rows << ',' << A_n_cols << ") and (" << B_n_rows << ',' << B_n_cols << ')';
00299   
00300   return tmp.str();
00301   }

void arma_hot arma_assert_same_size ( const u32  A_n_rows,
const u32  A_n_cols,
const u32  B_n_rows,
const u32  B_n_cols,
const char *  x 
) [inline]
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Mat< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

stop if given matrices have different sizes

Definition at line 323 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.

00324   {
00325   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00326     {
00327     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00328     }
00329   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Proxy< eT1 > &  A,
const Proxy< eT2 > &  B,
const char *  x 
) [inline]

stop if given proxies have different sizes

Definition at line 338 of file debug.hpp.

References arma_incompat_size_string(), and arma_stop().

00339   {
00340   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00341     {
00342     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00343     }
00344   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview< eT1 > &  A,
const subview< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 352 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.

00353   {
00354   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00355     {
00356     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00357     }
00358   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Mat< eT1 > &  A,
const subview< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 366 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, Mat< eT >::n_cols, subview< eT >::n_rows, and Mat< eT >::n_rows.

00367   {
00368   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00369     {
00370     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00371     }
00372   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 380 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview< eT >::n_cols, Mat< eT >::n_rows, and subview< eT >::n_rows.

00381   {
00382   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00383     {
00384     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00385     }
00386   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Mat< eT1 > &  A,
const Proxy< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 394 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.

00395   {
00396   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00397     {
00398     arma_stop ( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00399     }
00400   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Proxy< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 408 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.

00409   {
00410   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00411     {
00412     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00413     }
00414   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Proxy< eT1 > &  A,
const subview< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 422 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.

00423   {
00424   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00425     {
00426     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00427     }
00428   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview< eT1 > &  A,
const Proxy< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 436 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.

00437   {
00438   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) )
00439     {
00440     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00441     }
00442   }

std::string arma_incompat_size_string ( const u32  A_n_rows,
const u32  A_n_cols,
const u32  A_n_slices,
const u32  B_n_rows,
const u32  B_n_cols,
const u32  B_n_slices,
const char *  x 
) [inline]

Definition at line 453 of file debug.hpp.

00454   {
00455   std::stringstream tmp;
00456   
00457   tmp << x << ": incompatible cube dimensions: (" << A_n_rows << ',' << A_n_cols << ',' << A_n_slices << ") and (" << B_n_rows << ',' << B_n_cols << ',' << B_n_slices << ')';
00458   
00459   return tmp.str();
00460   }

void arma_hot arma_assert_same_size ( const u32  A_n_rows,
const u32  A_n_cols,
const u32  A_n_slices,
const u32  B_n_rows,
const u32  B_n_cols,
const u32  B_n_slices,
const char *  x 
) [inline]

Definition at line 467 of file debug.hpp.

References arma_incompat_size_string(), and arma_stop().

00468   {
00469   if( (A_n_rows != B_n_rows) || (A_n_cols != B_n_cols) || (A_n_slices != B_n_slices) )
00470     {
00471     arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, A_n_slices, B_n_rows, B_n_cols, B_n_slices, x) );
00472     }
00473   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Cube< eT1 > &  A,
const Cube< eT2 > &  B,
const char *  x 
) [inline]

stop if given cubes have different sizes

Definition at line 482 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Cube< eT >::n_cols, Cube< eT >::n_rows, and Cube< eT >::n_slices.

00483   {
00484   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices) )
00485     {
00486     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) );
00487     }
00488   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Cube< eT1 > &  A,
const subview_cube< eT2 > &  B,
const char *  x 
) [inline]
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview_cube< eT1 > &  A,
const Cube< eT2 > &  B,
const char *  x 
) [inline]
template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview_cube< eT1 > &  A,
const subview_cube< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 524 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview_cube< eT >::n_cols, subview_cube< eT >::n_rows, and subview_cube< eT >::n_slices.

00525   {
00526   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices))
00527     {
00528     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) );
00529     }
00530   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const ProxyCube< eT1 > &  A,
const ProxyCube< eT2 > &  B,
const char *  x 
) [inline]

stop if given cube proxies have different sizes

Definition at line 539 of file debug.hpp.

References arma_incompat_size_string(), and arma_stop().

00540   {
00541   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != B.n_slices))
00542     {
00543     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, B.n_slices, x) );
00544     }
00545   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Cube< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 558 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, Cube< eT >::n_cols, Mat< eT >::n_rows, Cube< eT >::n_rows, and Cube< eT >::n_slices.

00559   {
00560   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != 1) )
00561     {
00562     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, 1, x) );
00563     }
00564   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Mat< eT1 > &  A,
const Cube< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 572 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Cube< eT >::n_cols, Mat< eT >::n_cols, Cube< eT >::n_rows, Mat< eT >::n_rows, and Cube< eT >::n_slices.

00573   {
00574   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (1 != B.n_slices) )
00575     {
00576     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, 1, B.n_rows, B.n_cols, B.n_slices, x) );
00577     }
00578   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const subview_cube< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 586 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview_cube< eT >::n_cols, Mat< eT >::n_rows, subview_cube< eT >::n_rows, and subview_cube< eT >::n_slices.

00587   {
00588   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (A.n_slices != 1) )
00589     {
00590     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, A.n_slices, B.n_rows, B.n_cols, 1, x) );
00591     }
00592   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_same_size ( const Mat< eT1 > &  A,
const subview_cube< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 600 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview_cube< eT >::n_cols, Mat< eT >::n_cols, subview_cube< eT >::n_rows, Mat< eT >::n_rows, and subview_cube< eT >::n_slices.

00601   {
00602   if( (A.n_rows != B.n_rows) || (A.n_cols != B.n_cols) || (1 != B.n_slices) )
00603     {
00604     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, 1, B.n_rows, B.n_cols, B.n_slices, x) );
00605     }
00606   }

void arma_hot arma_assert_mul_size ( const u32  A_n_rows,
const u32  A_n_cols,
const u32  B_n_rows,
const u32  B_n_cols,
const char *  x 
) [inline]

Definition at line 618 of file debug.hpp.

References arma_incompat_size_string(), and arma_stop().

00619   {
00620   if(A_n_cols != B_n_rows)
00621     {
00622     arma_stop( arma_incompat_size_string(A_n_rows, A_n_cols, B_n_rows, B_n_cols, x) );
00623     }
00624   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size ( const Mat< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

stop if given matrices are incompatible for multiplication

Definition at line 633 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.

00634   {
00635   if(A.n_cols != B.n_rows)
00636     {
00637     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00638     }
00639   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size ( const Mat< eT1 > &  A,
const Mat< eT2 > &  B,
const bool  do_trans_A,
const bool  do_trans_B,
const char *  x 
) [inline]

stop if given matrices are incompatible for multiplication

Definition at line 648 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, and Mat< eT >::n_rows.

00649   {
00650   const u32 final_A_n_cols = (do_trans_A == false) ? A.n_cols : A.n_rows;
00651   const u32 final_B_n_rows = (do_trans_B == false) ? B.n_rows : B.n_cols;
00652     
00653   if(final_A_n_cols != final_B_n_rows)
00654     {
00655     const u32 final_A_n_rows = (do_trans_A == false) ? A.n_rows : A.n_cols;
00656     const u32 final_B_n_cols = (do_trans_B == false) ? B.n_cols : B.n_rows;
00657     
00658     arma_stop( arma_incompat_size_string(final_A_n_rows, final_A_n_cols, final_B_n_rows, final_B_n_cols, x) );
00659     }
00660   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size ( const Mat< eT1 > &  A,
const subview< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 668 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, Mat< eT >::n_cols, Mat< eT >::n_rows, and subview< eT >::n_rows.

00669   {
00670   if(A.n_cols != B.n_rows)
00671     {
00672     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00673     }
00674   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size ( const subview< eT1 > &  A,
const Mat< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 682 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), Mat< eT >::n_cols, subview< eT >::n_cols, subview< eT >::n_rows, and Mat< eT >::n_rows.

00683   {
00684   if(A.n_cols != B.n_rows)
00685     {
00686     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00687     }
00688   }

template<typename eT1 , typename eT2 >
void arma_hot arma_assert_mul_size ( const subview< eT1 > &  A,
const subview< eT2 > &  B,
const char *  x 
) [inline]

Definition at line 696 of file debug.hpp.

References arma_incompat_size_string(), arma_stop(), subview< eT >::n_cols, and subview< eT >::n_rows.

00697   {
00698   if(A.n_cols != B.n_rows)
00699     {
00700     arma_stop( arma_incompat_size_string(A.n_rows, A.n_cols, B.n_rows, B.n_cols, x) );
00701     }
00702   }