Hello community, here is the log from the commit of package armadillo for openSUSE:Factory checked in at 2013-03-14 10:54:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/armadillo (Old) and /work/SRC/openSUSE:Factory/.armadillo.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "armadillo", Maintainer is "" Changes: -------- --- /work/SRC/openSUSE:Factory/armadillo/armadillo.changes 2013-03-07 07:17:50.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.armadillo.new/armadillo.changes 2013-03-14 10:54:23.000000000 +0100 @@ -1,0 +2,7 @@ +Tue Mar 12 21:05:42 UTC 2013 - [email protected] + +- Update to version 3.800.1 + * workaround for a bug in ATLAS 3.8 on 64 bit systems + * faster matrix-vector multiply for small matrices + +------------------------------------------------------------------- @@ -4 +11 @@ -- Update to version 3.8.0 +- Update to version 3.800.0 Old: ---- armadillo-3.800.0.tar.gz New: ---- armadillo-3.800.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ armadillo.spec ++++++ --- /var/tmp/diff_new_pack.cqxvSt/_old 2013-03-14 10:54:25.000000000 +0100 +++ /var/tmp/diff_new_pack.cqxvSt/_new 2013-03-14 10:54:25.000000000 +0100 @@ -17,7 +17,7 @@ Name: armadillo -Version: 3.800.0 +Version: 3.800.1 Release: 0 Summary: Fast C++ matrix library with interfaces to LAPACK and ATLAS License: MPL-2.0 ++++++ armadillo-3.800.0.tar.gz -> armadillo-3.800.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/CMakeLists.txt new/armadillo-3.800.1/CMakeLists.txt --- old/armadillo-3.800.0/CMakeLists.txt 2013-03-01 02:25:49.000000000 +0100 +++ new/armadillo-3.800.1/CMakeLists.txt 2013-03-09 14:23:20.000000000 +0100 @@ -13,7 +13,7 @@ set(ARMA_MAJOR 3) set(ARMA_MINOR 800) -set(ARMA_PATCH 0) +set(ARMA_PATCH 1) message(STATUS "Configuring Armadillo ${ARMA_MAJOR}.${ARMA_MINOR}.${ARMA_PATCH}") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/build_aux/rpm/armadillo.spec new/armadillo-3.800.1/build_aux/rpm/armadillo.spec --- old/armadillo-3.800.0/build_aux/rpm/armadillo.spec 2013-02-27 06:49:42.000000000 +0100 +++ new/armadillo-3.800.1/build_aux/rpm/armadillo.spec 2013-03-12 02:39:07.000000000 +0100 @@ -91,11 +91,24 @@ %{_includedir}/armadillo_bits/ %{_datadir}/Armadillo/ %doc README.txt index.html docs.html -%doc examples armadillo_icon.png armadillo_nicta_2010.pdf rcpp_armadillo_csda_2013.pdf +%doc examples armadillo_icon.png +%doc armadillo_nicta_2010.pdf rcpp_armadillo_csda_2013.pdf %changelog -* Fri Feb 22 2013 Conrad Sanderson - 3.800.0-1 -- License change to Mozilla Public License v2.0 +* Sat Mar 2 2013 José Matos <[email protected]> - 3.800.0-1 +- Update to latest stable version +- License changed from LGPLv3+ to MPLv2.0 +- Added another documentation file (rcpp related) +- Spec changelog trimmed + +* Thu Feb 21 2013 José Matos <[email protected]> - 3.6.3-1 +- Update to latest stable release + +* Sun Feb 10 2013 Denis Arnaud <[email protected]> - 3.6.2-3 +- Rebuild for Boost-1.53.0 + +* Sat Feb 09 2013 Denis Arnaud <[email protected]> - 3.6.2-2 +- Rebuild for Boost-1.53.0 * Fri Feb 8 2013 José Matos <[email protected]> - 3.6.2-1 - Update to latest stable release diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/docs.html new/armadillo-3.800.1/docs.html --- old/armadillo-3.800.0/docs.html 2013-03-01 02:25:49.000000000 +0100 +++ new/armadillo-3.800.1/docs.html 2013-03-12 02:46:00.000000000 +0100 @@ -266,7 +266,7 @@ <a href="#repmat">repmat</a> · <a href="#speye">speye</a> · <a href="#sprandu_sprandn">sprandu/sprandn</a> · -<a href="#toeplitz">toeplitz/toeplitz_circ</a> · +<a href="#toeplitz">toeplitz/circ_toeplitz</a> · <a href="#zeros_standalone">zeros</a> </ul> <br> @@ -356,7 +356,7 @@ <a href="#is_finite_standalone">is_finite()</a> · <a href="#logging">logging of errors/warnings</a> · <a href="#constants">various constants (pi, inf, speed of light, ...)</a> · -<a href="#log_add">log_add</a> · +<!--<a href="#log_add">log_add</a> ·--> <a href="#uword">uword/sword</a> · <a href="#cx_float_double">cx_float/cx_double</a> · <a href="#syntax">Matlab/Armadillo syntax differences</a> · @@ -3596,7 +3596,7 @@ <li><a href="#accu">accu()</a></li> <li><a href="#as_scalar">as_scalar()</a></li> <li><a href="#find">find()</a></li> -<li><a href="#transform">transform()</a></li> +<li><a href="#transform">.transform()</a></li> </ul> </li> <br> @@ -9342,6 +9342,7 @@ <br> <hr class="greyline"><br> +<!-- <a name="log_add"></a> <b>log_add(log_a, log_b)</b> <ul> @@ -9366,6 +9367,7 @@ </ul> <br> <hr class="greyline"><br> +--> <a name="uword"></a> <b>uword</b>, <b>sword</b> @@ -11056,13 +11058,14 @@ <li><a href="#swap">.swap()</a> for swapping contents with another matrix</li> <li><a href="#transform">.transform()</a> for transforming a matrix/cube using a functor or lambda expression</li> <li><a href="#misc_fns">round()</a> for rounding matrix elements towards nearest integer</li> +<li>faster <a href="#find">find()</a></li> </ul> </li> <br> <li>Changed in 3.800: <ul> <li>Armadillo is now licensed using the <a href="http://www.mozilla.org/MPL/2.0/">Mozilla Public License 2.0</a>; -see also the associated <a href="http://www.mozilla.org/MPL/2.0/FAQ.html">frequently asked questions</a> about the license +see also the associated <a href="http://www.mozilla.org/MPL/2.0/FAQ.html">frequently asked questions</a> about the license</li> </ul> <br> </li> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/include/armadillo_bits/arma_version.hpp new/armadillo-3.800.1/include/armadillo_bits/arma_version.hpp --- old/armadillo-3.800.0/include/armadillo_bits/arma_version.hpp 2013-03-01 02:28:49.000000000 +0100 +++ new/armadillo-3.800.1/include/armadillo_bits/arma_version.hpp 2013-03-09 14:23:20.000000000 +0100 @@ -13,7 +13,7 @@ #define ARMA_VERSION_MAJOR 3 #define ARMA_VERSION_MINOR 800 -#define ARMA_VERSION_PATCH 0 +#define ARMA_VERSION_PATCH 1 #define ARMA_VERSION_NAME "Miami Beach" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/include/armadillo_bits/diskio_meat.hpp new/armadillo-3.800.1/include/armadillo_bits/diskio_meat.hpp --- old/armadillo-3.800.0/include/armadillo_bits/diskio_meat.hpp 2013-02-21 08:16:35.000000000 +0100 +++ new/armadillo-3.800.1/include/armadillo_bits/diskio_meat.hpp 2013-03-11 05:13:59.000000000 +0100 @@ -897,8 +897,8 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); - cell_width = 18; + f.precision(12); + cell_width = 20; } for(uword row=0; row < x.n_rows; ++row) @@ -1023,8 +1023,8 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); - cell_width = 18; + f.precision(12); + cell_width = 20; } for(uword row=0; row < x.n_rows; ++row) @@ -1100,7 +1100,7 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); + f.precision(12); } uword x_n_rows = x.n_rows; @@ -2303,7 +2303,7 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); + f.precision(12); } f << (*iter) << '\n'; @@ -2357,7 +2357,7 @@ if( (is_float<T>::value == true) || (is_double<T>::value == true) ) { f.setf(ios::scientific); - f.precision(10); + f.precision(12); } const eT val = (*iter); @@ -3097,8 +3097,8 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); - cell_width = 18; + f.precision(12); + cell_width = 20; } for(uword slice=0; slice < x.n_slices; ++slice) @@ -3226,8 +3226,8 @@ if( (is_float<eT>::value == true) || (is_double<eT>::value == true) ) { f.setf(ios::scientific); - f.precision(10); - cell_width = 18; + f.precision(12); + cell_width = 20; } for(uword slice=0; slice < x.n_slices; ++slice) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/armadillo-3.800.0/include/armadillo_bits/gemv.hpp new/armadillo-3.800.1/include/armadillo_bits/gemv.hpp --- old/armadillo-3.800.0/include/armadillo_bits/gemv.hpp 2013-02-21 08:16:35.000000000 +0100 +++ new/armadillo-3.800.1/include/armadillo_bits/gemv.hpp 2013-03-11 06:07:31.000000000 +0100 @@ -1,5 +1,5 @@ -// Copyright (C) 2008-2012 NICTA (www.nicta.com.au) -// Copyright (C) 2008-2012 Conrad Sanderson +// Copyright (C) 2008-2013 NICTA (www.nicta.com.au) +// Copyright (C) 2008-2013 Conrad Sanderson // // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this @@ -131,6 +131,74 @@ +class gemv_emul_large_helper + { + public: + + template<typename eT> + arma_hot + inline + static + typename arma_not_cx<eT>::result + dot_row_col( const Mat<eT>& A, const eT* x, const uword row, const uword N) + { + eT acc1 = eT(0); + eT acc2 = eT(0); + + uword i,j; + for(i=0, j=1; j < N; i+=2, j+=2) + { + const eT xi = x[i]; + const eT xj = x[j]; + + acc1 += A.at(row,i) * xi; + acc2 += A.at(row,j) * xj; + } + + if(i < N) + { + acc1 += A.at(row,i) * x[i]; + } + + return (acc1 + acc2); + } + + + + template<typename eT> + arma_hot + inline + static + typename arma_cx_only<eT>::result + dot_row_col( const Mat<eT>& A, const eT* x, const uword row, const uword N) + { + typedef typename get_pod_type<eT>::result T; + + T val_real = T(0); + T val_imag = T(0); + + for(uword i=0; i<N; ++i) + { + const std::complex<T>& Ai = A.at(row,i); + const std::complex<T>& xi = x[i]; + + const T a = Ai.real(); + const T b = Ai.imag(); + + const T c = xi.real(); + const T d = xi.imag(); + + val_real += (a*c) - (b*d); + val_imag += (a*d) + (b*c); + } + + return std::complex<T>(val_real, val_imag); + } + + }; + + + //! \brief //! Partial emulation of ATLAS/BLAS gemv(). //! 'y' is assumed to have been set to the correct size (i.e. taking into account the transpose) @@ -181,12 +249,7 @@ else for(uword row=0; row < A_n_rows; ++row) { - eT acc = eT(0); - - for(uword i=0; i < A_n_cols; ++i) - { - acc += A.at(row,i) * x[i]; - } + const eT acc = gemv_emul_large_helper::dot_row_col(A, x, row, A_n_cols); if( (use_alpha == false) && (use_beta == false) ) { @@ -337,7 +400,8 @@ { arma_extra_debug_sigprint(); - const uword threshold = (is_complex<eT>::value == true) ? 16u : 64u; + //const uword threshold = (is_complex<eT>::value == true) ? 16u : 64u; + const uword threshold = (is_complex<eT>::value == true) ? 64u : 100u; if(A.n_elem <= threshold) { @@ -347,23 +411,50 @@ { #if defined(ARMA_USE_ATLAS) { - arma_extra_debug_print("atlas::cblas_gemv()"); - - atlas::cblas_gemv<eT> - ( - atlas::CblasColMajor, - (do_trans_A) ? ( is_complex<eT>::value ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, - A.n_rows, - A.n_cols, - (use_alpha) ? alpha : eT(1), - A.mem, - A.n_rows, - x, - 1, - (use_beta) ? beta : eT(0), - y, - 1 - ); + if(is_complex<eT>::value == false) + { + // use gemm() instead of gemv() to work around a speed issue in Atlas 3.8.4 + + arma_extra_debug_print("atlas::cblas_gemm()"); + + atlas::cblas_gemm<eT> + ( + atlas::CblasColMajor, + (do_trans_A) ? ( is_complex<eT>::value ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, + atlas::CblasNoTrans, + (do_trans_A) ? A.n_cols : A.n_rows, + 1, + (do_trans_A) ? A.n_rows : A.n_cols, + (use_alpha) ? alpha : eT(1), + A.mem, + A.n_rows, + x, + (do_trans_A) ? A.n_rows : A.n_cols, + (use_beta) ? beta : eT(0), + y, + (do_trans_A) ? A.n_cols : A.n_rows + ); + } + else + { + arma_extra_debug_print("atlas::cblas_gemv()"); + + atlas::cblas_gemv<eT> + ( + atlas::CblasColMajor, + (do_trans_A) ? ( is_complex<eT>::value ? CblasConjTrans : atlas::CblasTrans ) : atlas::CblasNoTrans, + A.n_rows, + A.n_cols, + (use_alpha) ? alpha : eT(1), + A.mem, + A.n_rows, + x, + 1, + (use_beta) ? beta : eT(0), + y, + 1 + ); + } } #elif defined(ARMA_USE_BLAS) { -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
