~ubuntu-branches/ubuntu/trusty/r-cran-rcpparmadillo/trusty-proposed

« back to all changes in this revision

Viewing changes to inst/include/armadillo_bits/Mat_meat.hpp

  • Committer: Package Import Robot
  • Author(s): Dirk Eddelbuettel
  • Date: 2013-11-19 21:22:00 UTC
  • mfrom: (1.1.8)
  • Revision ID: package-import@ubuntu.com-20131119212200-kafi3myq8y1urtbo
Tags: 0.3.920.3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
794
794
    else
795
795
    if( (A_use_local_mem == true) && (B_use_local_mem == true) )
796
796
      {
 
797
      eT* A_mem_local = &(A.mem_local[0]);
 
798
      eT* B_mem_local = &(B.mem_local[0]);
 
799
      
 
800
      access::rw(A.mem) = A_mem_local;
 
801
      access::rw(B.mem) = B_mem_local;
 
802
      
797
803
      const uword N = (std::max)(A_n_elem, B_n_elem);
798
804
      
799
 
      eT* A_mem = A.memptr();
800
 
      eT* B_mem = B.memptr();
801
 
      
802
 
      for(uword ii=0; ii < N; ++ii)  { std::swap( A_mem[ii], B_mem[ii] ); }
 
805
      for(uword ii=0; ii < N; ++ii)  { std::swap( A_mem_local[ii], B_mem_local[ii] ); }
803
806
      }
804
807
    else
805
808
    if( (A_use_local_mem == true) && (B_use_local_mem == false) )