Skip to content

Commit 2c7c053

Browse files
authored
Merge pull request #393 from RcppCore/feature/arma_11.4
RcppArmadillo 0.11.4.0.0 with Armadillo 11.4.0
2 parents 2bd618e + 959aad6 commit 2c7c053

34 files changed

+1557
-379
lines changed

ChangeLog

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
2022-09-22 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version): RcppArmadillo 0.11.4.0.0
4+
* inst/NEWS.Rd: Idem
5+
* configure.ac: Idem
6+
* configure: Idem
7+
8+
* inst/include/armadillo: Armadillo 11.4.0
9+
* inst/include/armadillo_bits/: Idem
10+
11+
2022-09-19 Dirk Eddelbuettel <[email protected]>
12+
13+
* inst/include/armadillo: Armadillo 11.4.rc1
14+
* inst/include/armadillo_bits/: Idem
15+
116
2022-09-09 Dirk Eddelbuettel <[email protected]>
217

318
* DESCRIPTION (Version): RcppArmadillo 0.11.2.4.0

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: 0.11.2.4.0
5-
Date: 2022-09-07
4+
Version: 0.11.4.0.0
5+
Date: 2022-09-22
66
Author: Dirk Eddelbuettel, Romain Francois, Doug Bates, Binxiang Ni, and Conrad Sanderson
77
Maintainer: Dirk Eddelbuettel <[email protected]>
88
Description: 'Armadillo' is a templated C++ linear algebra library (by Conrad

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.71 for RcppArmadillo 0.11.2.4.0.
3+
# Generated by GNU Autoconf 2.71 for RcppArmadillo 0.11.4.0.0.
44
#
55
# Report bugs to <[email protected]>.
66
#
@@ -610,8 +610,8 @@ MAKEFLAGS=
610610
# Identity of this package.
611611
PACKAGE_NAME='RcppArmadillo'
612612
PACKAGE_TARNAME='rcpparmadillo'
613-
PACKAGE_VERSION='0.11.2.4.0'
614-
PACKAGE_STRING='RcppArmadillo 0.11.2.4.0'
613+
PACKAGE_VERSION='0.11.4.0.0'
614+
PACKAGE_STRING='RcppArmadillo 0.11.4.0.0'
615615
PACKAGE_BUGREPORT='[email protected]'
616616
PACKAGE_URL=''
617617

@@ -1229,7 +1229,7 @@ if test "$ac_init_help" = "long"; then
12291229
# Omit some internal or obsolete options to make the list less imposing.
12301230
# This message is too long to be a string in the A/UX 3.1 sh.
12311231
cat <<_ACEOF
1232-
\`configure' configures RcppArmadillo 0.11.2.4.0 to adapt to many kinds of systems.
1232+
\`configure' configures RcppArmadillo 0.11.4.0.0 to adapt to many kinds of systems.
12331233
12341234
Usage: $0 [OPTION]... [VAR=VALUE]...
12351235
@@ -1291,7 +1291,7 @@ fi
12911291

12921292
if test -n "$ac_init_help"; then
12931293
case $ac_init_help in
1294-
short | recursive ) echo "Configuration of RcppArmadillo 0.11.2.4.0:";;
1294+
short | recursive ) echo "Configuration of RcppArmadillo 0.11.4.0.0:";;
12951295
esac
12961296
cat <<\_ACEOF
12971297
@@ -1372,7 +1372,7 @@ fi
13721372
test -n "$ac_init_help" && exit $ac_status
13731373
if $ac_init_version; then
13741374
cat <<\_ACEOF
1375-
RcppArmadillo configure 0.11.2.4.0
1375+
RcppArmadillo configure 0.11.4.0.0
13761376
generated by GNU Autoconf 2.71
13771377
13781378
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1486,7 +1486,7 @@ cat >config.log <<_ACEOF
14861486
This file contains any messages produced by compilers while
14871487
running configure, to aid debugging if configure makes a mistake.
14881488
1489-
It was created by RcppArmadillo $as_me 0.11.2.4.0, which was
1489+
It was created by RcppArmadillo $as_me 0.11.4.0.0, which was
14901490
generated by GNU Autoconf 2.71. Invocation command line was
14911491
14921492
$ $0$ac_configure_args_raw
@@ -3944,7 +3944,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
39443944
# report actual input values of CONFIG_FILES etc. instead of their
39453945
# values after options handling.
39463946
ac_log="
3947-
This file was extended by RcppArmadillo $as_me 0.11.2.4.0, which was
3947+
This file was extended by RcppArmadillo $as_me 0.11.4.0.0, which was
39483948
generated by GNU Autoconf 2.71. Invocation command line was
39493949
39503950
CONFIG_FILES = $CONFIG_FILES
@@ -3999,7 +3999,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
39993999
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
40004000
ac_cs_config='$ac_cs_config_escaped'
40014001
ac_cs_version="\\
4002-
RcppArmadillo config.status 0.11.2.4.0
4002+
RcppArmadillo config.status 0.11.4.0.0
40034003
configured by $0, generated by GNU Autoconf 2.71,
40044004
with options \\"\$ac_cs_config\\"
40054005

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],[0.11.2.4.0],[[email protected]])
14+
AC_INIT([RcppArmadillo],[0.11.4.0.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: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@
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 0.11.4.0.0 (2022-09-22}{
7+
\itemize{
8+
\item Upgraded to Armadillo release 11.4.0 (Ship of Theseus)
9+
\itemize{
10+
\item faster handling of compound expressions by \code{sum()}
11+
\item extended \code{pow()} with various forms of element-wise power operations
12+
\item added \code{find_nan()} to find indices of NaN elements
13+
}
14+
}
15+
}
16+
617
\section{Changes in RcppArmadillo version 0.11.2.4.0 (2022-09-09}{
718
\itemize{
819
\item Upgraded to Armadillo release 11.2.4 (Classic Roast)

inst/include/armadillo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ namespace arma
330330
#include "armadillo_bits/glue_affmul_bones.hpp"
331331
#include "armadillo_bits/glue_mvnrnd_bones.hpp"
332332
#include "armadillo_bits/glue_quantile_bones.hpp"
333+
#include "armadillo_bits/glue_powext_bones.hpp"
333334

334335
#include "armadillo_bits/gmm_misc_bones.hpp"
335336
#include "armadillo_bits/gmm_diag_bones.hpp"
@@ -559,6 +560,7 @@ namespace arma
559560
#include "armadillo_bits/fn_randperm.hpp"
560561
#include "armadillo_bits/fn_quantile.hpp"
561562
#include "armadillo_bits/fn_powmat.hpp"
563+
#include "armadillo_bits/fn_powext.hpp"
562564

563565
#include "armadillo_bits/fn_speye.hpp"
564566
#include "armadillo_bits/fn_spones.hpp"
@@ -763,6 +765,7 @@ namespace arma
763765
#include "armadillo_bits/glue_affmul_meat.hpp"
764766
#include "armadillo_bits/glue_mvnrnd_meat.hpp"
765767
#include "armadillo_bits/glue_quantile_meat.hpp"
768+
#include "armadillo_bits/glue_powext_meat.hpp"
766769

767770
#include "armadillo_bits/gmm_misc_meat.hpp"
768771
#include "armadillo_bits/gmm_diag_meat.hpp"

inst/include/armadillo_bits/Col_meat.hpp

Lines changed: 15 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -311,10 +311,9 @@ Col<eT>::Col(const std::vector<eT>& x)
311311
{
312312
arma_extra_debug_sigprint_this(this);
313313

314-
if(x.size() > 0)
315-
{
316-
arrayops::copy( Mat<eT>::memptr(), &(x[0]), uword(x.size()) );
317-
}
314+
const uword N = uword(x.size());
315+
316+
if(N > 0) { arrayops::copy( Mat<eT>::memptr(), &(x[0]), N ); }
318317
}
319318

320319

@@ -327,12 +326,11 @@ Col<eT>::operator=(const std::vector<eT>& x)
327326
{
328327
arma_extra_debug_sigprint();
329328

330-
Mat<eT>::init_warm(uword(x.size()), 1);
329+
const uword N = uword(x.size());
331330

332-
if(x.size() > 0)
333-
{
334-
arrayops::copy( Mat<eT>::memptr(), &(x[0]), uword(x.size()) );
335-
}
331+
Mat<eT>::init_warm(N, 1);
332+
333+
if(N > 0) { arrayops::copy( Mat<eT>::memptr(), &(x[0]), N ); }
336334

337335
return *this;
338336
}
@@ -342,11 +340,13 @@ Col<eT>::operator=(const std::vector<eT>& x)
342340
template<typename eT>
343341
inline
344342
Col<eT>::Col(const std::initializer_list<eT>& list)
345-
: Mat<eT>(arma_vec_indicator(), 1)
343+
: Mat<eT>(arma_vec_indicator(), uword(list.size()), 1, 1)
346344
{
347-
arma_extra_debug_sigprint();
345+
arma_extra_debug_sigprint_this(this);
348346

349-
(*this).operator=(list);
347+
const uword N = uword(list.size());
348+
349+
if(N > 0) { arrayops::copy( Mat<eT>::memptr(), list.begin(), N ); }
350350
}
351351

352352

@@ -358,14 +358,11 @@ Col<eT>::operator=(const std::initializer_list<eT>& list)
358358
{
359359
arma_extra_debug_sigprint();
360360

361-
Mat<eT> tmp(list);
362-
363-
arma_debug_check( ((tmp.n_elem > 0) && (tmp.is_vec() == false)), "Mat::init(): requested size is not compatible with column vector layout" );
361+
const uword N = uword(list.size());
364362

365-
access::rw(tmp.n_rows) = tmp.n_elem;
366-
access::rw(tmp.n_cols) = 1;
363+
Mat<eT>::init_warm(N, 1);
367364

368-
(*this).steal_mem(tmp);
365+
if(N > 0) { arrayops::copy( Mat<eT>::memptr(), list.begin(), N ); }
369366

370367
return *this;
371368
}
@@ -423,14 +420,6 @@ Col<eT>::operator=(Col<eT>&& X)
423420

424421
(*this).steal_mem(X, true);
425422

426-
if( (X.mem_state == 0) && (X.n_alloc <= arma_config::mat_prealloc) && (this != &X) )
427-
{
428-
access::rw(X.n_rows) = 0;
429-
access::rw(X.n_cols) = 1;
430-
access::rw(X.n_elem) = 0;
431-
access::rw(X.mem) = nullptr;
432-
}
433-
434423
return *this;
435424
}
436425

inst/include/armadillo_bits/Cube_bones.hpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,13 @@ class Cube : public BaseCube< eT, Cube<eT> >
201201

202202
template<typename T1> inline void shed_slices(const Base<uword, T1>& indices);
203203

204-
inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero = true);
205-
inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero = true);
206-
inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero = true);
204+
arma_deprecated inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
205+
arma_deprecated inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero);
206+
arma_deprecated inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero);
207+
208+
inline void insert_rows(const uword row_num, const uword N);
209+
inline void insert_cols(const uword row_num, const uword N);
210+
inline void insert_slices(const uword slice_num, const uword N);
207211

208212
template<typename T1> inline void insert_rows(const uword row_num, const BaseCube<eT,T1>& X);
209213
template<typename T1> inline void insert_cols(const uword col_num, const BaseCube<eT,T1>& X);

0 commit comments

Comments
 (0)