Skip to content

Commit 094b493

Browse files
authored
RcppArmadillo 15.4.2-1 with Armadillo 15.2.4 (#509)
* Armadillo 15.4.2 * RcppArmadillo 15.4.2-1 * Tabify part of ChangeLog [ci skip]
1 parent cc5901b commit 094b493

10 files changed

Lines changed: 145 additions & 78 deletions

File tree

‎ChangeLog‎

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,20 @@
1+
2026-07-25 Dirk Eddelbuettel <edd@debian.org>
2+
3+
* DESCRIPTION (Version, Date): RcppArmadillo 15.4.2-1
4+
* inst/NEWS.Rd: Idem
5+
* configure.ac: Idem
6+
* configure: Idem
7+
8+
2026-07-23 Dirk Eddelbuettel <edd@debian.org>
9+
10+
* inst/include/armadillo_bits/: Armadillo 15.4.2
11+
112
2026-07-09 Dirk Eddelbuettel <edd@debian.org>
213

314
* DESCRIPTION (Version, Date): RcppArmadillo 15.4.1-1
4-
* inst/NEWS.Rd: Idem
5-
* configure.ac: Idem
6-
* configure: Idem
15+
* inst/NEWS.Rd: Idem
16+
* configure.ac: Idem
17+
* configure: Idem
718

819
* inst/include/armadillo_bits/: Armadillo 15.4.1
920

@@ -12,18 +23,18 @@
1223
2026-06-18 Dirk Eddelbuettel <edd@debian.org>
1324

1425
* DESCRIPTION (Version, Date): RcppArmadillo 15.4.0-1
15-
* inst/NEWS.Rd: Idem
16-
* configure.ac: Idem
17-
* configure: Idem
26+
* inst/NEWS.Rd: Idem
27+
* configure.ac: Idem
28+
* configure: Idem
1829

1930
* inst/include/armadillo_bits/: Armadillo 15.4.0
2031

2132
2026-06-16 Dirk Eddelbuettel <edd@debian.org>
2233

2334
* DESCRIPTION (Version, Date): RcppArmadillo 15.3.91-1
24-
* inst/NEWS.Rd: Idem
25-
* configure.ac: Idem
26-
* configure: Idem
35+
* inst/NEWS.Rd: Idem
36+
* configure.ac: Idem
37+
* configure: Idem
2738

2839
* inst/include/armadillo*: Armadillo 15.3.91 aka 15.4-rc1
2940

‎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.4.1-1
5-
Date: 2026-07-09
4+
Version: 15.4.2-1
5+
Date: 2026-07-25
66
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org",
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.4.1-1.
3+
# Generated by GNU Autoconf 2.72 for RcppArmadillo 15.4.2-1.
44
#
55
# Report bugs to <edd@debian.org>.
66
#
@@ -603,8 +603,8 @@ MAKEFLAGS=
603603
# Identity of this package.
604604
PACKAGE_NAME='RcppArmadillo'
605605
PACKAGE_TARNAME='rcpparmadillo'
606-
PACKAGE_VERSION='15.4.1-1'
607-
PACKAGE_STRING='RcppArmadillo 15.4.1-1'
606+
PACKAGE_VERSION='15.4.2-1'
607+
PACKAGE_STRING='RcppArmadillo 15.4.2-1'
608608
PACKAGE_BUGREPORT='edd@debian.org'
609609
PACKAGE_URL=''
610610

@@ -1223,7 +1223,7 @@ if test "$ac_init_help" = "long"; then
12231223
# Omit some internal or obsolete options to make the list less imposing.
12241224
# This message is too long to be a string in the A/UX 3.1 sh.
12251225
cat <<_ACEOF
1226-
'configure' configures RcppArmadillo 15.4.1-1 to adapt to many kinds of systems.
1226+
'configure' configures RcppArmadillo 15.4.2-1 to adapt to many kinds of systems.
12271227
12281228
Usage: $0 [OPTION]... [VAR=VALUE]...
12291229
@@ -1285,7 +1285,7 @@ fi
12851285

12861286
if test -n "$ac_init_help"; then
12871287
case $ac_init_help in
1288-
short | recursive ) echo "Configuration of RcppArmadillo 15.4.1-1:";;
1288+
short | recursive ) echo "Configuration of RcppArmadillo 15.4.2-1:";;
12891289
esac
12901290
cat <<\_ACEOF
12911291
@@ -1366,7 +1366,7 @@ fi
13661366
test -n "$ac_init_help" && exit $ac_status
13671367
if $ac_init_version; then
13681368
cat <<\_ACEOF
1369-
RcppArmadillo configure 15.4.1-1
1369+
RcppArmadillo configure 15.4.2-1
13701370
generated by GNU Autoconf 2.72
13711371
13721372
Copyright (C) 2023 Free Software Foundation, Inc.
@@ -1482,7 +1482,7 @@ cat >config.log <<_ACEOF
14821482
This file contains any messages produced by compilers while
14831483
running configure, to aid debugging if configure makes a mistake.
14841484
1485-
It was created by RcppArmadillo $as_me 15.4.1-1, which was
1485+
It was created by RcppArmadillo $as_me 15.4.2-1, which was
14861486
generated by GNU Autoconf 2.72. Invocation command line was
14871487
14881488
$ $0$ac_configure_args_raw
@@ -3946,7 +3946,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39463946
# report actual input values of CONFIG_FILES etc. instead of their
39473947
# values after options handling.
39483948
ac_log="
3949-
This file was extended by RcppArmadillo $as_me 15.4.1-1, which was
3949+
This file was extended by RcppArmadillo $as_me 15.4.2-1, which was
39503950
generated by GNU Autoconf 2.72. Invocation command line was
39513951
39523952
CONFIG_FILES = $CONFIG_FILES
@@ -4001,7 +4001,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
40014001
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40024002
ac_cs_config='$ac_cs_config_escaped'
40034003
ac_cs_version="\\
4004-
RcppArmadillo config.status 15.4.1-1
4004+
RcppArmadillo config.status 15.4.2-1
40054005
configured by $0, generated by GNU Autoconf 2.72,
40064006
with options \\"\$ac_cs_config\\"
40074007

‎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.4.1-1],[edd@debian.org])
14+
AC_INIT([RcppArmadillo],[15.4.2-1],[edd@debian.org])
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.4.2-1 (2026-07-25)}{
7+
\itemize{
8+
\item Upgraded to Armadillo release 15.4.2 (Medium Roast Agave)
9+
\itemize{
10+
\item Fix speed regressions in \code{diagvec()} and \code{diagmat()}
11+
}
12+
}
13+
}
14+
615
\section{Changes in RcppArmadillo version 15.4.1-1 [github-only] (2026-07-09)}{
716
\itemize{
817
\item Upgraded to Armadillo release 15.4.1 (Medium Roast Agave)

‎inst/include/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 4
26-
#define ARMA_VERSION_PATCH 1
26+
#define ARMA_VERSION_PATCH 2
2727
#define ARMA_VERSION_NAME "Medium Roast Agave"
2828

2929

‎inst/include/armadillo_bits/op_diagmat_bones.hpp‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ struct op_diagmat
3333
template<typename T1>
3434
inline static void apply(Mat<typename T1::elem_type>& out, const Proxy<T1>& P);
3535

36+
//
37+
3638
template<typename T1, typename T2>
3739
inline static void apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagmat>& X);
3840

41+
template<typename T1, typename T2>
42+
inline static void apply(Mat_noalias<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagmat>& X);
43+
3944
template<typename T1, typename T2>
4045
inline static void apply_times(Mat<typename T1::elem_type>& out, const T1& X, const T2& Y, const typename arma_not_cx<typename T1::elem_type>::result* junk = nullptr);
4146

‎inst/include/armadillo_bits/op_diagmat_meat.hpp‎

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,31 @@ op_diagmat::apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_ti
174174
{
175175
arma_debug_sigprint();
176176

177+
typedef typename T1::elem_type eT;
178+
179+
if(X.m.is_alias(out))
180+
{
181+
Mat<eT> tmp;
182+
183+
op_diagmat::apply_times(tmp, X.m.A, X.m.B);
184+
185+
out.steal_mem(tmp);
186+
}
187+
else
188+
{
189+
op_diagmat::apply_times(out, X.m.A, X.m.B);
190+
}
191+
}
192+
193+
194+
195+
template<typename T1, typename T2>
196+
inline
197+
void
198+
op_diagmat::apply(Mat_noalias<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagmat>& X)
199+
{
200+
arma_debug_sigprint();
201+
177202
op_diagmat::apply_times(out, X.m.A, X.m.B);
178203
}
179204

@@ -182,7 +207,7 @@ op_diagmat::apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_ti
182207
template<typename T1, typename T2>
183208
inline
184209
void
185-
op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, const T2& Y, const typename arma_not_cx<typename T1::elem_type>::result* junk)
210+
op_diagmat::apply_times(Mat<typename T1::elem_type>& out, const T1& X, const T2& Y, const typename arma_not_cx<typename T1::elem_type>::result* junk)
186211
{
187212
arma_debug_sigprint();
188213
arma_ignore(junk);
@@ -218,9 +243,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
218243
const eT* C_mem = C.memptr();
219244
const uword N = C.n_elem;
220245

221-
actual_out.zeros(N,N);
246+
out.zeros(N,N);
222247

223-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
248+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
224249

225250
return;
226251
}
@@ -236,9 +261,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
236261
const eT* C_mem = C.memptr();
237262
const uword N = C.n_elem;
238263

239-
actual_out.zeros(N,N);
264+
out.zeros(N,N);
240265

241-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
266+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
242267

243268
return;
244269
}
@@ -254,9 +279,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
254279
const eT* C_mem = C.memptr();
255280
const uword N = C.n_elem;
256281

257-
actual_out.zeros(N,N);
282+
out.zeros(N,N);
258283

259-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
284+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
260285

261286
return;
262287
}
@@ -272,20 +297,15 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
272297
const eT* C_mem = C.memptr();
273298
const uword N = C.n_elem;
274299

275-
actual_out.zeros(N,N);
300+
out.zeros(N,N);
276301

277-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
302+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
278303

279304
return;
280305
}
281306
}
282307

283308
// if we got to this point, the multiplication results in a matrix
284-
285-
const bool is_alias = (UA.is_alias(actual_out) || UB.is_alias(actual_out));
286-
287-
Mat<eT> tmp;
288-
Mat<eT>& out = (is_alias) ? tmp : actual_out;
289309

290310
if( (partial_unwrap<T1>::do_trans == false) && (partial_unwrap<T2>::do_trans == false) )
291311
{
@@ -398,16 +418,14 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
398418
out.at(k,k) = (use_alpha) ? eT(alpha * acc) : eT(acc);
399419
}
400420
}
401-
402-
if(is_alias) { actual_out.steal_mem(tmp); }
403421
}
404422

405423

406424

407425
template<typename T1, typename T2>
408426
inline
409427
void
410-
op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, const T2& Y, const typename arma_cx_only<typename T1::elem_type>::result* junk)
428+
op_diagmat::apply_times(Mat<typename T1::elem_type>& out, const T1& X, const T2& Y, const typename arma_cx_only<typename T1::elem_type>::result* junk)
411429
{
412430
arma_debug_sigprint();
413431
arma_ignore(junk);
@@ -444,9 +462,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
444462
const eT* C_mem = C.memptr();
445463
const uword N = C.n_elem;
446464

447-
actual_out.zeros(N,N);
465+
out.zeros(N,N);
448466

449-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
467+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
450468

451469
return;
452470
}
@@ -462,9 +480,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
462480
const eT* C_mem = C.memptr();
463481
const uword N = C.n_elem;
464482

465-
actual_out.zeros(N,N);
483+
out.zeros(N,N);
466484

467-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
485+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
468486

469487
return;
470488
}
@@ -480,9 +498,9 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
480498
const eT* C_mem = C.memptr();
481499
const uword N = C.n_elem;
482500

483-
actual_out.zeros(N,N);
501+
out.zeros(N,N);
484502

485-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
503+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
486504

487505
return;
488506
}
@@ -498,20 +516,15 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
498516
const eT* C_mem = C.memptr();
499517
const uword N = C.n_elem;
500518

501-
actual_out.zeros(N,N);
519+
out.zeros(N,N);
502520

503-
for(uword i=0; i<N; ++i) { actual_out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
521+
for(uword i=0; i<N; ++i) { out.at(i,i) = (use_alpha) ? eT(alpha * C_mem[i]) : eT(C_mem[i]); }
504522

505523
return;
506524
}
507525
}
508526

509527
// if we got to this point, the multiplication results in a matrix
510-
511-
const bool is_alias = (UA.is_alias(actual_out) || UB.is_alias(actual_out));
512-
513-
Mat<eT> tmp;
514-
Mat<eT>& out = (is_alias) ? tmp : actual_out;
515528

516529
if( (partial_unwrap<T1>::do_trans == false) && (partial_unwrap<T2>::do_trans == false) )
517530
{
@@ -673,8 +686,6 @@ op_diagmat::apply_times(Mat<typename T1::elem_type>& actual_out, const T1& X, co
673686
out.at(k,k) = (use_alpha) ? eT(alpha * acc) : eT(acc);
674687
}
675688
}
676-
677-
if(is_alias) { actual_out.steal_mem(tmp); }
678689
}
679690

680691

‎inst/include/armadillo_bits/op_diagvec_bones.hpp‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,19 @@ struct op_diagvec
3333
template<typename T1>
3434
inline static void apply_proxy(Mat<typename T1::elem_type>& out, const Proxy<T1>& P);
3535

36+
//
37+
38+
template<typename T1, typename T2>
39+
inline static void apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagvec>& X);
40+
41+
template<typename T1, typename T2>
42+
inline static void apply(Mat_noalias<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagvec>& X);
43+
3644
template<typename T1, typename T2>
37-
inline static void apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagvec>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = nullptr);
45+
inline static void apply_glue_times(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_times>& X, const typename arma_not_cx<typename T1::elem_type>::result* junk = nullptr);
3846

3947
template<typename T1, typename T2>
40-
inline static void apply(Mat<typename T1::elem_type>& out, const Op< Glue<T1,T2,glue_times>, op_diagvec>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = nullptr);
48+
inline static void apply_glue_times(Mat<typename T1::elem_type>& out, const Glue<T1,T2,glue_times>& X, const typename arma_cx_only<typename T1::elem_type>::result* junk = nullptr);
4149
};
4250

4351

0 commit comments

Comments
 (0)