Skip to content

Commit 9a1d3ac

Browse files
authored
RcppArmadillo 15.2.1-0 with Armadillo 15.2.1 (#496)
* Armadillo 15.2.1 * RcppArmadillo 15.2.1-0
1 parent 49d6e0e commit 9a1d3ac

File tree

9 files changed

+296
-57
lines changed

9 files changed

+296
-57
lines changed

ChangeLog

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
2025-10-28 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version, Date): RcppArmadillo 15.2.1-0
4+
* inst/NEWS.Rd: Idem
5+
* configure.ac: Idem
6+
* configure: Idem
7+
8+
* inst/include/current/: Sync with Armadillo 15.2.1
9+
110
2025-10-21 Dirk Eddelbuettel <[email protected]>
211

312
* inst/tinytest/test_misc.R: Tests for armadillo_version_typed()

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Package: RcppArmadillo
22
Type: Package
33
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
4-
Version: 15.2.0-0
5-
Date: 2025-10-20
4+
Version: 15.2.1-0
5+
Date: 2025-10-28
66
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "[email protected]",
77
comment = c(ORCID = "0000-0001-6419-907X")),
88
person("Romain", "Francois", role = "aut",

configure

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#! /bin/sh
22
# Guess values for system-dependent variables and create Makefiles.
3-
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.2.0-0.
3+
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.2.1-0.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -603,8 +603,8 @@ MAKEFLAGS=
603603
# Identity of this package.
604604
PACKAGE_NAME='RcppArmadillo'
605605
PACKAGE_TARNAME='rcpparmadillo'
606-
PACKAGE_VERSION='15.2.0-0'
607-
PACKAGE_STRING='RcppArmadillo 15.2.0-0'
606+
PACKAGE_VERSION='15.2.1-0'
607+
PACKAGE_STRING='RcppArmadillo 15.2.1-0'
608608
PACKAGE_BUGREPORT='[email protected]'
609609
PACKAGE_URL=''
610610

@@ -1221,7 +1221,7 @@ if test "$ac_init_help" = "long"; then
12211221
# Omit some internal or obsolete options to make the list less imposing.
12221222
# This message is too long to be a string in the A/UX 3.1 sh.
12231223
cat <<_ACEOF
1224-
'configure' configures RcppArmadillo 15.2.0-0 to adapt to many kinds of systems.
1224+
'configure' configures RcppArmadillo 15.2.1-0 to adapt to many kinds of systems.
12251225
12261226
Usage: $0 [OPTION]... [VAR=VALUE]...
12271227
@@ -1283,7 +1283,7 @@ fi
12831283

12841284
if test -n "$ac_init_help"; then
12851285
case $ac_init_help in
1286-
short | recursive ) echo "Configuration of RcppArmadillo 15.2.0-0:";;
1286+
short | recursive ) echo "Configuration of RcppArmadillo 15.2.1-0:";;
12871287
esac
12881288
cat <<\_ACEOF
12891289
@@ -1364,7 +1364,7 @@ fi
13641364
test -n "$ac_init_help" && exit $ac_status
13651365
if $ac_init_version; then
13661366
cat <<\_ACEOF
1367-
RcppArmadillo configure 15.2.0-0
1367+
RcppArmadillo configure 15.2.1-0
13681368
generated by GNU Autoconf 2.72
13691369
13701370
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1480,7 +1480,7 @@ cat >config.log <<_ACEOF
14801480
This file contains any messages produced by compilers while
14811481
running configure, to aid debugging if configure makes a mistake.
14821482
1483-
It was created by RcppArmadillo $as_me 15.2.0-0, which was
1483+
It was created by RcppArmadillo $as_me 15.2.1-0, which was
14841484
generated by GNU Autoconf 2.72. Invocation command line was
14851485
14861486
$ $0$ac_configure_args_raw
@@ -3862,7 +3862,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
38623862
# report actual input values of CONFIG_FILES etc. instead of their
38633863
# values after options handling.
38643864
ac_log="
3865-
This file was extended by RcppArmadillo $as_me 15.2.0-0, which was
3865+
This file was extended by RcppArmadillo $as_me 15.2.1-0, which was
38663866
generated by GNU Autoconf 2.72. Invocation command line was
38673867
38683868
CONFIG_FILES = $CONFIG_FILES
@@ -3917,7 +3917,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
39173917
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
39183918
ac_cs_config='$ac_cs_config_escaped'
39193919
ac_cs_version="\\
3920-
RcppArmadillo config.status 15.2.0-0
3920+
RcppArmadillo config.status 15.2.1-0
39213921
configured by $0, generated by GNU Autoconf 2.72,
39223922
with options \\"\$ac_cs_config\\"
39233923

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
AC_PREREQ([2.69])
1212

1313
## Process this file with autoconf to produce a configure script.
14-
AC_INIT([RcppArmadillo],[15.2.0-0],[[email protected]])
14+
AC_INIT([RcppArmadillo],[15.2.1-0],[[email protected]])
1515

1616
## Set R_HOME, respecting an environment variable if one is set
1717
: ${R_HOME=$(R RHOME)}

inst/NEWS.Rd

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
\newcommand{\ghpr}{\href{https://github.com/RcppCore/RcppArmadillo/pull/#1}{##1}}
44
\newcommand{\ghit}{\href{https://github.com/RcppCore/RcppArmadillo/issues/#1}{##1}}
55

6+
\section{Changes in RcppArmadillo version 15.2.1-0 (2025-10-28) (GitHub Only)}{
7+
\itemize{
8+
\item Upgraded to Armadillo release 15.2.1 (Medium Roast Deluxe)
9+
\itemize{
10+
\item Faster handling of submatrices with one row
11+
}
12+
}
13+
}
14+
615
\section{Changes in RcppArmadillo version 15.2.0-0 (2025-10-20) (GitHub Only)}{
716
\itemize{
817
\item Upgraded to Armadillo release 15.2.0 (Medium Roast Deluxe)

inst/include/current/armadillo_bits/arma_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#define ARMA_VERSION_MAJOR 15
2525
#define ARMA_VERSION_MINOR 2
26-
#define ARMA_VERSION_PATCH 0
26+
#define ARMA_VERSION_PATCH 1
2727
#define ARMA_VERSION_NAME "Medium Roast Deluxe"
2828

2929

inst/include/current/armadillo_bits/op_accu_meat.hpp

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,30 @@ op_accu_mat::apply(const subview<eT>& X)
602602
const uword X_n_rows = X.n_rows;
603603
const uword X_n_cols = X.n_cols;
604604

605-
if(X_n_rows == 1) { return op_accu_mat::apply( static_cast< const subview_row<eT>& >(X) ); }
605+
if(X_n_rows == 1)
606+
{
607+
const uword X_m_n_rows = X.m.n_rows;
608+
609+
const eT* mem_ptr = X.colptr(0);
610+
611+
eT val1 = eT(0);
612+
eT val2 = eT(0);
613+
614+
uword j;
615+
616+
for(j=1; j < X_n_cols; j+=2)
617+
{
618+
val1 += (*mem_ptr); mem_ptr += X_m_n_rows;
619+
val2 += (*mem_ptr); mem_ptr += X_m_n_rows;
620+
}
621+
622+
if((j-1) < X_n_cols)
623+
{
624+
val1 += (*mem_ptr);
625+
}
626+
627+
return val1 + val2;
628+
}
606629

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

@@ -640,7 +663,7 @@ op_accu_mat::apply(const subview_row<eT>& X)
640663
const uword X_m_n_rows = X.m.n_rows;
641664
const uword X_n_cols = X.n_cols;
642665

643-
const eT* row_mem = &(X.m.at(X.aux_row1,X.aux_col1));
666+
const eT* mem_ptr = X.rowmem;
644667

645668
eT val1 = eT(0);
646669
eT val2 = eT(0);
@@ -649,13 +672,13 @@ op_accu_mat::apply(const subview_row<eT>& X)
649672

650673
for(j=1; j < X_n_cols; j+=2)
651674
{
652-
val1 += (*row_mem); row_mem += X_m_n_rows;
653-
val2 += (*row_mem); row_mem += X_m_n_rows;
675+
val1 += (*mem_ptr); mem_ptr += X_m_n_rows;
676+
val2 += (*mem_ptr); mem_ptr += X_m_n_rows;
654677
}
655678

656679
if((j-1) < X_n_cols)
657680
{
658-
val1 += (*row_mem);
681+
val1 += (*mem_ptr);
659682
}
660683

661684
return val1 + val2;

inst/include/current/armadillo_bits/subview_bones.hpp

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ class subview : public Base< eT, subview<eT> >
8585
template<typename T1> inline void operator-= (const SpBase<eT,T1>& x);
8686
template<typename T1> inline void operator%= (const SpBase<eT,T1>& x);
8787
template<typename T1> inline void operator/= (const SpBase<eT,T1>& x);
88-
88+
8989
template<typename T1, typename gen_type>
9090
inline typename enable_if2< is_same_type<typename T1::elem_type, eT>::value, void>::result operator=(const Gen<T1,gen_type>& x);
9191

@@ -396,6 +396,11 @@ class subview_col : public subview<eT>
396396
inline void zeros();
397397
inline void ones();
398398

399+
arma_warn_unused inline bool is_finite() const;
400+
401+
arma_warn_unused inline bool has_inf() const;
402+
arma_warn_unused inline bool has_nan() const;
403+
399404
arma_inline eT at_alt (const uword i) const;
400405

401406
arma_inline eT& operator[](const uword i);
@@ -528,6 +533,8 @@ class subview_row : public subview<eT>
528533
static constexpr bool is_col = false;
529534
static constexpr bool is_xvec = false;
530535

536+
const eT* rowmem;
537+
531538
inline void operator= (const subview<eT>& x);
532539
inline void operator= (const subview_row& x);
533540
inline void operator= (const eT val);
@@ -545,6 +552,15 @@ class subview_row : public subview<eT>
545552

546553
arma_warn_unused arma_inline const Op<subview_row<eT>,op_strans> as_col() const;
547554

555+
inline void fill(const eT val);
556+
inline void zeros();
557+
inline void ones();
558+
559+
arma_warn_unused inline bool is_finite() const;
560+
561+
arma_warn_unused inline bool has_inf() const;
562+
arma_warn_unused inline bool has_nan() const;
563+
548564
inline eT at_alt (const uword i) const;
549565

550566
inline eT& operator[](const uword i);

0 commit comments

Comments
 (0)