#include <syslib_proto.hpp>
Static Public Member Functions | |
template<typename eT > | |
static arma_hot void | copy_elem (eT *dest, const eT *src, const u32 n_elem) |
template<typename out_eT , typename in_eT > | |
static arma_hot void | copy_and_convert_elem (out_eT *dest, const in_eT *src, const u32 n_elem) |
template<typename out_eT , typename in_eT > | |
arma_hot static arma_inline void | convert_cx_scalar (out_eT &out, const in_eT &in) |
template<typename out_eT , typename in_T > | |
arma_hot static arma_inline void | convert_cx_scalar (out_eT &out, const std::complex< in_T > &in) |
template<typename out_T , typename in_T > | |
arma_hot static arma_inline void | convert_cx_scalar (std::complex< out_T > &out, const std::complex< in_T > &in) |
template<typename out_eT , typename in_eT > | |
static arma_hot void | copy_and_convert_cx_elem (out_eT *dest, const in_eT *src, const u32 n_elem) |
Definition at line 21 of file syslib_proto.hpp.
static arma_hot void syslib::copy_elem | ( | eT * | dest, | |
const eT * | src, | |||
const u32 | n_elem | |||
) | [inline, static] |
Definition at line 30 of file syslib_proto.hpp.
Referenced by op_reshape::apply(), op_trans::apply_noalias(), Cube< eT >::Cube(), subview< eT >::extract(), Mat< eT >::init(), Cube< eT >::init(), Mat< eT >::Mat(), subview< eT >::operator=(), podarray< eT >::operator=(), subview< eT >::operator_equ_mat(), podarray< eT >::podarray(), auxlib::solve_od(), and auxlib::solve_ud().
00031 { 00032 #if !defined(__OPTIMIZE__) 00033 { 00034 std::memcpy(dest, src, n_elem*sizeof(eT)); 00035 } 00036 #else 00037 { 00038 switch(n_elem) 00039 { 00040 case 0: 00041 break; 00042 00043 case 1: 00044 *dest = *src; 00045 break; 00046 00047 case 2: 00048 dest[0] = src[0]; 00049 dest[1] = src[1]; 00050 break; 00051 00052 case 3: 00053 dest[0] = src[0]; 00054 dest[1] = src[1]; 00055 dest[2] = src[2]; 00056 break; 00057 00058 case 4: 00059 dest[0] = src[0]; 00060 dest[1] = src[1]; 00061 dest[2] = src[2]; 00062 dest[3] = src[3]; 00063 break; 00064 00065 default: 00066 if( n_elem <= (128/sizeof(eT)) ) 00067 { 00068 u32 i,j; 00069 00070 for(i=0, j=1; j<n_elem; i+=2, j+=2) 00071 { 00072 dest[i] = src[i]; 00073 dest[j] = src[j]; 00074 } 00075 00076 if(i < n_elem) 00077 { 00078 dest[i] = src[i]; 00079 } 00080 } 00081 else 00082 { 00083 std::memcpy(dest, src, n_elem*sizeof(eT)); 00084 } 00085 } 00086 } 00087 #endif 00088 }
static arma_hot void syslib::copy_and_convert_elem | ( | out_eT * | dest, | |
const in_eT * | src, | |||
const u32 | n_elem | |||
) | [inline, static] |
Definition at line 97 of file syslib_proto.hpp.
Referenced by conv_to< itpp::Vec< out_eT > >::from(), conv_to< itpp::Mat< out_eT > >::from(), conv_to< Cube< out_eT > >::from(), conv_to< Col< out_eT > >::from(), conv_to< Row< out_eT > >::from(), and conv_to< Mat< out_eT > >::from().
00098 { 00099 u32 i,j; 00100 00101 for(i=0, j=1; j<n_elem; i+=2, j+=2) 00102 { 00103 dest[i] = out_eT( src[i] ); 00104 dest[j] = out_eT( src[j] ); 00105 } 00106 00107 if(i < n_elem) 00108 { 00109 dest[i] = out_eT( src[i] ); 00110 } 00111 }
arma_hot static arma_inline void syslib::convert_cx_scalar | ( | out_eT & | out, | |
const in_eT & | in | |||
) | [inline, static] |
Definition at line 124 of file syslib_proto.hpp.
Referenced by copy_and_convert_cx_elem(), conv_to< std::vector< out_eT > >::from(), conv_to< Col< out_eT > >::from(), conv_to< Row< out_eT > >::from(), conv_to< Mat< out_eT > >::from(), and conv_to< out_eT >::from().
arma_hot static arma_inline void syslib::convert_cx_scalar | ( | out_eT & | out, | |
const std::complex< in_T > & | in | |||
) | [inline, static] |
Definition at line 136 of file syslib_proto.hpp.
arma_hot static arma_inline void syslib::convert_cx_scalar | ( | std::complex< out_T > & | out, | |
const std::complex< in_T > & | in | |||
) | [inline, static] |
Definition at line 148 of file syslib_proto.hpp.
static arma_hot void syslib::copy_and_convert_cx_elem | ( | out_eT * | dest, | |
const in_eT * | src, | |||
const u32 | n_elem | |||
) | [inline, static] |
Definition at line 162 of file syslib_proto.hpp.
References convert_cx_scalar().
Referenced by conv_to< itpp::Vec< out_eT > >::from(), conv_to< itpp::Mat< out_eT > >::from(), conv_to< Cube< out_eT > >::from(), conv_to< Col< out_eT > >::from(), conv_to< Row< out_eT > >::from(), and conv_to< Mat< out_eT > >::from().
00163 { 00164 u32 i,j; 00165 00166 for(i=0, j=1; j<n_elem; i+=2, j+=2) 00167 { 00168 convert_cx_scalar( dest[i], src[i] ); 00169 convert_cx_scalar( dest[j], src[j] ); 00170 } 00171 00172 if(i < n_elem) 00173 { 00174 convert_cx_scalar( dest[i], src[i] ); 00175 } 00176 }