syslib Class Reference
[Syslib]

#include <syslib_proto.hpp>

List of all members.

Static Public Member Functions

template<typename eT >
static arma_hot void copy_elem (eT *dest, const eT *src, const u32 n_elem)

Detailed Description

Definition at line 21 of file syslib_proto.hpp.


Member Function Documentation

template<typename eT >
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(), conv_to< itpp::Vec< out_eT > >::from(), conv_to< itpp::Mat< out_eT > >::from(), conv_to< Col< out_eT > >::from(), conv_to< Row< out_eT > >::from(), Mat< eT >::init(), Cube< eT >::init(), Mat< eT >::Mat(), podarray< eT >::operator=(), podarray< eT >::podarray(), auxlib::solve_od(), and auxlib::solve_ud().

00031     {
00032     if( n_elem <= (128/sizeof(eT)) )
00033       {
00034       u32 i,j;
00035       
00036       for(i=0, j=1; j<n_elem; i+=2, j+=2)
00037         {
00038         dest[i] = src[i];
00039         dest[j] = src[j];
00040         }
00041       
00042       if(i < n_elem)
00043         {
00044         dest[i] = src[i];
00045         }
00046       }
00047     else
00048       {
00049       std::memcpy(dest, src, n_elem*sizeof(eT));
00050       }
00051     
00052     }