[Rcpp-commits] r4328 - in pkg/RcppArmadillo: . debian inst inst/include inst/include/armadillo_bits
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Jun 5 02:03:19 CEST 2013
Author: edd
Date: 2013-06-05 02:03:18 +0200 (Wed, 05 Jun 2013)
New Revision: 4328
Added:
pkg/RcppArmadillo/inst/include/armadillo_bits/xvec_htrans_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/xvec_htrans_meat.hpp
Modified:
pkg/RcppArmadillo/ChangeLog
pkg/RcppArmadillo/DESCRIPTION
pkg/RcppArmadillo/debian/changelog
pkg/RcppArmadillo/debian/control
pkg/RcppArmadillo/inst/NEWS.Rd
pkg/RcppArmadillo/inst/include/armadillo
pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Proxy.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/ProxyCube.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Row_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/Row_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/access.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arma_version.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arrayops_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/arrayops_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/compiler_setup.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/config.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/diagview_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/diagview_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/diskio_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlueCube_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlueCube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eGlue_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eOpCube_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eOpCube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eOp_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eOp_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eglue_core_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/eop_core_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/fn_as_scalar.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/forward_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/hdf5_misc.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/memory.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/op_median_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/podarray_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/subview_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/subview_cube_bones.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/subview_cube_meat.hpp
pkg/RcppArmadillo/inst/include/armadillo_bits/subview_meat.hpp
Log:
RcppArmadillo 0.3.900.0 with Armadillo release 3.900.0
Modified: pkg/RcppArmadillo/ChangeLog
===================================================================
--- pkg/RcppArmadillo/ChangeLog 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/ChangeLog 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,3 +1,10 @@
+2013-06-04 Dirk Eddelbuettel <edd at debian.org>
+
+ * DESCRIPTION: Release 0.3.900.0
+ * inst/NEWS: Release 0.3.900.0
+ * inst/include/*: Upgraded to new release 3.900.0 of Armadillo
+ * debian/*: Similarly updated for new release to Debian
+
2013-05-16 Dirk Eddelbuettel <edd at debian.org>
* inst/examples/kalman/benchmark.R: Switch from inline to sourceCpp
Modified: pkg/RcppArmadillo/DESCRIPTION
===================================================================
--- pkg/RcppArmadillo/DESCRIPTION 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/DESCRIPTION 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,7 +1,7 @@
Package: RcppArmadillo
Type: Package
Title: Rcpp integration for Armadillo templated linear algebra library
-Version: 0.3.820
+Version: 0.3.900.0
Date: $Date$
Author: Romain Francois, Dirk Eddelbuettel and Doug Bates
Maintainer: Dirk Eddelbuettel <edd at debian.org>
Modified: pkg/RcppArmadillo/debian/changelog
===================================================================
--- pkg/RcppArmadillo/debian/changelog 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/debian/changelog 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,3 +1,15 @@
+r-cran-rcpparmadillo (0.3.900.0-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Dirk Eddelbuettel <edd at debian.org> Tue, 04 Jun 2013 19:01:58 -0500
+
+r-cran-rcpparmadillo (0.3.820-2) unstable; urgency=low
+
+ * debian/control: Add a Depends: on r-cran-rcpp (Closes: #710127)
+
+ -- Dirk Eddelbuettel <edd at debian.org> Tue, 28 May 2013 09:31:14 -0500
+
r-cran-rcpparmadillo (0.3.820-1) unstable; urgency=low
* New upstream release
Modified: pkg/RcppArmadillo/debian/control
===================================================================
--- pkg/RcppArmadillo/debian/control 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/debian/control 2013-06-05 00:03:18 UTC (rev 4328)
@@ -2,13 +2,13 @@
Section: gnu-r
Priority: optional
Maintainer: Dirk Eddelbuettel <edd at debian.org>
-Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.0.0), r-cran-rcpp, cdbs
+Build-Depends: debhelper (>= 7.0.0), r-base-dev (>= 3.0.1), r-cran-rcpp, cdbs
Standards-Version: 3.9.4
Homepage: http://dirk.eddelbuettel.com/code/rcpp.armadillo.html
Package: r-cran-rcpparmadillo
Architecture: any
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${R:Depends}, littler
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${R:Depends}, littler, r-cran-rcpp
Description: GNU R package for Armadillo C++ linear algebra library
Armadillo is a templated C++ linear algebra library (by Conrad Sanderson)
that aims towards a good balance between speed and ease of use. Integer,
Modified: pkg/RcppArmadillo/inst/NEWS.Rd
===================================================================
--- pkg/RcppArmadillo/inst/NEWS.Rd 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/NEWS.Rd 2013-06-05 00:03:18 UTC (rev 4328)
@@ -2,6 +2,24 @@
\title{News for Package 'RcppArmadillo'}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
+\section{Changes in RcppArmadillo version 0.3.900 (2013-06-04)}{
+ \itemize{
+ \item Upgraded to Armadillo release Version 3.900.0 (Bavarian
+ Sunflower)
+ \itemize{
+ \item added automatic SSE2 vectorisation of elementary expressions
+ (eg. matrix addition) when using GCC 4.7+ with -O3 optimisation
+ \item added support for saving & loading of cubes in HDF5 format,
+ contributed by Szabolcs Horvat
+ \item faster \code{median()}, contributed by Ruslan Shestopalyuk
+ \item faster handling of compound expressions with transposes of
+ submatrix rows
+ \item faster handling of compound expressions with transposes of
+ complex vectors
+ }
+ }
+}
+
\section{Changes in RcppArmadillo version 0.3.820 (2013-05-12)}{
\itemize{
\item Upgraded to Armadillo release Version 3.820 (Mt Cootha)
Modified: pkg/RcppArmadillo/inst/include/armadillo
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo 2013-06-05 00:03:18 UTC (rev 4328)
@@ -139,6 +139,7 @@
#include "armadillo_bits/Col_bones.hpp"
#include "armadillo_bits/Row_bones.hpp"
#include "armadillo_bits/Cube_bones.hpp"
+ #include "armadillo_bits/xvec_htrans_bones.hpp"
#include "armadillo_bits/SpValProxy_bones.hpp"
#include "armadillo_bits/SpMat_bones.hpp"
@@ -444,6 +445,8 @@
#include "armadillo_bits/Col_meat.hpp"
#include "armadillo_bits/Row_meat.hpp"
#include "armadillo_bits/Cube_meat.hpp"
+ #include "armadillo_bits/xvec_htrans_meat.hpp"
+
#include "armadillo_bits/field_meat.hpp"
#include "armadillo_bits/subview_meat.hpp"
#include "armadillo_bits/subview_elem1_meat.hpp"
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_bones.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -40,7 +40,7 @@
inline Col(const std::initializer_list<eT>& list);
inline const Col& operator=(const std::initializer_list<eT>& list);
#endif
-
+
inline explicit Col(const SpCol<eT>& X);
inline const Col& operator=(const eT val);
@@ -91,11 +91,11 @@
template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X);
- arma_inline arma_warn_unused eT& at(const uword i);
- arma_inline arma_warn_unused eT at(const uword i) const;
+ arma_inline arma_warn_unused eT& at(const uword i);
+ arma_inline arma_warn_unused const eT& at(const uword i) const;
- arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col);
- arma_inline arma_warn_unused eT at(const uword in_row, const uword in_col) const;
+ arma_inline arma_warn_unused eT& at(const uword in_row, const uword in_col);
+ arma_inline arma_warn_unused const eT& at(const uword in_row, const uword in_col) const;
typedef eT* row_iterator;
@@ -133,7 +133,7 @@
static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
- arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
+ arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
arma_inline void change_to_row();
@@ -182,18 +182,20 @@
arma_inline const Op< Col_fixed_type, op_htrans > ht() const;
arma_inline const Op< Col_fixed_type, op_strans > st() const;
- arma_inline arma_warn_unused eT& operator[] (const uword i);
- arma_inline arma_warn_unused eT operator[] (const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword i);
- arma_inline arma_warn_unused eT at (const uword i) const;
- arma_inline arma_warn_unused eT& operator() (const uword i);
- arma_inline arma_warn_unused eT operator() (const uword i) const;
+ arma_inline arma_warn_unused const eT& at_alt (const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col);
- arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col) const;
- arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
- arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col) const;
+ arma_inline arma_warn_unused eT& operator[] (const uword i);
+ arma_inline arma_warn_unused const eT& operator[] (const uword i) const;
+ arma_inline arma_warn_unused eT& at (const uword i);
+ arma_inline arma_warn_unused const eT& at (const uword i) const;
+ arma_inline arma_warn_unused eT& operator() (const uword i);
+ arma_inline arma_warn_unused const eT& operator() (const uword i) const;
+ arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col);
+ arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const;
+ arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
+ arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const;
+
arma_inline arma_warn_unused eT* memptr();
arma_inline arma_warn_unused const eT* memptr() const;
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Col_meat.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -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
@@ -413,7 +413,7 @@
eT&
Col<eT>::row(const uword row_num)
{
- arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): out of bounds" );
+ arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): index out of bounds" );
return access::rw(Mat<eT>::mem[row_num]);
}
@@ -425,7 +425,7 @@
eT
Col<eT>::row(const uword row_num) const
{
- arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): out of bounds" );
+ arma_debug_check( (row_num >= Mat<eT>::n_rows), "Col::row(): index out of bounds" );
return Mat<eT>::mem[row_num];
}
@@ -572,7 +572,7 @@
{
arma_extra_debug_sigprint();
- arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): out of bounds");
+ arma_debug_check( row_num >= Mat<eT>::n_rows, "Col::shed_row(): index out of bounds");
shed_rows(row_num, row_num);
}
@@ -631,7 +631,7 @@
const uword B_n_rows = t_n_rows - row_num;
// insertion at row_num == n_rows is in effect an append operation
- arma_debug_check( (row_num > t_n_rows), "Col::insert_rows(): out of bounds");
+ arma_debug_check( (row_num > t_n_rows), "Col::insert_rows(): index out of bounds");
if(N > 0)
{
@@ -690,7 +690,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::at(const uword i) const
{
return Mat<eT>::mem[i];
@@ -712,7 +712,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::at(const uword in_row, const uword) const
{
return Mat<eT>::mem[in_row];
@@ -1060,6 +1060,28 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
+const eT&
+Col<eT>::fixed<fixed_n_elem>::at_alt(const uword ii) const
+ {
+ #if defined(ARMA_HAVE_ALIGNED_ATTRIBUTE)
+
+ return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
+
+ #else
+ const eT* mem_aligned = (use_extra) ? mem_local_extra : Mat<eT>::mem_local;
+
+ memory::mark_as_aligned(mem_aligned);
+
+ return mem_aligned[ii];
+ #endif
+ }
+
+
+
+template<typename eT>
+template<uword fixed_n_elem>
+arma_inline
+arma_warn_unused
eT&
Col<eT>::fixed<fixed_n_elem>::operator[] (const uword ii)
{
@@ -1072,7 +1094,7 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::fixed<fixed_n_elem>::operator[] (const uword ii) const
{
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
@@ -1096,7 +1118,7 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::fixed<fixed_n_elem>::at(const uword ii) const
{
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
@@ -1111,7 +1133,7 @@
eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword ii)
{
- arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): out of bounds");
+ arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds");
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
@@ -1122,10 +1144,10 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword ii) const
{
- arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): out of bounds");
+ arma_debug_check( (ii >= fixed_n_elem), "Col::operator(): index out of bounds");
return (use_extra) ? mem_local_extra[ii] : Mat<eT>::mem_local[ii];
}
@@ -1148,7 +1170,7 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::fixed<fixed_n_elem>::at(const uword in_row, const uword) const
{
return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
@@ -1163,7 +1185,7 @@
eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword in_row, const uword in_col)
{
- arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): out of bounds" );
+ arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
}
@@ -1174,10 +1196,10 @@
template<uword fixed_n_elem>
arma_inline
arma_warn_unused
-eT
+const eT&
Col<eT>::fixed<fixed_n_elem>::operator() (const uword in_row, const uword in_col) const
{
- arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): out of bounds" );
+ arma_debug_check( ((in_row >= fixed_n_elem) || (in_col > 0)), "Col::operator(): index out of bounds" );
return (use_extra) ? mem_local_extra[in_row] : Mat<eT>::mem_local[in_row];
}
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_bones.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -46,8 +46,8 @@
arma_aligned const eT* const mem; //!< pointer to the memory used by the cube (memory is read-only)
protected:
- arma_aligned Mat<eT>* mat_ptrs_local[ Cube_prealloc::mat_ptrs_size ];
- arma_aligned eT mem_local[ Cube_prealloc::mem_n_elem ];
+ arma_aligned Mat<eT>* mat_ptrs_local[ Cube_prealloc::mat_ptrs_size ];
+ arma_align_mem eT mem_local[ Cube_prealloc::mem_n_elem ];
public:
@@ -159,21 +159,23 @@
template<typename T1, typename T2, typename glue_type> inline const Cube& operator/=(const mtGlueCube<eT, T1, T2, glue_type>& X);
- arma_inline arma_warn_unused eT& operator[] (const uword i);
- arma_inline arma_warn_unused eT operator[] (const uword i) const;
+ arma_inline arma_warn_unused const eT& at_alt (const uword i) const;
- arma_inline arma_warn_unused eT& at(const uword i);
- arma_inline arma_warn_unused eT at(const uword i) const;
+ arma_inline arma_warn_unused eT& operator[] (const uword i);
+ arma_inline arma_warn_unused const eT& operator[] (const uword i) const;
- arma_inline arma_warn_unused eT& operator() (const uword i);
- arma_inline arma_warn_unused eT operator() (const uword i) const;
+ arma_inline arma_warn_unused eT& at(const uword i);
+ arma_inline arma_warn_unused const eT& at(const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice);
- arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col, const uword in_slice) const;
+ arma_inline arma_warn_unused eT& operator() (const uword i);
+ arma_inline arma_warn_unused const eT& operator() (const uword i) const;
- arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice);
- arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col, const uword in_slice) const;
+ arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice);
+ arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col, const uword in_slice) const;
+ arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice);
+ arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col, const uword in_slice) const;
+
arma_inline const Cube& operator++();
arma_inline void operator++(int);
@@ -331,8 +333,8 @@
static const bool use_extra = (fixed_n_elem > Cube_prealloc::mem_n_elem);
- arma_aligned Mat<eT>* mat_ptrs_local_extra[ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? fixed_n_slices : 1 ];
- arma_aligned eT mem_local_extra [ use_extra ? fixed_n_elem : 1 ];
+ arma_aligned Mat<eT>* mat_ptrs_local_extra[ (fixed_n_slices > Cube_prealloc::mat_ptrs_size) ? fixed_n_slices : 1 ];
+ arma_align_mem eT mem_local_extra [ use_extra ? fixed_n_elem : 1 ];
arma_inline void mem_setup();
@@ -356,20 +358,20 @@
using Cube<eT>::operator();
- arma_inline arma_warn_unused eT& operator[] (const uword i);
- arma_inline arma_warn_unused eT operator[] (const uword i) const;
+ arma_inline arma_warn_unused eT& operator[] (const uword i);
+ arma_inline arma_warn_unused const eT& operator[] (const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword i);
- arma_inline arma_warn_unused eT at (const uword i) const;
+ arma_inline arma_warn_unused eT& at (const uword i);
+ arma_inline arma_warn_unused const eT& at (const uword i) const;
- arma_inline arma_warn_unused eT& operator() (const uword i);
- arma_inline arma_warn_unused eT operator() (const uword i) const;
+ arma_inline arma_warn_unused eT& operator() (const uword i);
+ arma_inline arma_warn_unused const eT& operator() (const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice);
- arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col, const uword in_slice) const;
+ arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col, const uword in_slice);
+ arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col, const uword in_slice) const;
- arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice);
- arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col, const uword in_slice) const;
+ arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col, const uword in_slice);
+ arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col, const uword in_slice) const;
};
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Cube_meat.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -978,7 +978,7 @@
{
arma_extra_debug_sigprint();
- arma_debug_check( slice_num >= n_slices, "Cube::shed_slice(): out of bounds");
+ arma_debug_check( slice_num >= n_slices, "Cube::shed_slice(): index out of bounds");
shed_slices(slice_num, slice_num);
}
@@ -1034,7 +1034,7 @@
const uword B_n_slices = t_n_slices - slice_num;
// insertion at slice_num == n_slices is in effect an append operation
- arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): out of bounds");
+ arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds");
if(N > 0)
{
@@ -1087,12 +1087,12 @@
const uword B_n_slices = t_n_slices - slice_num;
// insertion at slice_num == n_slices is in effect an append operation
- arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): out of bounds");
+ arma_debug_check( (slice_num > t_n_slices), "Cube::insert_slices(): index out of bounds");
arma_debug_check
(
( (C.n_rows != n_rows) || (C.n_cols != n_cols) ),
- "Cube::insert_slices(): given object has an incompatible dimensions"
+ "Cube::insert_slices(): given object has incompatible dimensions"
);
if(N > 0)
@@ -1908,6 +1908,21 @@
+//! linear element accessor (treats the cube as a vector); no bounds check; assumes memory is aligned
+template<typename eT>
+arma_inline
+arma_warn_unused
+const eT&
+Cube<eT>::at_alt(const uword i) const
+ {
+ const eT* mem_aligned = mem;
+ memory::mark_as_aligned(mem_aligned);
+
+ return mem_aligned[i];
+ }
+
+
+
//! linear element accessor (treats the cube as a vector); bounds checking not done when ARMA_NO_DEBUG is defined
template<typename eT>
arma_inline
@@ -1925,7 +1940,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::operator() (const uword i) const
{
arma_debug_check( (i >= n_elem), "Cube::operator(): index out of bounds");
@@ -1949,7 +1964,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::operator[] (const uword i) const
{
return mem[i];
@@ -1973,7 +1988,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::at(const uword i) const
{
return mem[i];
@@ -2006,7 +2021,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_slice) const
{
arma_debug_check
@@ -2039,7 +2054,7 @@
template<typename eT>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::at(const uword in_row, const uword in_col, const uword in_slice) const
{
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];
@@ -2774,6 +2789,10 @@
case ppm_binary:
save_okay = diskio::save_ppm_binary(*this, name);
break;
+
+ case hdf5_binary:
+ save_okay = diskio::save_hdf5_binary(*this, name);
+ break;
default:
arma_warn(print_status, "Cube::save(): unsupported file type");
@@ -2867,6 +2886,10 @@
case ppm_binary:
load_okay = diskio::load_ppm_binary(*this, name, err_msg);
break;
+
+ case hdf5_binary:
+ load_okay = diskio::load_hdf5_binary(*this, name, err_msg);
+ break;
default:
arma_warn(print_status, "Cube::load(): unsupported file type");
@@ -3292,7 +3315,7 @@
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator[] (const uword i) const
{
return (use_extra) ? mem_local_extra[i] : mem_local[i];
@@ -3316,7 +3339,7 @@
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::at(const uword i) const
{
return (use_extra) ? mem_local_extra[i] : mem_local[i];
@@ -3331,7 +3354,7 @@
eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const uword i)
{
- arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): out of bounds");
+ arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds");
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
@@ -3342,10 +3365,10 @@
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const uword i) const
{
- arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): out of bounds");
+ arma_debug_check( (i >= fixed_n_elem), "Cube::operator(): index out of bounds");
return (use_extra) ? mem_local_extra[i] : mem_local[i];
}
@@ -3370,7 +3393,7 @@
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::at(const uword in_row, const uword in_col, const uword in_slice) const
{
const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row;
@@ -3393,7 +3416,7 @@
(in_col >= fixed_n_cols ) ||
(in_slice >= fixed_n_slices)
,
- "Cube::operator(): index out of bounds"
+ "operator(): index out of bounds"
);
const uword i = in_slice*fixed_n_elem_slice + in_col*fixed_n_rows + in_row;
@@ -3407,7 +3430,7 @@
template<uword fixed_n_rows, uword fixed_n_cols, uword fixed_n_slices>
arma_inline
arma_warn_unused
-eT
+const eT&
Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::operator() (const uword in_row, const uword in_col, const uword in_slice) const
{
arma_debug_check
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_bones.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_bones.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2011 Conrad Sanderson
+// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-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
@@ -32,6 +32,7 @@
arma_inline eT operator[] (const uword i) const;
arma_inline eT at (const uword row, const uword col, const uword slice) const;
+ arma_inline eT at_alt (const uword i) const;
inline void apply (Cube<eT>& out) const;
inline void apply_inplace_plus (Cube<eT>& out) const;
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_meat.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/GenCube_meat.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011 NICTA (www.nicta.com.au)
-// Copyright (C) 2011 Conrad Sanderson
+// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-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
@@ -67,6 +67,16 @@
template<typename eT, typename gen_type>
+arma_inline
+eT
+GenCube<eT, gen_type>::at_alt(const uword) const
+ {
+ return GenCube<eT, gen_type>::generate();
+ }
+
+
+
+template<typename eT, typename gen_type>
inline
void
GenCube<eT, gen_type>::apply(Cube<eT>& out) const
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_bones.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
-// Copyright (C) 2011-2012 Conrad Sanderson
+// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-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
@@ -34,6 +34,7 @@
arma_inline elem_type operator[] (const uword ii) const;
arma_inline elem_type at (const uword row, const uword col) const;
+ arma_inline elem_type at_alt (const uword ii) const;
inline void apply (Mat<elem_type>& out) const;
inline void apply_inplace_plus (Mat<elem_type>& out) const;
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Gen_meat.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -1,5 +1,5 @@
-// Copyright (C) 2011-2012 NICTA (www.nicta.com.au)
-// Copyright (C) 2011-2012 Conrad Sanderson
+// Copyright (C) 2011-2013 NICTA (www.nicta.com.au)
+// Copyright (C) 2011-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
@@ -86,6 +86,16 @@
template<typename T1, typename gen_type>
+arma_inline
+typename T1::elem_type
+Gen<T1, gen_type>::at_alt(const uword ii) const
+ {
+ return operator[](ii);
+ }
+
+
+
+template<typename T1, typename gen_type>
inline
void
Gen<T1, gen_type>::apply(Mat<typename T1::elem_type>& out) const
Modified: pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp
===================================================================
--- pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp 2013-05-31 09:25:26 UTC (rev 4327)
+++ pkg/RcppArmadillo/inst/include/armadillo_bits/Mat_bones.hpp 2013-06-05 00:03:18 UTC (rev 4328)
@@ -40,7 +40,7 @@
arma_aligned const eT* const mem; //!< pointer to the memory used by the matrix (memory is read-only)
protected:
- arma_aligned eT mem_local[ arma_config::mat_prealloc ];
+ arma_align_mem eT mem_local[ arma_config::mat_prealloc ];
public:
@@ -99,7 +99,11 @@
inline const Mat& operator*=(const subview<eT>& X);
inline const Mat& operator%=(const subview<eT>& X);
inline const Mat& operator/=(const subview<eT>& X);
-
+
+ inline Mat(const subview_row_strans<eT>& X); // subview_row_strans can only be generated by the Proxy class
+ inline Mat(const subview_row_htrans<eT>& X); // subview_row_htrans can only be generated by the Proxy class
+ inline Mat(const xvec_htrans<eT>& X); // xvec_htrans can only be generated by the Proxy class
+
//inline explicit Mat(const subview_cube<eT>& X);
inline Mat(const subview_cube<eT>& X);
inline const Mat& operator=(const subview_cube<eT>& X);
@@ -291,18 +295,20 @@
template<typename T1, typename T2, typename glue_type> inline const Mat& operator/=(const mtGlue<eT, T1, T2, glue_type>& X);
- arma_inline arma_warn_unused eT& operator[] (const uword ii);
- arma_inline arma_warn_unused eT operator[] (const uword ii) const;
- arma_inline arma_warn_unused eT& at (const uword ii);
- arma_inline arma_warn_unused eT at (const uword ii) const;
- arma_inline arma_warn_unused eT& operator() (const uword ii);
- arma_inline arma_warn_unused eT operator() (const uword ii) const;
+ arma_inline arma_warn_unused const eT& at_alt (const uword ii) const;
- arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col);
- arma_inline arma_warn_unused eT at (const uword in_row, const uword in_col) const;
- arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
- arma_inline arma_warn_unused eT operator() (const uword in_row, const uword in_col) const;
+ arma_inline arma_warn_unused eT& operator[] (const uword ii);
+ arma_inline arma_warn_unused const eT& operator[] (const uword ii) const;
+ arma_inline arma_warn_unused eT& at (const uword ii);
+ arma_inline arma_warn_unused const eT& at (const uword ii) const;
+ arma_inline arma_warn_unused eT& operator() (const uword ii);
+ arma_inline arma_warn_unused const eT& operator() (const uword ii) const;
+ arma_inline arma_warn_unused eT& at (const uword in_row, const uword in_col);
+ arma_inline arma_warn_unused const eT& at (const uword in_row, const uword in_col) const;
+ arma_inline arma_warn_unused eT& operator() (const uword in_row, const uword in_col);
+ arma_inline arma_warn_unused const eT& operator() (const uword in_row, const uword in_col) const;
+
arma_inline const Mat& operator++();
arma_inline void operator++(int);
@@ -541,7 +547,7 @@
static const uword fixed_n_elem = fixed_n_rows * fixed_n_cols;
static const bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);
- arma_aligned eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
+ arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
public:
@@ -581,18 +587,20 @@
arma_inline const Op< Mat_fixed_type, op_htrans > ht() const;
arma_inline const Op< Mat_fixed_type, op_strans > st() const;
- arma_inline arma_warn_unused eT& operator[] (const uword i);
- arma_inline arma_warn_unused eT operator[] (const uword i) const;
- arma_inline arma_warn_unused eT& at (const uword i);
- arma_inline arma_warn_unused eT at (const uword i) const;
[TRUNCATED]
To get the complete diff run:
svnlook diff /svnroot/rcpp -r 4328
More information about the Rcpp-commits
mailing list