[Rcpp-commits] r3144 - in pkg/RcppArmadillo: . inst inst/include/armadillo_bits

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 17 17:41:12 CEST 2011


Author: edd
Date: 2011-07-17 17:41:12 +0200 (Sun, 17 Jul 2011)
New Revision: 3144

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_diagmat_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/op_symmat_meat.hpp
Log:
RcppArmadillo 0.2.26 with Armadillo 2.0.2


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/ChangeLog	2011-07-17 15:41:12 UTC (rev 3144)
@@ -1,3 +1,9 @@
+2011-07-17  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.2.26
+
+	* inst/include/*: Updated to release 2.0.2 of Armadillo
+
 2011-06-30  Dirk Eddelbuettel  <edd at debian.org>
 
 	* DESCRIPTION: Release 0.2.25

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/DESCRIPTION	2011-07-17 15:41:12 UTC (rev 3144)
@@ -1,7 +1,7 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.2.25
+Version: 0.2.26
 Date: $Date$
 Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
 Maintainer: Romain Francois, Dirk Eddelbuettel and Doug Bates <RcppArmadillo-authors at r-enthusiasts.com>
@@ -21,7 +21,7 @@
  (due to speed and/or integration capabilities), rather than another language.
  .
  The RcppArmadillo package includes the header files from the templated
- Armadillo library (currently version 2.0.0). Thus users do not need to
+ Armadillo library (currently version 2.0.2). Thus users do not need to
  install Armadillo itself in order to use RcppArmadillo.
  .
  This Armadillo integration provides a nice illustration of the 

Modified: pkg/RcppArmadillo/inst/NEWS
===================================================================
--- pkg/RcppArmadillo/inst/NEWS	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/NEWS	2011-07-17 15:41:12 UTC (rev 3144)
@@ -1,3 +1,11 @@
+0.2.26  2011-07-17
+
+    o   Upgraded to Armadillo release 2.0.2 
+
+          * fix for handling of conjugate transpose by as_scalar()
+          * fix for handling of aliasing by diagmat()
+          * fix for handling of empty matrices by symmatu()/symmatl()
+
 0.2.25  2011-06-30
 
     o   Upgraded to Armadillo 2.0.1 which fixes two minor compilation issues

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2011-07-17 15:41:12 UTC (rev 3144)
@@ -18,7 +18,7 @@
 
 #define ARMA_VERSION_MAJOR 2
 #define ARMA_VERSION_MINOR 0
-#define ARMA_VERSION_PATCH 1
+#define ARMA_VERSION_PATCH 2
 #define ARMA_VERSION_NAME  "Carnivorous Sugar Glider"
 // http://en.wikipedia.org/wiki/Sugar_glider
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp	2011-07-17 15:41:12 UTC (rev 3144)
@@ -1,5 +1,5 @@
-// Copyright (C) 2010 NICTA (www.nicta.com.au)
-// Copyright (C) 2010 Conrad Sanderson
+// Copyright (C) 2010-2011 NICTA (www.nicta.com.au)
+// Copyright (C) 2010-2011 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -316,9 +316,10 @@
 arma_inline
 arma_warn_unused
 typename T1::elem_type
-as_scalar(const Glue<T1, T2, glue_times>& X)
+as_scalar(const Glue<T1, T2, glue_times>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = 0)
   {
   arma_extra_debug_sigprint();
+  arma_ignore(junk);
   
   if(is_glue_times_diag<T1>::value == false)
     {

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_meat.hpp	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/glue_times_meat.hpp	2011-07-17 15:41:12 UTC (rev 3144)
@@ -35,7 +35,7 @@
   const bool do_trans_A = tmp1.do_trans;
   const bool do_trans_B = tmp2.do_trans;
 
-  const bool use_alpha = tmp1.do_times | tmp2.do_times;
+  const bool use_alpha = tmp1.do_times || tmp2.do_times;
   const eT       alpha = use_alpha ? (tmp1.val * tmp2.val) : eT(0);
   
   glue_times::apply(out, A, B, alpha, do_trans_A, do_trans_B, use_alpha);
@@ -67,7 +67,7 @@
   const bool do_trans_B = tmp2.do_trans;
   const bool do_trans_C = tmp3.do_trans;
   
-  const bool use_alpha = tmp1.do_times | tmp2.do_times | tmp3.do_times;
+  const bool use_alpha = tmp1.do_times || tmp2.do_times || tmp3.do_times;
   const eT       alpha = use_alpha ? (tmp1.val * tmp2.val * tmp3.val) : eT(0);
   
   glue_times::apply(out, A, B, C, alpha, do_trans_A, do_trans_B, do_trans_C, use_alpha);
@@ -102,7 +102,7 @@
   const bool do_trans_C = tmp3.do_trans;
   const bool do_trans_D = tmp4.do_trans;
   
-  const bool use_alpha = tmp1.do_times | tmp2.do_times | tmp3.do_times | tmp4.do_times;
+  const bool use_alpha = tmp1.do_times || tmp2.do_times || tmp3.do_times || tmp4.do_times;
   const eT       alpha = use_alpha ? (tmp1.val * tmp2.val * tmp3.val * tmp4.val) : eT(0);
   
   glue_times::apply(out, A, B, C, D, alpha, do_trans_A, do_trans_B, do_trans_C, do_trans_D, use_alpha);
@@ -193,7 +193,7 @@
   
   const bool do_trans_A = tmp1.do_trans;
   const bool do_trans_B = tmp2.do_trans;
-  const bool use_alpha  = tmp1.do_times | tmp2.do_times | (sign < s32(0));
+  const bool use_alpha  = tmp1.do_times || tmp2.do_times || (sign < s32(0));
   
   arma_debug_assert_mul_size(A, B, do_trans_A, do_trans_B, "matrix multiplication");
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/op_diagmat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/op_diagmat_meat.hpp	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/op_diagmat_meat.hpp	2011-07-17 15:41:12 UTC (rev 3144)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
-// Copyright (C) 2008-2010 Conrad Sanderson
+// Copyright (C) 2008-2011 NICTA (www.nicta.com.au)
+// Copyright (C) 2008-2011 Conrad Sanderson
 // 
 // This file is part of the Armadillo C++ library.
 // It is provided without any warranty of fitness
@@ -69,12 +69,32 @@
     
     const u32 N = A.n_rows;
     
-    out.zeros(N,N);
-    
-    for(u32 i=0; i<N; ++i)
+    if(&out != &A)
       {
-      out.at(i,i) = A.at(i,i);
+      // no aliasing
+      
+      out.zeros(N,N);
+      
+      for(u32 i=0; i<N; ++i)
+        {
+        out.at(i,i) = A.at(i,i);
+        }
       }
+    else
+      {
+      // aliasing
+      
+      for(u32 i=0; i<N; ++i)
+        {
+        eT* colptr = out.colptr(i);
+        
+        // clear above the diagonal
+        arrayops::inplace_set(colptr, eT(0), i);
+        
+        // clear below the diagonal
+        arrayops::inplace_set(colptr+(i+1), eT(0), N-1-i);
+        }
+      }
     }
   }
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/op_symmat_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/op_symmat_meat.hpp	2011-07-16 15:18:00 UTC (rev 3143)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/op_symmat_meat.hpp	2011-07-17 15:41:12 UTC (rev 3144)
@@ -88,7 +88,7 @@
     {
     // reflect elements across the diagonal from lower triangle to upper triangle
     
-    for(u32 col=0; col < (N-1); ++col)
+    for(u32 col=0; col < N; ++col)
       {
       const eT* coldata = out.colptr(col);
       
@@ -174,7 +174,7 @@
     {
     // reflect elements across the diagonal from lower triangle to upper triangle
     
-    for(u32 col=0; col < (N-1); ++col)
+    for(u32 col=0; col < N; ++col)
       {
       const eT* coldata = out.colptr(col);
       



More information about the Rcpp-commits mailing list