Пример #1
0
arma_hot
inline
void
eop_core<eop_type>::apply(outT& out, const eOp<T1, eop_type>& x)
  {
  arma_extra_debug_sigprint();
  
  typedef typename T1::elem_type eT;
  
  // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing;
  // size setting and alias checking is done by either the Mat contructor or operator=()
  
  const eT  k       = x.aux;
        eT* out_mem = out.memptr();
  
  const bool use_mp = (arma_config::cxx11 && arma_config::openmp) && (eOp<T1, eop_type>::use_mp || (is_same_type<eop_type, eop_pow>::value && (is_cx<eT>::yes || x.aux != eT(2))));
  
  if(Proxy<T1>::use_at == false)
    {
    const uword n_elem = x.get_n_elem();
    
    if(use_mp && mp_gate<eT>::eval(n_elem))
      {
      typename Proxy<T1>::ea_type P = x.P.get_ea();
      
      arma_applier_1_mp(=);
      }
    else
      {
      if(memory::is_aligned(out_mem))
Пример #2
0
arma_hot
inline
void
eop_core<eop_type>::apply(outT& out, const eOp<T1, eop_type>& x)
  {
  arma_extra_debug_sigprint();
  
  typedef typename T1::elem_type eT;
  
  // NOTE: we're assuming that the matrix has already been set to the correct size and there is no aliasing;
  // size setting and alias checking is done by either the Mat contructor or operator=()
  
  const eT  k       = x.aux;
        eT* out_mem = out.memptr();
  
  if(Proxy<T1>::use_at == false)
    {
    const uword n_elem = x.get_n_elem();
    
    if(memory::is_aligned(out_mem))
      {
      memory::mark_as_aligned(out_mem);
      
      if(x.P.is_aligned())
        {
        typename Proxy<T1>::aligned_ea_type P = x.P.get_aligned_ea();
        
        arma_applier_1a(=);
        }
      else
        {
        typename Proxy<T1>::ea_type P = x.P.get_ea();
        
        arma_applier_1u(=);
        }
      }