From 4496f006daf0f6fc40649d4f5bcfb6c636d8face Mon Sep 17 00:00:00 2001 From: Dirk Eddelbuettel Date: Mon, 8 Jul 2024 00:45:58 -0500 Subject: [PATCH] RcppArmadillo 14.0.0-1 --- ChangeLog | 14 +++++++++++++ DESCRIPTION | 4 ++-- README.md | 2 +- configure | 18 ++++++++-------- configure.ac | 2 +- inst/NEWS.Rd | 21 +++++++++++++++++++ .../interface/RcppArmadilloForward.h | 3 ++- inst/include/armadillo_bits/arma_version.hpp | 6 +++--- inst/include/armadillo_bits/config.hpp | 4 ++++ .../armadillo_bits/op_reshape_meat.hpp | 3 +++ .../include/armadillo_bits/op_resize_meat.hpp | 3 +++ .../armadillo_bits/spop_relational_meat.hpp | 12 +++++------ 12 files changed, 69 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0461bd14..2db8b90e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2024-07-05 Dirk Eddelbuettel + + * DESCRIPTION (Version, Date): RcppArmadillo 14.0.0 + * inst/NEWS.Rd: Idem + * configure.ac: Idem + * configure: Idem + + * inst/include/RcppArmadillo/interface/RcppArmadilloForward.h: + Re-enable ARMA_IGNORE_DEPRECATED_MARKER + +2024-06-24 Dirk Eddelbuettel + + * inst/include/armadillo_bits/: Armadillo 14.0.0 + 2024-06-23 Dirk Eddelbuettel * DESCRIPTION (Version, Date): RcppArmadillo 0.12.8.4.0.14.4 ie the diff --git a/DESCRIPTION b/DESCRIPTION index 21a43c8c..8c5e6345 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,8 +1,8 @@ Package: RcppArmadillo Type: Package Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library -Version: 0.12.8.4.0.14.4 -Date: 2024-06-23 +Version: 14.0.0-1 +Date: 2024-07-05 Author: Dirk Eddelbuettel, Romain Francois, Doug Bates, Binxiang Ni, and Conrad Sanderson Maintainer: Dirk Eddelbuettel Description: 'Armadillo' is a templated C++ linear algebra library (by Conrad diff --git a/README.md b/README.md index bed0210f..2115b37d 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ [![License](https://eddelbuettel.github.io/badges/GPL2+.svg)](https://www.gnu.org/licenses/gpl-2.0.html) [![CRAN](https://www.r-pkg.org/badges/version/RcppArmadillo)](https://cran.r-project.org/package=RcppArmadillo) [![Debian package](https://img.shields.io/debian/v/r-cran-rcpparmadillo/sid?color=brightgreen)](https://packages.debian.org/sid/r-cran-rcpparmadillo) -[![r-universe](https://rcppcore.r-universe.dev/badges/RcppArmadillo)](https://rcppcore.r-universe.dev/rcpparmadillo) +[![r-universe](https://rcppcore.r-universe.dev/badges/RcppArmadillo)](https://rcppcore.r-universe.dev/RcppArmadillo) [![Dependencies](https://tinyverse.netlify.app/badge/RcppArmadillo)](https://cran.r-project.org/package=RcppArmadillo) [![Coverage Status](https://codecov.io/gh/RcppCore/RcppArmadillo/graph/badge.svg)](https://app.codecov.io/github/RcppCore/RcppArmadillo?branch=master) [![Last Commit](https://img.shields.io/github/last-commit/RcppCore/RcppArmadillo)](https://github.com/RcppCore/RcppArmadillo) diff --git a/configure b/configure index fa11426e..6bb4d046 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for RcppArmadillo 0.12.8.4.0. +# Generated by GNU Autoconf 2.71 for RcppArmadillo 14.0.0-1. # # Report bugs to . # @@ -610,8 +610,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='RcppArmadillo' PACKAGE_TARNAME='rcpparmadillo' -PACKAGE_VERSION='0.12.8.4.0' -PACKAGE_STRING='RcppArmadillo 0.12.8.4.0' +PACKAGE_VERSION='14.0.0-1' +PACKAGE_STRING='RcppArmadillo 14.0.0-1' PACKAGE_BUGREPORT='edd@debian.org' PACKAGE_URL='' @@ -1229,7 +1229,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 0.12.8.4.0 to adapt to many kinds of systems. +\`configure' configures RcppArmadillo 14.0.0-1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1291,7 +1291,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of RcppArmadillo 0.12.8.4.0:";; + short | recursive ) echo "Configuration of RcppArmadillo 14.0.0-1:";; esac cat <<\_ACEOF @@ -1372,7 +1372,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -RcppArmadillo configure 0.12.8.4.0 +RcppArmadillo configure 14.0.0-1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1486,7 +1486,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 0.12.8.4.0, which was +It was created by RcppArmadillo $as_me 14.0.0-1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -3944,7 +3944,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 0.12.8.4.0, which was +This file was extended by RcppArmadillo $as_me 14.0.0-1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3999,7 +3999,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 0.12.8.4.0 +RcppArmadillo config.status 14.0.0-1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 712a0e94..1dd10068 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ AC_PREREQ([2.69]) ## Process this file with autoconf to produce a configure script. -AC_INIT([RcppArmadillo],[0.12.8.4.0],[edd@debian.org]) +AC_INIT([RcppArmadillo],[14.0.0-1],[edd@debian.org]) ## Set R_HOME, respecting an environment variable if one is set : ${R_HOME=$(R RHOME)} diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd index 215f221b..a17c480e 100644 --- a/inst/NEWS.Rd +++ b/inst/NEWS.Rd @@ -3,6 +3,27 @@ \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 14.0.0-1 (2024-07-05)}{ + \itemize{ + \item Upgraded to Armadillo release 14.0.0 (Stochastic Parrot) + \itemize{ + \item C++14 is now the minimum recommended C++ standard + \item Faster handling of compound expressions by \code{as_scalar()}, + \code{accu()}, \code{dot()} + \item Faster interactions between sparse and dense matrices + \item Expanded \code{stddev()} to handle sparse matrices + \item Expanded relational operators to handle expressions between + sparse matrices and scalars + \item Added \code{.as_dense()} to obtain dense vector/matrix + representation of any sparse matrix expression + \item Updated physical constants to NIST 2022 CODATA values + } + \item New package version numbering scheme following upstream versions + \item Re-enabling \code{ARMA_IGNORE_DEPRECATED_MARKE} for silent CRAN + builds + } +} + \section{Changes in RcppArmadillo version 0.12.8.4.0 (2024-05-30)}{ \itemize{ \item Upgraded to Armadillo release 12.8.4 (Cortisol Injector) diff --git a/inst/include/RcppArmadillo/interface/RcppArmadilloForward.h b/inst/include/RcppArmadillo/interface/RcppArmadilloForward.h index 824dab13..cbd53758 100644 --- a/inst/include/RcppArmadillo/interface/RcppArmadilloForward.h +++ b/inst/include/RcppArmadillo/interface/RcppArmadilloForward.h @@ -52,7 +52,8 @@ // for details) then defining the following macro will help. You can add a // #define in your source code before including the RcppArmadillo header, or add // a -DARMA_IGNORE_DEPRECATED_MARKER to the PKG_CPPFLAGS in src/Makevars. -//#define ARMA_IGNORE_DEPRECATED_MARKER +// Renabling globally for 14.0.0 release +#define ARMA_IGNORE_DEPRECATED_MARKER #include "armadillo" diff --git a/inst/include/armadillo_bits/arma_version.hpp b/inst/include/armadillo_bits/arma_version.hpp index 54ea18ca..1c9aa143 100644 --- a/inst/include/armadillo_bits/arma_version.hpp +++ b/inst/include/armadillo_bits/arma_version.hpp @@ -21,10 +21,10 @@ -#define ARMA_VERSION_MAJOR 13 -#define ARMA_VERSION_MINOR 91 +#define ARMA_VERSION_MAJOR 14 +#define ARMA_VERSION_MINOR 0 #define ARMA_VERSION_PATCH 0 -#define ARMA_VERSION_NAME "14.0-RC1" +#define ARMA_VERSION_NAME "Stochastic Parrot" diff --git a/inst/include/armadillo_bits/config.hpp b/inst/include/armadillo_bits/config.hpp index 33632e9e..0b75de7e 100644 --- a/inst/include/armadillo_bits/config.hpp +++ b/inst/include/armadillo_bits/config.hpp @@ -319,6 +319,10 @@ #endif #if defined(ARMA_DONT_CHECK_CONFORMANCE) + #if defined(ARMA_CHECK_CONFORMANCE) && (ARMA_WARN_LEVEL >= 2) + #pragma message ("WARNING: conformance checks disabled") + #endif + #undef ARMA_CHECK_CONFORMANCE #endif diff --git a/inst/include/armadillo_bits/op_reshape_meat.hpp b/inst/include/armadillo_bits/op_reshape_meat.hpp index 453c613f..322223d2 100644 --- a/inst/include/armadillo_bits/op_reshape_meat.hpp +++ b/inst/include/armadillo_bits/op_reshape_meat.hpp @@ -81,6 +81,9 @@ op_reshape::apply_mat_inplace(Mat& A, const uword new_n_rows, const uword ne { arma_debug_sigprint(); + arma_conform_check( (A.vec_state == 1) && (new_n_cols != 1), "reshape(): requested size is not compatible with column vector layout" ); + arma_conform_check( (A.vec_state == 2) && (new_n_rows != 1), "reshape(): requested size is not compatible with row vector layout" ); + const uword new_n_elem = new_n_rows * new_n_cols; if(A.n_elem == new_n_elem) { A.set_size(new_n_rows, new_n_cols); return; } diff --git a/inst/include/armadillo_bits/op_resize_meat.hpp b/inst/include/armadillo_bits/op_resize_meat.hpp index 5abdc992..5db5d425 100644 --- a/inst/include/armadillo_bits/op_resize_meat.hpp +++ b/inst/include/armadillo_bits/op_resize_meat.hpp @@ -58,6 +58,9 @@ op_resize::apply_mat_inplace(Mat& A, const uword new_n_rows, const uword new if( (A.n_rows == new_n_rows) && (A.n_cols == new_n_cols) ) { return; } + arma_conform_check( (A.vec_state == 1) && (new_n_cols != 1), "resize(): requested size is not compatible with column vector layout" ); + arma_conform_check( (A.vec_state == 2) && (new_n_rows != 1), "resize(): requested size is not compatible with row vector layout" ); + if(A.is_empty()) { A.zeros(new_n_rows, new_n_cols); return; } Mat B; diff --git a/inst/include/armadillo_bits/spop_relational_meat.hpp b/inst/include/armadillo_bits/spop_relational_meat.hpp index d31fc699..2c4a920e 100644 --- a/inst/include/armadillo_bits/spop_relational_meat.hpp +++ b/inst/include/armadillo_bits/spop_relational_meat.hpp @@ -53,7 +53,7 @@ \ if((cur_pos - last_pos) > offset)\ {\ - arrayops::inplace_set(tmp.memptr() + last_pos + offset, zero_comp_val, cur_pos - last_pos - offset);\ + arrayops::inplace_set( (tmp.memptr() + last_pos + offset), zero_comp_val, (cur_pos - last_pos - offset) );\ }\ \ tmp.at(cur_pos) = (k operator_rel (*it)) ? uword(1) : uword(0);\ @@ -62,9 +62,9 @@ offset = 1;\ }\ \ - if(last_pos != (n_elem-1))\ + if(last_pos < n_elem)\ {\ - arrayops::inplace_set(tmp.memptr() + last_pos + offset, zero_comp_val, (n_elem - last_pos));\ + arrayops::inplace_set( (tmp.memptr() + last_pos + offset), zero_comp_val, (n_elem - last_pos - offset) );\ }\ \ out = tmp;\ @@ -94,7 +94,7 @@ \ if((cur_pos - last_pos) > offset)\ {\ - arrayops::inplace_set(tmp.memptr() + last_pos + offset, zero_comp_val, cur_pos - last_pos - offset);\ + arrayops::inplace_set( (tmp.memptr() + last_pos + offset), zero_comp_val, (cur_pos - last_pos - offset) );\ }\ \ tmp.at(cur_pos) = ((*it) operator_rel k) ? uword(1) : uword(0);\ @@ -103,9 +103,9 @@ offset = 1;\ }\ \ - if(last_pos != (n_elem-1))\ + if(last_pos < n_elem)\ {\ - arrayops::inplace_set(tmp.memptr() + last_pos + offset, zero_comp_val, (n_elem - last_pos));\ + arrayops::inplace_set( (tmp.memptr() + last_pos + offset), zero_comp_val, (n_elem - last_pos - offset) );\ }\ \ out = tmp;\