Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
2025-10-20 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Version, Date): RcppArmadillo 15.2.0-0
* inst/NEWS.Rd: Idem
* configure.ac: Idem
* configure: Idem

* inst/include/current/: Sync with Armadillo 15.2

2025-10-17 Dirk Eddelbuettel <[email protected]>

* src/RcppArmadillo.cpp (armadillo_version_typed): Added
Expand Down
18 changes: 9 additions & 9 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.1.99-1.
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.2.0-0.
#
# Report bugs to <[email protected]>.
#
Expand Down Expand Up @@ -603,8 +603,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='RcppArmadillo'
PACKAGE_TARNAME='rcpparmadillo'
PACKAGE_VERSION='15.1.99-1'
PACKAGE_STRING='RcppArmadillo 15.1.99-1'
PACKAGE_VERSION='15.2.0-0'
PACKAGE_STRING='RcppArmadillo 15.2.0-0'
PACKAGE_BUGREPORT='[email protected]'
PACKAGE_URL=''

Expand Down Expand Up @@ -1221,7 +1221,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
'configure' configures RcppArmadillo 15.1.99-1 to adapt to many kinds of systems.
'configure' configures RcppArmadillo 15.2.0-0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1283,7 +1283,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of RcppArmadillo 15.1.99-1:";;
short | recursive ) echo "Configuration of RcppArmadillo 15.2.0-0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1364,7 +1364,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
RcppArmadillo configure 15.1.99-1
RcppArmadillo configure 15.2.0-0
generated by GNU Autoconf 2.72

Copyright (C) 2023 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by RcppArmadillo $as_me 15.1.99-1, which was
It was created by RcppArmadillo $as_me 15.2.0-0, which was
generated by GNU Autoconf 2.72. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -3977,7 +3977,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by RcppArmadillo $as_me 15.1.99-1, which was
This file was extended by RcppArmadillo $as_me 15.2.0-0, which was
generated by GNU Autoconf 2.72. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -4032,7 +4032,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
RcppArmadillo config.status 15.1.99-1
RcppArmadillo config.status 15.2.0-0
configured by $0, generated by GNU Autoconf 2.72,
with options \\"\$ac_cs_config\\"

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
AC_PREREQ([2.69])

## Process this file with autoconf to produce a configure script.
AC_INIT([RcppArmadillo],[15.1.99-1],[[email protected]])
AC_INIT([RcppArmadillo],[15.2.0-0],[[email protected]])

## Set R_HOME, respecting an environment variable if one is set
: ${R_HOME=$(R RHOME)}
Expand Down
12 changes: 10 additions & 2 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
\newcommand{\ghpr}{\href{https://github.com/RcppCore/RcppArmadillo/pull/#1}{##1}}
\newcommand{\ghit}{\href{https://github.com/RcppCore/RcppArmadillo/issues/#1}{##1}}

\section{Changes in RcppArmadillo version 15.1.99-1 (2025-10-16) (GitHub Only)}{
\section{Changes in RcppArmadillo version 15.2.0-0 (2025-10-20) (GitHub Only)}{
\itemize{
\item Upgraded to Armadillo release 15.2.0 (RC1 right now)
\item Upgraded to Armadillo release 15.2.0 (Medium Roast Deluxe)
\itemize{
\item Added \code{rande()} for generating matrices with elements from
exponential distributions
\item \code{shift()} has been deprecated in favour of
\code{circshift()}, for consistency with Matlab/Octave
\item Reworked detection of aliasing, leading to more efficient
compiled code
}
}
}

Expand Down
11 changes: 11 additions & 0 deletions inst/include/current/armadillo_bits/Col_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1264,6 +1264,13 @@ Col<eT>::end_row(const uword row_num) const






//



template<typename eT>
template<uword fixed_n_elem>
arma_inline
Expand Down Expand Up @@ -1859,6 +1866,10 @@ Col<eT>::fixed<fixed_n_elem>::ones()



//



template<typename eT>
inline
Col<eT>::Col(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem)
Expand Down
2 changes: 1 addition & 1 deletion inst/include/current/armadillo_bits/Cube_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3148,7 +3148,7 @@ Cube<eT>::Cube(const GlueCube<T1, T2, glue_type>& X)
{
arma_debug_sigprint_this(this);

this->operator=(X);
(*this).operator=(X);
}


Expand Down
2 changes: 1 addition & 1 deletion inst/include/current/armadillo_bits/Mat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class Mat : public Base< eT, Mat<eT> >
template<typename T1, typename T2> inline explicit Mat(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B, const arma_vec_indicator&, const uhword in_vec_state);
template<typename T1, typename T2> inline explicit Mat(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);

inline explicit Mat(const subview<eT>& X, const bool use_colmem); // only to be used by the quasi_unwrap class
inline explicit Mat(const subview<eT>& X, const bool reuse_mem); // only to be used by quasi_unwrap and partial_unwrap

inline Mat(const subview<eT>& X, const arma_vec_indicator&, const uhword in_vec_state);
inline Mat(const subview<eT>& X);
Expand Down
8 changes: 4 additions & 4 deletions inst/include/current/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2021,18 +2021,18 @@ Mat<eT>::Mat(const Base<typename Mat<eT>::pod_type,T1>& A, const Base<typename M

template<typename eT>
inline
Mat<eT>::Mat(const subview<eT>& X, const bool use_colmem)
Mat<eT>::Mat(const subview<eT>& X, const bool reuse_mem)
: n_rows(X.n_rows)
, n_cols(X.n_cols)
, n_elem(X.n_elem)
, n_alloc(0)
, vec_state(0)
, mem_state(use_colmem ? 3 : 0)
, mem (use_colmem ? X.colptr(0) : nullptr)
, mem_state(reuse_mem ? 3 : 0 )
, mem (reuse_mem ? X.colptr(0) : nullptr)
{
arma_debug_sigprint_this(this);

if(use_colmem)
if(reuse_mem)
{
arma_debug_print("Mat::Mat(): using existing memory in a submatrix");
}
Expand Down
5 changes: 3 additions & 2 deletions inst/include/current/armadillo_bits/Row_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,6 @@ class Row : public Mat<eT>
template<typename T1, typename T2>
inline explicit Row(const Base<pod_type,T1>& A, const Base<pod_type,T2>& B);

inline explicit Row(const subview<eT>& X, const bool use_colmem); // only to be used by the quasi_unwrap class

template<typename T1> inline Row(const BaseCube<eT,T1>& X);
template<typename T1> inline Row& operator=(const BaseCube<eT,T1>& X);

Expand Down Expand Up @@ -171,6 +169,9 @@ class Row : public Mat<eT>
inline const_row_iterator end_row (const uword row_num) const;


inline explicit Row(const subview<eT>& X, const bool reuse_mem); // only to be used by the partial_unwrap class


template<uword fixed_n_elem> class fixed;


Expand Down
28 changes: 18 additions & 10 deletions inst/include/current/armadillo_bits/Row_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -610,16 +610,6 @@ Row<eT>::Row



template<typename eT>
inline
Row<eT>::Row(const subview<eT>& X, const bool use_colmem)
: Mat<eT>(X, use_colmem)
{
arma_debug_sigprint();
}



template<typename eT>
template<typename T1>
inline
Expand Down Expand Up @@ -1274,6 +1264,20 @@ Row<eT>::end_row(const uword row_num) const



template<typename eT>
inline
Row<eT>::Row(const subview<eT>& X, const bool reuse_mem)
: Mat<eT>(X, reuse_mem)
{
arma_debug_sigprint_this(this);
}



//



template<typename eT>
template<uword fixed_n_elem>
arma_inline
Expand Down Expand Up @@ -1869,6 +1873,10 @@ Row<eT>::fixed<fixed_n_elem>::ones()



//



template<typename eT>
inline
Row<eT>::Row(const arma_fixed_indicator&, const uword in_n_elem, const eT* in_mem)
Expand Down
6 changes: 3 additions & 3 deletions inst/include/current/armadillo_bits/arma_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@


#define ARMA_VERSION_MAJOR 15
#define ARMA_VERSION_MINOR 1
#define ARMA_VERSION_PATCH 91
#define ARMA_VERSION_NAME "15.2-RC1"
#define ARMA_VERSION_MINOR 2
#define ARMA_VERSION_PATCH 0
#define ARMA_VERSION_NAME "Medium Roast Deluxe"



Expand Down
2 changes: 1 addition & 1 deletion inst/include/current/armadillo_bits/field_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ field<oT>::field(const subview_field<oT>& X)
{
arma_debug_sigprint_this(this);

this->operator=(X);
(*this).operator=(X);
}


Expand Down
3 changes: 3 additions & 0 deletions inst/include/current/armadillo_bits/op_accu_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ struct op_accu_mat

template<typename eT>
static inline eT apply(const subview_col<eT>& X);

template<typename eT>
static inline eT apply(const subview_row<eT>& X);
};


Expand Down
61 changes: 34 additions & 27 deletions inst/include/current/armadillo_bits/op_accu_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,20 +121,6 @@ op_accu_mat::apply(const T1& X)
return arrayops::accumulate(U.M.memptr(), U.M.n_elem);
}

if(is_subview_row<T1>::value)
{
typedef typename T1::elem_type eT;

const subview_row<eT>& sv = reinterpret_cast< const subview_row<eT>& >(X);

if(sv.m.n_rows == 1)
{
const eT* sv_mem = &(sv.m.at(sv.aux_col1));

return arrayops::accumulate(sv_mem, sv.n_elem);
}
}

const Proxy<T1> P(X);

return (Proxy<T1>::use_at) ? op_accu_mat::apply_proxy_at(P) : op_accu_mat::apply_proxy_linear(P);
Expand Down Expand Up @@ -616,19 +602,7 @@ op_accu_mat::apply(const subview<eT>& X)
const uword X_n_rows = X.n_rows;
const uword X_n_cols = X.n_cols;

if(X_n_rows == 1)
{
const Mat<eT>& m = X.m;

const uword col_offset = X.aux_col1;
const uword row_offset = X.aux_row1;

eT val = eT(0);

for(uword i=0; i < X_n_cols; ++i) { val += m.at(row_offset, col_offset + i); }

return val;
}
if(X_n_rows == 1) { return op_accu_mat::apply( static_cast< const subview_row<eT>& >(X) ); }

if(X_n_cols == 1) { return arrayops::accumulate( X.colptr(0), X_n_rows ); }

Expand Down Expand Up @@ -656,6 +630,39 @@ op_accu_mat::apply(const subview_col<eT>& X)



template<typename eT>
inline
eT
op_accu_mat::apply(const subview_row<eT>& X)
{
arma_debug_sigprint();

const uword X_m_n_rows = X.m.n_rows;
const uword X_n_cols = X.n_cols;

const eT* row_mem = &(X.m.at(X.aux_row1,X.aux_col1));

eT val1 = eT(0);
eT val2 = eT(0);

uword j;

for(j=1; j < X_n_cols; j+=2)
{
val1 += (*row_mem); row_mem += X_m_n_rows;
val2 += (*row_mem); row_mem += X_m_n_rows;
}

if((j-1) < X_n_cols)
{
val1 += (*row_mem);
}

return val1 + val2;
}



//


Expand Down
4 changes: 2 additions & 2 deletions inst/include/current/armadillo_bits/subview_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,8 @@ class subview : public Base< eT, subview<eT> >
inline subview<eT> rows(const uword in_row1, const uword in_row2);
inline const subview<eT> rows(const uword in_row1, const uword in_row2) const;

inline subview<eT> cols(const uword in_col1, const uword in_col2);
inline const subview<eT> cols(const uword in_col1, const uword in_col2) const;
inline subview<eT> cols(const uword in_col1, const uword in_col2); // deliberately not returning subview_cols
inline const subview<eT> cols(const uword in_col1, const uword in_col2) const; // deliberately not returning subview_cols

inline subview<eT> submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2);
inline const subview<eT> submat(const uword in_row1, const uword in_col1, const uword in_row2, const uword in_col2) const;
Expand Down
Loading