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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 18 21:43:39 CEST 2011


Author: edd
Date: 2011-04-18 21:43:39 +0200 (Mon, 18 Apr 2011)
New Revision: 3004

Modified:
   pkg/RcppArmadillo/ChangeLog
   pkg/RcppArmadillo/DESCRIPTION
   pkg/RcppArmadillo/inst/NEWS
   pkg/RcppArmadillo/inst/doc/Makefile
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_proto.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/blas_proto.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp
   pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_proto.hpp
Log:
Release release 0.2.19 using Armadillo 1.2.0


Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/ChangeLog	2011-04-18 19:43:39 UTC (rev 3004)
@@ -1,3 +1,9 @@
+2011-04-18  Dirk Eddelbuettel  <edd at debian.org>
+
+	* DESCRIPTION: Release 0.2.19
+
+	* inst/include/*: Updated to Armadillo 1.2.0 "Unscrupulous Carbon Emitter"
+
 2011-04-08  Dirk Eddelbuettel  <edd at debian.org>
 
 	* R/fastLm.R: In print.summary.fastLm(), use 'P.values' not 'P.value'

Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/DESCRIPTION	2011-04-18 19:43:39 UTC (rev 3004)
@@ -1,7 +1,7 @@
 Package: RcppArmadillo
 Type: Package
 Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.2.18
+Version: 0.2.19
 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 1.1.92). Thus users do not need to
+ Armadillo library (currently version 1.2.0). 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-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/NEWS	2011-04-18 19:43:39 UTC (rev 3004)
@@ -1,20 +1,28 @@
+0.2.19  2011-04-18
+
+    o   Upgraded to Armadillo version 1.2.0 "Unscrupulous Carbon Emitter"
+
+          * Added ability to use Blas & Lapack libraries with capitalised
+	    function names 
+          * Reduction of pedantic compiler warnings
+
 0.2.18  2011-04-03
 
-    o   Upgraded to Armadillo Version 1.1.92  "Jurassic Barbecue"
+    o   Upgraded to Armadillo version 1.1.92  "Jurassic Barbecue"
 
           * Bugfix in cor()
 	  * Automatic installation now requires CMake >= 2.6
 
 0.2.17  2011-03-22
 
-    o   Upgraded to Armadillo Version 1.1.90  "Inside Job"
+    o   Upgraded to Armadillo version 1.1.90  "Inside Job"
 
          * Added .min() & .max(), which can provide the extremum's location
 	 * More robust mean(), var(), stddev()
 
 0.2.16  2011-03-10
 
-    o   Upgraded to Armadillo Version 1.1.8   "Kangaroo Steak"
+    o   Upgraded to Armadillo version 1.1.8   "Kangaroo Steak"
 
          * Added floor() and ceil()
          * Added “not a number”: math::nan()
@@ -25,7 +33,7 @@
 
 0.2.15  2011-03-04
 
-    o   Upgraded to Armadillo Version 1.1.6   “Baby Carpet Shark”
+    o   Upgraded to Armadillo version 1.1.6   “Baby Carpet Shark”
 
          * fixed size matrices and vectors can use auxiliary (external) memory
          * .in_range() can use span() arguments
@@ -44,7 +52,7 @@
 
 0.2.13  2011-02-18
 
-    o   Upgraded to Armadillo Version 1.1.4   “Manta Lodge”
+    o   Upgraded to Armadillo version 1.1.4   “Manta Lodge”
 
          * Faster sort()
          * Updated installation to detect recent versions of Intel's MKL
@@ -52,7 +60,7 @@
 
 0.2.12  2011-02-15
 
-    o   Upgraded to Armadillo Version 1.1.2   “Flood Kayak”
+    o   Upgraded to Armadillo version 1.1.2   “Flood Kayak”
 
          * Faster prod()
 	 * Faster solve() for compound expressions
@@ -61,7 +69,7 @@
 
 0.2.11  2011-01-06
 
-    o   Upgraded to Armadillo Version 1.1.0   “Climate Vandal”
+    o   Upgraded to Armadillo version 1.1.0   “Climate Vandal”
 
          * Extended submatrix views, including access to elements whose
            indices are specified in a separate vector

Modified: pkg/RcppArmadillo/inst/doc/Makefile
===================================================================
--- pkg/RcppArmadillo/inst/doc/Makefile	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/doc/Makefile	2011-04-18 19:43:39 UTC (rev 3004)
@@ -1,7 +1,10 @@
 
 all: 	RcppArmadillo-unitTests.pdf
 
-clean:
+clean:	
+	rm -f RcppArmadillo*.log RcppArmadillo*.aux RcppArmadillo*.out RcppArmadillo*.tex
+
+pdfclean:
 	rm -f RcppArmadillo-unitTests.pdf
 
 setvars:

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_meat.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_meat.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -46,7 +46,7 @@
 
 template<typename eT>
 inline
-u32
+std::streamsize
 arma_ostream::modify_stream(std::ostream& o, const eT* data, const u32 n_elem)
   {
   o.unsetf(ios::showbase);
@@ -55,7 +55,7 @@
   
   o.fill(' ');
   
-  u32 cell_width;
+  std::streamsize cell_width;
   
   bool use_layout_B = false;
   bool use_layout_C = false;
@@ -117,7 +117,7 @@
 //! "better than nothing" settings for complex numbers
 template<typename T>
 inline
-u32
+std::streamsize
 arma_ostream::modify_stream(std::ostream& o, const std::complex<T>* data, const u32 n_elem)
   {
   arma_ignore(data);
@@ -132,7 +132,7 @@
   o.setf(ios::right);
   o.unsetf(ios::fixed);
   
-  u32 cell_width;
+  std::streamsize cell_width;
   
   o.precision(3);
   cell_width = 2 + 2*(1 + 3 + o.precision() + 5) + 1;
@@ -210,7 +210,7 @@
   
   const arma_ostream_state stream_state(o);
   
-  const u32 cell_width = modify ? arma_ostream::modify_stream(o, m.memptr(), m.n_elem) : o.width();
+  const std::streamsize cell_width = modify ? arma_ostream::modify_stream(o, m.memptr(), m.n_elem) : o.width();
   
   const u32 m_n_rows = m.n_rows;
   const u32 m_n_cols = m.n_cols;
@@ -263,9 +263,9 @@
   arma_extra_debug_sigprint();
   
   const arma_ostream_state stream_state(o);
-
-  const u32 cell_width = modify ? arma_ostream::modify_stream(o, x.memptr(), x.n_elem) : o.width();
   
+  const std::streamsize cell_width = modify ? arma_ostream::modify_stream(o, x.memptr(), x.n_elem) : o.width();
+  
   for(u32 slice=0; slice < x.n_slices; ++slice)
     {
     o << "[cube slice " << slice << ']' << '\n';

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_proto.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_ostream_proto.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -39,8 +39,8 @@
   {
   public:
   
-  template<typename eT> inline static u32 modify_stream(std::ostream& o, const eT*              data, const u32 n_elem);
-  template<typename  T> inline static u32 modify_stream(std::ostream& o, const std::complex<T>* data, const u32 n_elem);
+  template<typename eT> inline static std::streamsize modify_stream(std::ostream& o, const eT*              data, const u32 n_elem);
+  template<typename  T> inline static std::streamsize modify_stream(std::ostream& o, const std::complex<T>* data, const u32 n_elem);
   
   template<typename eT> inline static void print_elem_zero(std::ostream& o);
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -17,9 +17,9 @@
 
 
 #define ARMA_VERSION_MAJOR 1
-#define ARMA_VERSION_MINOR 1
-#define ARMA_VERSION_PATCH 92
-#define ARMA_VERSION_NAME  "Jurassic Barbecue"
+#define ARMA_VERSION_MINOR 2
+#define ARMA_VERSION_PATCH 0
+#define ARMA_VERSION_NAME  "Unscrupulous Carbon Emitter"
 
 
 

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/auxlib_meat.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -382,7 +382,7 @@
     // memory allocation is avoided, if possible
     
     blas_int work_len = (std::max)(blas_int(1), n_rows*84);
-    podarray<eT> work(work_len);
+    podarray<eT> work( static_cast<u32>(work_len) );
     
     lapack::getrf(&n_rows, &n_cols, out.memptr(), &n_rows, ipiv.memptr(), &info);
     
@@ -401,7 +401,7 @@
         if(work_len < proposed_work_len)
           {
           work_len = proposed_work_len;
-          work.set_size(work_len);
+          work.set_size( static_cast<u32>(work_len) );
           }
         }
       
@@ -882,7 +882,7 @@
   
   for(u32 i=0; i<n; ++i)
     {
-    const u32 k = u32(ipiv1_mem[i]);
+    const u32 k = static_cast<u32>(ipiv1_mem[i]);
     
     if( ipiv2_mem[i] != ipiv2_mem[k] )
       {
@@ -894,7 +894,7 @@
   
   for(u32 row=0; row<P_rows; ++row)
     {
-    P.at(row, u32(ipiv2_mem[row])) = eT(1);
+    P.at(row, static_cast<u32>(ipiv2_mem[row])) = eT(1);
     }
   
   if(L.n_cols > U.n_rows)
@@ -935,12 +935,12 @@
   
   for(u32 i=0; i<n; ++i)
     {
-    const u32 k = u32(ipiv1_mem[i]);
+    const u32 k = static_cast<u32>(ipiv1_mem[i]);
     
     if( ipiv2_mem[i] != ipiv2_mem[k] )
       {
       std::swap( ipiv2_mem[i], ipiv2_mem[k] );
-      L.swap_rows( u32(ipiv2_mem[i]), u32(ipiv2_mem[k]) );
+      L.swap_rows( static_cast<u32>(ipiv2_mem[i]), static_cast<u32>(ipiv2_mem[k]) );
       }
     }
   
@@ -980,8 +980,8 @@
     blas_int n_rows = A.n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 3*n_rows-1);
     
-    eigval.set_size(n_rows);
-    podarray<eT> work(lwork);
+    eigval.set_size(A.n_rows);
+    podarray<eT> work( static_cast<u32>(lwork) );
     
     blas_int info;
     
@@ -1024,10 +1024,10 @@
     blas_int lda    = A.n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 2*n_rows - 1);  // TODO: automatically find best size of lwork
     
-    eigval.set_size(n_rows);
+    eigval.set_size(A.n_rows);
     
-    podarray<eT> work(lwork);
-    podarray<T>  rwork( (std::max)(blas_int(1), 3*n_rows - 2) );
+    podarray<eT> work( static_cast<u32>(lwork) );
+    podarray<T>  rwork( static_cast<u32>((std::max)(blas_int(1), 3*n_rows - 2)) );
     
     blas_int info;
     
@@ -1071,8 +1071,8 @@
     blas_int n_rows = eigvec.n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 3*n_rows-1);
     
-    eigval.set_size(n_rows);
-    podarray<eT> work(lwork);
+    eigval.set_size(eigvec.n_rows);
+    podarray<eT> work( static_cast<u32>(lwork) );
     
     blas_int info;
     
@@ -1117,10 +1117,10 @@
     blas_int lda    = eigvec.n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 2*n_rows - 1);  // TODO: automatically find best size of lwork
     
-    eigval.set_size(n_rows);
+    eigval.set_size(eigvec.n_rows);
     
-    podarray<eT> work(lwork);
-    podarray<T>  rwork( (std::max)(blas_int(1), 3*n_rows - 2) );
+    podarray<eT> work( static_cast<u32>(lwork) );
+    podarray<T>  rwork( static_cast<u32>((std::max)(blas_int(1), 3*n_rows - 2)) );
     
     blas_int info;
     
@@ -1193,20 +1193,21 @@
         arma_stop("eig_gen(): parameter 'side' is invalid");
       }
     
-       
-    blas_int n_rows = A.n_rows;
-    blas_int lda    = A.n_rows;
+    u32 A_n_rows = A.n_rows;
+    
+    blas_int n_rows = A_n_rows;
+    blas_int lda    = A_n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 4*n_rows);  // TODO: automatically find best size of lwork
     
-    eigval.set_size(n_rows);
-    l_eigvec.set_size(n_rows, n_rows);
-    r_eigvec.set_size(n_rows, n_rows);
+    eigval.set_size(A_n_rows);
+    l_eigvec.set_size(A_n_rows, A_n_rows);
+    r_eigvec.set_size(A_n_rows, A_n_rows);
     
-    podarray<T> work(lwork);
-    podarray<T> rwork( (std::max)(blas_int(1), 3*n_rows) );
+    podarray<T> work( static_cast<u32>(lwork) );
+    podarray<T> rwork( static_cast<u32>((std::max)(blas_int(1), 3*n_rows)) );
     
-    podarray<T> wr(n_rows);
-    podarray<T> wi(n_rows);
+    podarray<T> wr(A_n_rows);
+    podarray<T> wi(A_n_rows);
     
     Mat<T> A_copy = A;
     blas_int info;
@@ -1215,8 +1216,8 @@
     lapack::geev(&jobvl, &jobvr, &n_rows, A_copy.memptr(), &lda, wr.memptr(), wi.memptr(), l_eigvec.memptr(), &n_rows, r_eigvec.memptr(), &n_rows, work.memptr(), &lwork, &info);
     
     
-    eigval.set_size(n_rows);
-    for(u32 i=0; i<u32(n_rows); ++i)
+    eigval.set_size(A_n_rows);
+    for(u32 i=0; i<A_n_rows; ++i)
       {
       eigval[i] = std::complex<T>(wr[i], wi[i]);
       }
@@ -1293,17 +1294,18 @@
         arma_stop("eig_gen(): parameter 'side' is invalid");
       }
     
-       
-    blas_int n_rows = A.n_rows;
-    blas_int lda    = A.n_rows;
+    u32 A_n_rows = A.n_rows;
+    
+    blas_int n_rows = A_n_rows;
+    blas_int lda    = A_n_rows;
     blas_int lwork  = (std::max)(blas_int(1), 4*n_rows);  // TODO: automatically find best size of lwork
     
-    eigval.set_size(n_rows);
-    l_eigvec.set_size(n_rows, n_rows);
-    r_eigvec.set_size(n_rows, n_rows);
+    eigval.set_size(A_n_rows);
+    l_eigvec.set_size(A_n_rows, A_n_rows);
+    r_eigvec.set_size(A_n_rows, A_n_rows);
     
-    podarray<eT> work(lwork);
-    podarray<T>  rwork( (std::max)(blas_int(1), 3*n_rows) );  // was 2,3
+    podarray<eT> work( static_cast<u32>(lwork) );
+    podarray<T>  rwork( static_cast<u32>((std::max)(blas_int(1), 3*n_rows)) );  // was 2,3
     
     blas_int info;
     
@@ -1399,8 +1401,8 @@
     blas_int k            = (std::min)(m,n);
     blas_int info;
     
-    podarray<eT> tau(k);
-    podarray<eT> work(work_len);
+    podarray<eT> tau( static_cast<u32>(k) );
+    podarray<eT> work( static_cast<u32>(work_len) );
     
     // query for the optimum value of work_len
     work_len_tmp = -1;
@@ -1409,7 +1411,7 @@
     if(info == 0)
       {
       work_len = static_cast<blas_int>(access::tmp_real(work[0]));
-      work.set_size(work_len);
+      work.set_size( static_cast<u32>(work_len) );
       }
     
     lapack::geqrf(&m, &n, R.memptr(), &m, tau.memptr(), work.memptr(), &work_len, &info);
@@ -1439,7 +1441,7 @@
       if(info == 0)
         {
         work_len = static_cast<blas_int>(access::tmp_real(work[0]));
-        work.set_size(work_len);
+        work.set_size( static_cast<u32>(work_len) );
         }
       
       lapack::orgqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &work_len, &info);
@@ -1454,7 +1456,7 @@
       if(info == 0)
         {
         work_len = static_cast<blas_int>(access::tmp_real(work[0]));
-        work.set_size(work_len);
+        work.set_size( static_cast<u32>(work_len) );
         }
       
       lapack::ungqr(&m, &m, &k, Q.memptr(), &m, tau.memptr(), work.memptr(), &work_len, &info);
@@ -1509,9 +1511,9 @@
     blas_int  lwork = 2 * (std::max)(blas_int(1), (std::max)( (3*(std::min)(m,n) + (std::max)(m,n)), 5*(std::min)(m,n) ) );
     blas_int  info;
     
-    S.set_size( (std::min)(m, n) );
+    S.set_size( static_cast<u32>((std::min)(m, n)) );
     
-    podarray<eT> work(lwork);
+    podarray<eT> work( static_cast<u32>(lwork) );
   
   
     // let gesvd_() calculate the optimum size of the workspace
@@ -1536,7 +1538,7 @@
       if(proposed_lwork > lwork)
         {
         lwork = proposed_lwork;
-        work.set_size(lwork);
+        work.set_size( static_cast<u32>(lwork) );
         }
       
       lapack::gesvd<eT>
@@ -1604,10 +1606,10 @@
     blas_int  lwork = 2 * (std::max)(blas_int(1), 2*(std::min)(m,n)+(std::max)(m,n) );
     blas_int  info;
     
-    S.set_size( (std::min)(m,n) );
+    S.set_size( static_cast<u32>((std::min)(m,n)) );
     
-    podarray<eT> work(lwork);
-    podarray<T>  rwork( 5*(std::min)(m,n) );
+    podarray<eT> work( static_cast<u32>(lwork) );
+    podarray<T>  rwork( static_cast<u32>(5*(std::min)(m,n)) );
     
     // let gesvd_() calculate the optimum size of the workspace
     blas_int lwork_tmp = -1;
@@ -1631,7 +1633,7 @@
       if(proposed_lwork > lwork)
         {
         lwork = proposed_lwork;
-        work.set_size(lwork);
+        work.set_size( static_cast<u32>(lwork) );
         }
       
       lapack::cx_gesvd<T>
@@ -1725,9 +1727,9 @@
     blas_int  info;
     
     
-    S.set_size( (std::min)(m,n) );
-    podarray<eT> work(lwork);
-  
+    S.set_size( static_cast<u32>((std::min)(m,n)) );
+    podarray<eT> work( static_cast<u32>(lwork) );
+    
     // let gesvd_() calculate the optimum size of the workspace
     blas_int lwork_tmp = -1;
     
@@ -1749,7 +1751,7 @@
       if(proposed_lwork > lwork)
         {
         lwork = proposed_lwork;
-        work.set_size(lwork);
+        work.set_size( static_cast<u32>(lwork) );
         }
       
       lapack::gesvd<eT>
@@ -1818,10 +1820,10 @@
     blas_int  lwork = 2 * (std::max)(blas_int(1), 2*(std::min)(m,n)+(std::max)(m,n) );
     blas_int  info;
     
-    S.set_size( (std::min)(m,n) );
+    S.set_size( static_cast<u32>((std::min)(m,n)) );
     
-    podarray<eT> work(lwork);
-    podarray<T>  rwork( 5*(std::min)(m,n) );
+    podarray<eT> work( static_cast<u32>(lwork) );
+    podarray<T>  rwork( static_cast<u32>(5*(std::min)(m,n)) );
     
     // let gesvd_() calculate the optimum size of the workspace
     blas_int lwork_tmp = -1;
@@ -1844,7 +1846,7 @@
       if(proposed_lwork > lwork)
         {
         lwork = proposed_lwork;
-        work.set_size(lwork);
+        work.set_size( static_cast<u32>(lwork) );
         }
       
       lapack::cx_gesvd<T>
@@ -1897,13 +1899,15 @@
   
   #if defined(ARMA_USE_LAPACK)
     {
-    blas_int n    = A.n_rows;
-    blas_int lda  = A.n_rows;
-    blas_int ldb  = A.n_rows;
+    u32 A_n_rows = A.n_rows;
+    
+    blas_int n    = A_n_rows;
+    blas_int lda  = A_n_rows;
+    blas_int ldb  = A_n_rows;
     blas_int nrhs = B.n_cols;
     blas_int info;
     
-    podarray<blas_int> ipiv(n);
+    podarray<blas_int> ipiv(A_n_rows);
     
     out = B;
     
@@ -1953,7 +1957,7 @@
     
     Mat<eT> tmp = B;
     
-    podarray<eT> work(lwork);
+    podarray<eT> work( static_cast<u32>(lwork) );
     
     arma_extra_debug_print("lapack::gels()");
     
@@ -2035,7 +2039,7 @@
         }
       }
     
-    podarray<eT> work(lwork);
+    podarray<eT> work( static_cast<u32>(lwork) );
     
     arma_extra_debug_print("lapack::gels()");
     

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/blas_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/blas_proto.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/blas_proto.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -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
@@ -15,29 +15,63 @@
 #ifdef ARMA_USE_BLAS
 
 
+#if !defined(ARMA_BLAS_CAPITALS)
+
+  #define arma_sdot  sdot
+  #define arma_ddot  ddot
+
+  #define arma_sgemv sgemv
+  #define arma_dgemv dgemv
+  #define arma_cgemv cgemv
+  #define arma_zgemv zgemv
+
+  #define arma_sgemm sgemm
+  #define arma_dgemm dgemm
+  #define arma_cgemm cgemm
+  #define arma_zgemm zgemm
+
+#else
+
+  #define arma_sdot  SDOT
+  #define arma_ddot  DDOT
+
+  #define arma_sgemv SGEMV
+  #define arma_dgemv DGEMV
+  #define arma_cgemv CGEMV
+  #define arma_zgemv ZGEMV
+
+  #define arma_sgemm SGEMM
+  #define arma_dgemm DGEMM
+  #define arma_cgemm CGEMM
+  #define arma_zgemm ZGEMM
+
+#endif
+
+
+
 //! \namespace blas namespace for BLAS functions
 namespace blas
   {
   extern "C"
     {
-    float  arma_fortran(sdot)(blas_int* n, const float*  x, blas_int* incx, const float*  y, blas_int* incy);
-    double arma_fortran(ddot)(blas_int* n, const double* x, blas_int* incx, const double* y, blas_int* incy);
+    float  arma_fortran(arma_sdot)(blas_int* n, const float*  x, blas_int* incx, const float*  y, blas_int* incy);
+    double arma_fortran(arma_ddot)(blas_int* n, const double* x, blas_int* incx, const double* y, blas_int* incy);
     
-    void arma_fortran(sgemv)(const char* transA, const blas_int* m, const blas_int* n, const float*  alpha, const float*  A, const blas_int* ldA, const float*  x, const blas_int* incx, const float*  beta, float*  y, const blas_int* incy);
-    void arma_fortran(dgemv)(const char* transA, const blas_int* m, const blas_int* n, const double* alpha, const double* A, const blas_int* ldA, const double* x, const blas_int* incx, const double* beta, double* y, const blas_int* incy);
-    void arma_fortran(cgemv)(const char* transA, const blas_int* m, const blas_int* n, const void*   alpha, const void*   A, const blas_int* ldA, const void*   x, const blas_int* incx, const void*   beta, void*   y, const blas_int* incy);
-    void arma_fortran(zgemv)(const char* transA, const blas_int* m, const blas_int* n, const void*   alpha, const void*   A, const blas_int* ldA, const void*   x, const blas_int* incx, const void*   beta, void*   y, const blas_int* incy);
+    void arma_fortran(arma_sgemv)(const char* transA, const blas_int* m, const blas_int* n, const float*  alpha, const float*  A, const blas_int* ldA, const float*  x, const blas_int* incx, const float*  beta, float*  y, const blas_int* incy);
+    void arma_fortran(arma_dgemv)(const char* transA, const blas_int* m, const blas_int* n, const double* alpha, const double* A, const blas_int* ldA, const double* x, const blas_int* incx, const double* beta, double* y, const blas_int* incy);
+    void arma_fortran(arma_cgemv)(const char* transA, const blas_int* m, const blas_int* n, const void*   alpha, const void*   A, const blas_int* ldA, const void*   x, const blas_int* incx, const void*   beta, void*   y, const blas_int* incy);
+    void arma_fortran(arma_zgemv)(const char* transA, const blas_int* m, const blas_int* n, const void*   alpha, const void*   A, const blas_int* ldA, const void*   x, const blas_int* incx, const void*   beta, void*   y, const blas_int* incy);
     
-    void arma_fortran(sgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const float*  alpha, const float*  A, const blas_int* ldA, const float*  B, const blas_int* ldB, const float*  beta, float*  C, const blas_int* ldC);
-    void arma_fortran(dgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* B, const blas_int* ldB, const double* beta, double* C, const blas_int* ldC);
-    void arma_fortran(cgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void*   alpha, const void*   A, const blas_int* ldA, const void*   B, const blas_int* ldB, const void*   beta, void*   C, const blas_int* ldC);
-    void arma_fortran(zgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void*   alpha, const void*   A, const blas_int* ldA, const void*   B, const blas_int* ldB, const void*   beta, void*   C, const blas_int* ldC);
+    void arma_fortran(arma_sgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const float*  alpha, const float*  A, const blas_int* ldA, const float*  B, const blas_int* ldB, const float*  beta, float*  C, const blas_int* ldC);
+    void arma_fortran(arma_dgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const double* alpha, const double* A, const blas_int* ldA, const double* B, const blas_int* ldB, const double* beta, double* C, const blas_int* ldC);
+    void arma_fortran(arma_cgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void*   alpha, const void*   A, const blas_int* ldA, const void*   B, const blas_int* ldB, const void*   beta, void*   C, const blas_int* ldC);
+    void arma_fortran(arma_zgemm)(const char* transA, const char* transB, const blas_int* m, const blas_int* n, const blas_int* k, const void*   alpha, const void*   A, const blas_int* ldA, const void*   B, const blas_int* ldB, const void*   beta, void*   C, const blas_int* ldC);
     
-    // void   arma_fortran(dswap)(const blas_int* n, double* x, const blas_int* incx, double* y, const blas_int* incy);
-    // void   arma_fortran(dscal)(const blas_int* n, const double* alpha, double* x, const blas_int* incx);
-    // void   arma_fortran(dcopy)(const blas_int* n, const double* x, const blas_int* incx, double* y, const blas_int* incy);
-    // void   arma_fortran(daxpy)(const blas_int* n, const double* alpha, const double* x, const blas_int* incx, double* y, const blas_int* incy);
-    // void    arma_fortran(dger)(const blas_int* m, const blas_int* n, const double* alpha, const double* x, const blas_int* incx, const double* y, const blas_int* incy, double* A, const blas_int* ldA);
+    // void   arma_fortran(arma_dswap)(const blas_int* n, double* x, const blas_int* incx, double* y, const blas_int* incy);
+    // void   arma_fortran(arma_dscal)(const blas_int* n, const double* alpha, double* x, const blas_int* incx);
+    // void   arma_fortran(arma_dcopy)(const blas_int* n, const double* x, const blas_int* incx, double* y, const blas_int* incy);
+    // void   arma_fortran(arma_daxpy)(const blas_int* n, const double* alpha, const double* x, const blas_int* incx, double* y, const blas_int* incy);
+    // void   arma_fortran(arma_dger )(const blas_int* m, const blas_int* n, const double* alpha, const double* x, const blas_int* incx, const double* y, const blas_int* incy, double* A, const blas_int* ldA);
     }
   
   
@@ -64,7 +98,7 @@
     blas_int n   = blas_int(n_elem);
     blas_int inc = blas_int(1);
     
-    return arma_fortran(sdot)(&n, x, &inc, y, &inc);
+    return arma_fortran(arma_sdot)(&n, x, &inc, y, &inc);
     }
   
   
@@ -77,7 +111,7 @@
     blas_int n   = blas_int(n_elem);
     blas_int inc = blas_int(1);
     
-    return arma_fortran(ddot)(&n, x, &inc, y, &inc);
+    return arma_fortran(arma_ddot)(&n, x, &inc, y, &inc);
     }
   
   
@@ -92,25 +126,25 @@
     if(is_float<eT>::value == true)
       {
       typedef float T;
-      arma_fortran(sgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
+      arma_fortran(arma_sgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
       }
     else
     if(is_double<eT>::value == true)
       {
       typedef double T;
-      arma_fortran(dgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
+      arma_fortran(arma_dgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
       }
     else
     if(is_supported_complex_float<eT>::value == true)
       {
       typedef std::complex<float> T;
-      arma_fortran(cgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
+      arma_fortran(arma_cgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
       }
     else
     if(is_supported_complex_double<eT>::value == true)
       {
       typedef std::complex<double> T;
-      arma_fortran(zgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
+      arma_fortran(arma_zgemv)(transA, m, n, (const T*)alpha, (const T*)A, ldA, (const T*)x, incx, (const T*)beta, (T*)y, incy);
       }
     
     }
@@ -127,25 +161,25 @@
     if(is_float<eT>::value == true)
       {
       typedef float T;
-      arma_fortran(sgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
+      arma_fortran(arma_sgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
       }
     else
     if(is_double<eT>::value == true)
       {
       typedef double T;
-      arma_fortran(dgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
+      arma_fortran(arma_dgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
       }
     else
     if(is_supported_complex_float<eT>::value == true)
       {
       typedef std::complex<float> T;
-      arma_fortran(cgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
+      arma_fortran(arma_cgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
       }
     else
     if(is_supported_complex_double<eT>::value == true)
       {
       typedef std::complex<double> T;
-      arma_fortran(zgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
+      arma_fortran(arma_zgemm)(transA, transB, m, n, k, (const T*)alpha, (const T*)A, ldA, (const T*)B, ldB, (const T*)beta, (T*)C, ldC);
       }
     
     }

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -21,15 +21,17 @@
 #define arma_warn_unused
 #define arma_deprecated
 #define arma_ignore(variable)  ((void)(variable))
-#define arma_fortran(function) function
 
 
 #if defined(ARMA_BLAS_UNDERSCORE)
-  #undef  arma_fortran
-  #define arma_fortran(function) function##_
+  #define arma_fortran2(function) function##_
+#else
+  #define arma_fortran2(function) function
 #endif
 
+#define arma_fortran(function) arma_fortran2(function)
 
+
 #if defined(__INTEL_COMPILER)
   
   #if (__INTEL_COMPILER < 1000)
@@ -93,7 +95,9 @@
 
 #if defined(_MSC_VER)
   
-  #pragma message ("*** WARNING: This compiler may have an incomplete implementation of the C++ standard ***")
+  #if (_MSC_VER < 1500)
+    #error "*** Need a newer compiler ***"
+  #endif
   
   #undef ARMA_GOOD_COMPILER
   #undef ARMA_HAVE_STD_ISFINITE

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -37,6 +37,9 @@
 //// Uncomment the above line if your BLAS and LAPACK libraries have function names with a trailing underscore.
 //// Conversely, comment it out if the function names don't have a trailing underscore.
 
+// #define ARMA_BLAS_CAPITALS
+//// Uncomment the above line if your BLAS and LAPACK libraries have capitalised function names (eg. ACML on 64-bit Windows)
+
 #if !defined(ARMA_MAT_PREALLOC)
   #define ARMA_MAT_PREALLOC 16
 #endif

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/constants.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -34,10 +34,7 @@
         }
       else
         {
-        const eT a = eT(0);
-        const eT b = eT(0);
-        
-        return a / b;
+        return eT(0);
         }
       }
     
@@ -79,10 +76,7 @@
         }
       else
         {
-        const eT a = eT(1);
-        const eT b = eT(0);
-        
-        return a / b;
+        return std::numeric_limits<eT>::max();
         }
       }
     
@@ -281,10 +275,7 @@
       }
     else
       {
-      const eT a = eT(1);
-      const eT b = eT(0);
-      
-      return -(a / b);
+      return -(std::numeric_limits<eT>::max());
       }
     }
   
@@ -317,10 +308,7 @@
       }
     else
       {
-      const eT a = eT(1);
-      const eT b = eT(0);
-      
-      return a / b;
+      return std::numeric_limits<eT>::max();
       }
     }
   

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -429,7 +429,7 @@
     char_count += 2;
     }
   
-  const u32 x_size = x.size();
+  const u32 x_size = static_cast<u32>(x.size());
   u8 sum = 0;
   
   for(u32 i=0; i<x_size; ++i)

Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_proto.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_proto.hpp	2011-04-16 18:27:50 UTC (rev 3003)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/lapack_proto.hpp	2011-04-18 19:43:39 UTC (rev 3004)
@@ -1,5 +1,5 @@
-// Copyright (C) 2008-2010 NICTA (www.nicta.com.au)
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/rcpp -r 3004


More information about the Rcpp-commits mailing list