Classes | |
class | op_log |
class | op_trunc_log |
class | op_log10 |
class | op_exp |
class | op_trunc_exp |
class | op_sqrt |
class | op_square |
class | op_pow |
class | op_pow_s32 |
class | op_conj |
Functions | |
template<typename T1 > | |
static void | op_log::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_log > &in) |
template<typename T1 > | |
static void | op_log::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_log > &in) |
template<typename T1 > | |
static void | op_trunc_log::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_trunc_log > &in) |
template<typename T1 > | |
static void | op_trunc_log::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_trunc_log > &in) |
template<typename T1 > | |
static void | op_log10::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_log10 > &in) |
template<typename T1 > | |
static void | op_log10::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_log10 > &in) |
template<typename T1 > | |
static void | op_exp::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_exp > &in) |
template<typename T1 > | |
static void | op_exp::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_exp > &in) |
template<typename T1 > | |
static void | op_trunc_exp::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_trunc_exp > &in) |
template<typename T1 > | |
static void | op_trunc_exp::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_trunc_exp > &in) |
template<typename T1 > | |
static void | op_sqrt::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_sqrt > &in) |
template<typename T1 > | |
static void | op_sqrt::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_sqrt > &in) |
template<typename T1 > | |
static void | op_square::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_square > &in) |
template<typename T1 > | |
static void | op_square::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_square > &in) |
template<typename T1 , typename T2 > | |
static T1 | op_pow::internal_pow (const T1 base, const T2 exponent) |
template<typename T2 > | |
static char | op_pow::internal_pow (const char base, const T2 exponent) |
template<typename T2 > | |
static unsigned char | op_pow::internal_pow (const unsigned char base, const T2 exponent) |
template<typename T2 > | |
static int | op_pow::internal_pow (const int base, const T2 exponent) |
template<typename T2 > | |
static unsigned int | op_pow::internal_pow (const unsigned int base, const T2 exponent) |
template<typename T1 > | |
static void | op_pow::apply (Mat< typename T1::pod_type > &out, const Op< T1, op_pow > &in) |
template<typename T1 > | |
static void | op_pow::apply (Cube< typename T1::pod_type > &out, const OpCube< T1, op_pow > &in) |
template<typename T1 > | |
static void | op_pow::apply (Mat< std::complex< typename T1::pod_type > > &out, const Op< T1, op_pow > &in) |
template<typename T1 > | |
static void | op_pow::apply (Cube< std::complex< typename T1::pod_type > > &out, const OpCube< T1, op_pow > &in) |
template<typename T1 > | |
static T1 | op_pow_s32::internal_pow (const T1 base, const int exponent) |
static char | op_pow_s32::internal_pow (const char base, const int exponent) |
static unsigned char | op_pow_s32::internal_pow (const unsigned char base, const int exponent) |
static int | op_pow_s32::internal_pow (const int base, const int exponent) |
static unsigned int | op_pow_s32::internal_pow (const unsigned int base, const int exponent) |
template<typename T1 > | |
static void | op_pow_s32::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_pow_s32 > &in) |
template<typename T1 > | |
static void | op_pow_s32::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_pow_s32 > &in) |
template<typename T1 > | |
static void | op_conj::apply (Mat< typename T1::elem_type > &out, const Op< T1, op_conj > &in) |
template<typename T1 > | |
static void | op_conj::apply (Cube< typename T1::elem_type > &out, const OpCube< T1, op_conj > &in) |
void op_log::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_log > & | in | |||
) | [inline, static, inherited] |
Definition at line 24 of file op_misc_meat.hpp.
References log(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00025 { 00026 arma_extra_debug_sigprint(); 00027 00028 typedef typename T1::elem_type eT; 00029 00030 const unwrap_write<T1> tmp(out, in.m); 00031 const Mat<eT>& A = tmp.M; 00032 00033 eT* out_mem = out.memptr(); 00034 const eT* A_mem = A.memptr(); 00035 const u32 n_elem = out.n_elem; 00036 00037 for(u32 i=0; i<n_elem; ++i) 00038 { 00039 out_mem[i] = std::log(A_mem[i]); 00040 } 00041 }
void op_log::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_log > & | in | |||
) | [inline, static, inherited] |
Definition at line 48 of file op_misc_meat.hpp.
References log(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00049 { 00050 arma_extra_debug_sigprint(); 00051 00052 typedef typename T1::elem_type eT; 00053 00054 const unwrap_cube_write<T1> tmp(out, in.m); 00055 const Cube<eT>& A = tmp.M; 00056 00057 eT* out_mem = out.memptr(); 00058 const eT* A_mem = A.memptr(); 00059 const u32 n_elem = out.n_elem; 00060 00061 for(u32 i=0; i<n_elem; ++i) 00062 { 00063 out_mem[i] = std::log(A_mem[i]); 00064 } 00065 }
void op_trunc_log::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_trunc_log > & | in | |||
) | [inline, static, inherited] |
Definition at line 72 of file op_misc_meat.hpp.
References Op< T1, op_type >::m, Mat< eT >::memptr(), Mat< eT >::n_elem, and trunc_log().
00073 { 00074 arma_extra_debug_sigprint(); 00075 00076 typedef typename T1::elem_type eT; 00077 00078 const unwrap_write<T1> tmp(out, in.m); 00079 const Mat<eT>& A = tmp.M; 00080 00081 eT* out_mem = out.memptr(); 00082 const eT* A_mem = A.memptr(); 00083 const u32 n_elem = out.n_elem; 00084 00085 for(u32 i=0; i<n_elem; ++i) 00086 { 00087 out_mem[i] = trunc_log(A_mem[i]); 00088 } 00089 }
void op_trunc_log::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_trunc_log > & | in | |||
) | [inline, static, inherited] |
Definition at line 96 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::m, Cube< eT >::memptr(), Cube< eT >::n_elem, and trunc_log().
00097 { 00098 arma_extra_debug_sigprint(); 00099 00100 typedef typename T1::elem_type eT; 00101 00102 const unwrap_cube_write<T1> tmp(out, in.m); 00103 const Cube<eT>& A = tmp.M; 00104 00105 eT* out_mem = out.memptr(); 00106 const eT* A_mem = A.memptr(); 00107 const u32 n_elem = out.n_elem; 00108 00109 for(u32 i=0; i<n_elem; ++i) 00110 { 00111 out_mem[i] = trunc_log(A_mem[i]); 00112 } 00113 }
void op_log10::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_log10 > & | in | |||
) | [inline, static, inherited] |
Definition at line 120 of file op_misc_meat.hpp.
References log10(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00121 { 00122 arma_extra_debug_sigprint(); 00123 00124 typedef typename T1::elem_type eT; 00125 00126 const unwrap_write<T1> tmp(out, in.m); 00127 const Mat<eT>& A = tmp.M; 00128 00129 eT* out_mem = out.memptr(); 00130 const eT* A_mem = A.memptr(); 00131 const u32 n_elem = out.n_elem; 00132 00133 for(u32 i=0; i<n_elem; ++i) 00134 { 00135 out_mem[i] = std::log10(A_mem[i]); 00136 } 00137 }
void op_log10::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_log10 > & | in | |||
) | [inline, static, inherited] |
Definition at line 144 of file op_misc_meat.hpp.
References log10(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00145 { 00146 arma_extra_debug_sigprint(); 00147 00148 typedef typename T1::elem_type eT; 00149 00150 const unwrap_cube_write<T1> tmp(out, in.m); 00151 const Cube<eT>& A = tmp.M; 00152 00153 eT* out_mem = out.memptr(); 00154 const eT* A_mem = A.memptr(); 00155 const u32 n_elem = out.n_elem; 00156 00157 for(u32 i=0; i<n_elem; ++i) 00158 { 00159 out_mem[i] = std::log10(A_mem[i]); 00160 } 00161 }
void op_exp::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_exp > & | in | |||
) | [inline, static, inherited] |
Definition at line 168 of file op_misc_meat.hpp.
References exp(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00169 { 00170 arma_extra_debug_sigprint(); 00171 00172 typedef typename T1::elem_type eT; 00173 00174 const unwrap_write<T1> tmp(out, in.m); 00175 const Mat<eT>& A = tmp.M; 00176 00177 eT* out_mem = out.memptr(); 00178 const eT* A_mem = A.memptr(); 00179 const u32 n_elem = out.n_elem; 00180 00181 for(u32 i=0; i<n_elem; ++i) 00182 { 00183 out_mem[i] = std::exp(A_mem[i]); 00184 } 00185 }
void op_exp::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_exp > & | in | |||
) | [inline, static, inherited] |
Definition at line 192 of file op_misc_meat.hpp.
References exp(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00193 { 00194 arma_extra_debug_sigprint(); 00195 00196 typedef typename T1::elem_type eT; 00197 00198 const unwrap_cube_write<T1> tmp(out, in.m); 00199 const Cube<eT>& A = tmp.M; 00200 00201 eT* out_mem = out.memptr(); 00202 const eT* A_mem = A.memptr(); 00203 const u32 n_elem = out.n_elem; 00204 00205 for(u32 i=0; i<n_elem; ++i) 00206 { 00207 out_mem[i] = std::exp(A_mem[i]); 00208 } 00209 }
void op_trunc_exp::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_trunc_exp > & | in | |||
) | [inline, static, inherited] |
Definition at line 216 of file op_misc_meat.hpp.
References Op< T1, op_type >::m, Mat< eT >::memptr(), Mat< eT >::n_elem, and trunc_exp().
00217 { 00218 arma_extra_debug_sigprint(); 00219 00220 typedef typename T1::elem_type eT; 00221 00222 const unwrap_write<T1> tmp(out, in.m); 00223 const Mat<eT>& A = tmp.M; 00224 00225 eT* out_mem = out.memptr(); 00226 const eT* A_mem = A.memptr(); 00227 const u32 n_elem = out.n_elem; 00228 00229 for(u32 i=0; i<n_elem; ++i) 00230 { 00231 out_mem[i] = trunc_exp(A_mem[i]); 00232 } 00233 }
void op_trunc_exp::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_trunc_exp > & | in | |||
) | [inline, static, inherited] |
Definition at line 240 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::m, Cube< eT >::memptr(), Cube< eT >::n_elem, and trunc_exp().
00241 { 00242 arma_extra_debug_sigprint(); 00243 00244 typedef typename T1::elem_type eT; 00245 00246 const unwrap_cube_write<T1> tmp(out, in.m); 00247 const Cube<eT>& A = tmp.M; 00248 00249 eT* out_mem = out.memptr(); 00250 const eT* A_mem = A.memptr(); 00251 const u32 n_elem = out.n_elem; 00252 00253 for(u32 i=0; i<n_elem; ++i) 00254 { 00255 out_mem[i] = trunc_exp(A_mem[i]); 00256 } 00257 }
void op_sqrt::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_sqrt > & | in | |||
) | [inline, static, inherited] |
Definition at line 264 of file op_misc_meat.hpp.
References Op< T1, op_type >::m, Mat< eT >::memptr(), Mat< eT >::n_elem, and sqrt().
00265 { 00266 arma_extra_debug_sigprint(); 00267 00268 typedef typename T1::elem_type eT; 00269 00270 const unwrap_write<T1> tmp(out, in.m); 00271 const Mat<eT>& A = tmp.M; 00272 00273 eT* out_mem = out.memptr(); 00274 const eT* A_mem = A.memptr(); 00275 const u32 n_elem = out.n_elem; 00276 00277 for(u32 i=0; i<n_elem; ++i) 00278 { 00279 out_mem[i] = std::sqrt(A_mem[i]); 00280 } 00281 }
void op_sqrt::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_sqrt > & | in | |||
) | [inline, static, inherited] |
Definition at line 288 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::m, Cube< eT >::memptr(), Cube< eT >::n_elem, and sqrt().
00289 { 00290 arma_extra_debug_sigprint(); 00291 00292 typedef typename T1::elem_type eT; 00293 00294 const unwrap_cube_write<T1> tmp(out, in.m); 00295 const Cube<eT>& A = tmp.M; 00296 00297 eT* out_mem = out.memptr(); 00298 const eT* A_mem = A.memptr(); 00299 const u32 n_elem = out.n_elem; 00300 00301 for(u32 i=0; i<n_elem; ++i) 00302 { 00303 out_mem[i] = std::sqrt(A_mem[i]); 00304 } 00305 }
void op_square::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_square > & | in | |||
) | [inline, static, inherited] |
Definition at line 312 of file op_misc_meat.hpp.
References Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00313 { 00314 arma_extra_debug_sigprint(); 00315 00316 typedef typename T1::elem_type eT; 00317 00318 const unwrap_write<T1> tmp(out, in.m); 00319 const Mat<eT>& A = tmp.M; 00320 00321 eT* out_mem = out.memptr(); 00322 const eT* A_mem = A.memptr(); 00323 const u32 n_elem = out.n_elem; 00324 00325 for(u32 i=0; i<n_elem; ++i) 00326 { 00327 const eT val = A_mem[i]; 00328 out_mem[i] = val*val; 00329 } 00330 }
void op_square::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_square > & | in | |||
) | [inline, static, inherited] |
Definition at line 337 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00338 { 00339 arma_extra_debug_sigprint(); 00340 00341 typedef typename T1::elem_type eT; 00342 00343 const unwrap_cube_write<T1> tmp(out, in.m); 00344 const Cube<eT>& A = tmp.M; 00345 00346 eT* out_mem = out.memptr(); 00347 const eT* A_mem = A.memptr(); 00348 const u32 n_elem = out.n_elem; 00349 00350 for(u32 i=0; i<n_elem; ++i) 00351 { 00352 const eT val = A_mem[i]; 00353 out_mem[i] = val*val; 00354 } 00355 }
T1 op_pow::internal_pow | ( | const T1 | base, | |
const T2 | exponent | |||
) | [inline, static, inherited] |
Definition at line 362 of file op_misc_meat.hpp.
References pow().
Referenced by op_pow::apply().
00363 { 00364 return std::pow(base, exponent); 00365 }
char op_pow::internal_pow | ( | const char | base, | |
const T2 | exponent | |||
) | [inline, static, inherited] |
Definition at line 372 of file op_misc_meat.hpp.
References pow().
00373 { 00374 typedef char out_type; 00375 return out_type( std::pow(double(base), exponent) ); 00376 }
unsigned char op_pow::internal_pow | ( | const unsigned char | base, | |
const T2 | exponent | |||
) | [inline, static, inherited] |
Definition at line 383 of file op_misc_meat.hpp.
References pow().
00384 { 00385 typedef unsigned char out_type; 00386 return out_type( std::pow(double(base), exponent) ); 00387 }
int op_pow::internal_pow | ( | const int | base, | |
const T2 | exponent | |||
) | [inline, static, inherited] |
Definition at line 394 of file op_misc_meat.hpp.
References pow().
00395 { 00396 typedef int out_type; 00397 return out_type( std::pow(double(base), exponent) ); 00398 }
unsigned int op_pow::internal_pow | ( | const unsigned int | base, | |
const T2 | exponent | |||
) | [inline, static, inherited] |
Definition at line 405 of file op_misc_meat.hpp.
References pow().
00406 { 00407 typedef unsigned int out_type; 00408 return out_type( std::pow(double(base), exponent) ); 00409 }
void op_pow::apply | ( | Mat< typename T1::pod_type > & | out, | |
const Op< T1, op_pow > & | in | |||
) | [inline, static, inherited] |
Definition at line 416 of file op_misc_meat.hpp.
References Op< T1, op_type >::aux, op_pow::internal_pow(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00417 { 00418 arma_extra_debug_sigprint(); 00419 00420 typedef typename T1::elem_type eT; 00421 00422 const unwrap_write<T1> tmp(out, in.m); 00423 const Mat<eT>& A = tmp.M; 00424 00425 eT* out_mem = out.memptr(); 00426 const eT* A_mem = A.memptr(); 00427 const u32 n_elem = out.n_elem; 00428 00429 for(u32 i=0; i<n_elem; ++i) 00430 { 00431 //out_mem[i] = std::pow(A_mem[i], in.aux); 00432 out_mem[i] = op_pow::internal_pow(A_mem[i], in.aux); 00433 } 00434 00435 }
void op_pow::apply | ( | Cube< typename T1::pod_type > & | out, | |
const OpCube< T1, op_pow > & | in | |||
) | [inline, static, inherited] |
Definition at line 442 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::aux, op_pow::internal_pow(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00443 { 00444 arma_extra_debug_sigprint(); 00445 00446 typedef typename T1::elem_type eT; 00447 00448 const unwrap_cube_write<T1> tmp(in.m); 00449 const Cube<eT>& A = tmp.M; 00450 00451 eT* out_mem = out.memptr(); 00452 const eT* A_mem = A.memptr(); 00453 const u32 n_elem = out.n_elem; 00454 00455 for(u32 i=0; i<n_elem; ++i) 00456 { 00457 //out_mem[i] = std::pow(A_mem[i], in.aux); 00458 out_mem[i] = op_pow::internal_pow(A_mem[i], in.aux); 00459 } 00460 00461 }
void op_pow::apply | ( | Mat< std::complex< typename T1::pod_type > > & | out, | |
const Op< T1, op_pow > & | in | |||
) | [inline, static, inherited] |
Definition at line 468 of file op_misc_meat.hpp.
References Op< T1, op_type >::aux, Op< T1, op_type >::m, Mat< eT >::mem, Mat< eT >::n_elem, and pow().
00469 { 00470 arma_extra_debug_sigprint(); 00471 00472 typedef typename T1::pod_type T; 00473 typedef std::complex<T> eT; 00474 00475 isnt_same_type<eT, typename T1::elem_type>::check(); 00476 00477 const unwrap<T1> tmp(in.m); 00478 00479 const Mat<eT>& A = tmp.M; 00480 const u32 n_elem = A.n_elem; 00481 00482 //out.set_size(A.n_rows, A.n_cols); 00483 out.copy_size(A); 00484 00485 eT* out_ptr = out.memptr(); 00486 00487 00488 if(in.aux.imag() == T(0)) 00489 { 00490 const T in_aux_real = in.aux.real(); 00491 00492 for(u32 i=0; i<n_elem; ++i) 00493 { 00494 out_ptr[i] = std::pow(A.mem[i], in_aux_real); 00495 } 00496 } 00497 else 00498 { 00499 for(u32 i=0; i<n_elem; ++i) 00500 { 00501 out_ptr[i] = std::pow(A.mem[i], in.aux); 00502 } 00503 } 00504 }
void op_pow::apply | ( | Cube< std::complex< typename T1::pod_type > > & | out, | |
const OpCube< T1, op_pow > & | in | |||
) | [inline, static, inherited] |
Definition at line 511 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::aux, OpCube< T1, op_type >::m, Cube< eT >::mem, Cube< eT >::n_elem, and pow().
00512 { 00513 arma_extra_debug_sigprint(); 00514 00515 typedef typename T1::pod_type T; 00516 typedef std::complex<T> eT; 00517 00518 isnt_same_type<eT, typename T1::elem_type>::check(); 00519 00520 const unwrap_cube<T1> tmp(in.m); 00521 00522 const Cube<eT>& A = tmp.M; 00523 const u32 n_elem = A.n_elem; 00524 00525 //out.set_size(A.n_rows, A.n_cols, A.n_slices); 00526 out.copy_size(A); 00527 00528 eT* out_ptr = out.memptr(); 00529 00530 00531 if(in.aux.imag() == T(0)) 00532 { 00533 const T in_aux_real = in.aux.real(); 00534 00535 for(u32 i=0; i<n_elem; ++i) 00536 { 00537 out_ptr[i] = std::pow(A.mem[i], in_aux_real); 00538 } 00539 } 00540 else 00541 { 00542 for(u32 i=0; i<n_elem; ++i) 00543 { 00544 out_ptr[i] = std::pow(A.mem[i], in.aux); 00545 } 00546 } 00547 }
T1 op_pow_s32::internal_pow | ( | const T1 | base, | |
const int | exponent | |||
) | [inline, static, inherited] |
Definition at line 554 of file op_misc_meat.hpp.
References pow().
Referenced by op_pow_s32::apply().
00555 { 00556 return std::pow(base, exponent); 00557 }
char op_pow_s32::internal_pow | ( | const char | base, | |
const int | exponent | |||
) | [inline, static, inherited] |
Definition at line 563 of file op_misc_meat.hpp.
References pow().
00564 { 00565 typedef char out_type; 00566 return out_type( std::pow(double(base), exponent) ); 00567 }
unsigned char op_pow_s32::internal_pow | ( | const unsigned char | base, | |
const int | exponent | |||
) | [inline, static, inherited] |
Definition at line 573 of file op_misc_meat.hpp.
References pow().
00574 { 00575 typedef unsigned char out_type; 00576 return out_type( std::pow(double(base), exponent) ); 00577 }
int op_pow_s32::internal_pow | ( | const int | base, | |
const int | exponent | |||
) | [inline, static, inherited] |
Definition at line 583 of file op_misc_meat.hpp.
References pow().
00584 { 00585 typedef int out_type; 00586 return out_type( std::pow(double(base), exponent) ); 00587 }
unsigned int op_pow_s32::internal_pow | ( | const unsigned int | base, | |
const int | exponent | |||
) | [inline, static, inherited] |
Definition at line 593 of file op_misc_meat.hpp.
References pow().
00594 { 00595 typedef unsigned int out_type; 00596 return out_type( std::pow(double(base), exponent) ); 00597 }
void op_pow_s32::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_pow_s32 > & | in | |||
) | [inline, static, inherited] |
Definition at line 604 of file op_misc_meat.hpp.
References Op< T1, op_type >::aux_u32_a, Op< T1, op_type >::aux_u32_b, op_pow_s32::internal_pow(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00605 { 00606 arma_extra_debug_sigprint(); 00607 00608 typedef typename T1::elem_type eT; 00609 00610 const unwrap_write<T1> tmp(out, in.m); 00611 const Mat<eT>& A = tmp.M; 00612 00613 eT* out_mem = out.memptr(); 00614 const eT* A_mem = A.memptr(); 00615 const u32 n_elem = out.n_elem; 00616 00617 const int exponent = (in.aux_u32_b == 0) ? in.aux_u32_a : -in.aux_u32_a; 00618 00619 for(u32 i=0; i<n_elem; ++i) 00620 { 00621 //out_mem[i] = std::pow(A_mem[i], exponent); // causes problems with gcc 4.1/4.2 for base that has an integer type 00622 out_mem[i] = op_pow_s32::internal_pow(A_mem[i], exponent); 00623 } 00624 00625 }
void op_pow_s32::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_pow_s32 > & | in | |||
) | [inline, static, inherited] |
Definition at line 632 of file op_misc_meat.hpp.
References OpCube< T1, op_type >::aux_u32_a, OpCube< T1, op_type >::aux_u32_b, op_pow_s32::internal_pow(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00633 { 00634 arma_extra_debug_sigprint(); 00635 00636 typedef typename T1::elem_type eT; 00637 00638 const unwrap_cube_write<T1> tmp(out, in.m); 00639 const Cube<eT>& A = tmp.M; 00640 00641 eT* out_mem = out.memptr(); 00642 const eT* A_mem = A.memptr(); 00643 const u32 n_elem = out.n_elem; 00644 00645 const int exponent = (in.aux_u32_b == 0) ? in.aux_u32_a : -in.aux_u32_a; 00646 00647 for(u32 i=0; i<n_elem; ++i) 00648 { 00649 //out_mem[i] = std::pow(A_mem[i], exponent); // causes problems with gcc 4.1/4.2 for base that has an integer type 00650 out_mem[i] = op_pow_s32::internal_pow(A_mem[i], exponent); 00651 } 00652 00653 }
void op_conj::apply | ( | Mat< typename T1::elem_type > & | out, | |
const Op< T1, op_conj > & | in | |||
) | [inline, static, inherited] |
Definition at line 660 of file op_misc_meat.hpp.
References conj(), Op< T1, op_type >::m, Mat< eT >::memptr(), and Mat< eT >::n_elem.
00661 { 00662 arma_extra_debug_sigprint(); 00663 00664 typedef typename T1::elem_type eT; 00665 00666 const unwrap_write<T1> tmp(out, in.m); 00667 const Mat<eT>& A = tmp.M; 00668 00669 eT* out_mem = out.memptr(); 00670 const eT* A_mem = A.memptr(); 00671 const u32 n_elem = out.n_elem; 00672 00673 for(u32 i=0; i<n_elem; ++i) 00674 { 00675 out_mem[i] = std::conj(A_mem[i]); 00676 } 00677 }
void op_conj::apply | ( | Cube< typename T1::elem_type > & | out, | |
const OpCube< T1, op_conj > & | in | |||
) | [inline, static, inherited] |
Definition at line 684 of file op_misc_meat.hpp.
References conj(), OpCube< T1, op_type >::m, Cube< eT >::memptr(), and Cube< eT >::n_elem.
00685 { 00686 arma_extra_debug_sigprint(); 00687 00688 typedef typename T1::elem_type eT; 00689 00690 const unwrap_cube_write<T1> tmp(out, in.m); 00691 const Cube<eT>& A = tmp.M; 00692 00693 eT* out_mem = out.memptr(); 00694 const eT* A_mem = A.memptr(); 00695 const u32 n_elem = out.n_elem; 00696 00697 for(u32 i=0; i<n_elem; ++i) 00698 { 00699 out_mem[i] = std::conj(A_mem[i]); 00700 } 00701 }