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 @@
2024-12-05 Dirk Eddelbuettel <edd@debian.org>

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

* inst/include/armadillo_bits/: Armadillo 14.2.2

2024-11-24 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): RcppArmadillo 14.2.1-1
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: RcppArmadillo
Type: Package
Title: 'Rcpp' Integration for the 'Armadillo' Templated Linear Algebra Library
Version: 14.2.1-1
Date: 2024-11-24
Version: 14.2.2-1
Date: 2024-12-05
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "edd@debian.org",
comment = c(ORCID = "0000-0001-6419-907X")),
person("Romain", "Francois", role = "aut",
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.71 for RcppArmadillo 14.2.1-1.
# Generated by GNU Autoconf 2.71 for RcppArmadillo 14.2.2-1.
#
# Report bugs to <edd@debian.org>.
#
Expand Down Expand Up @@ -610,8 +610,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='RcppArmadillo'
PACKAGE_TARNAME='rcpparmadillo'
PACKAGE_VERSION='14.2.1-1'
PACKAGE_STRING='RcppArmadillo 14.2.1-1'
PACKAGE_VERSION='14.2.2-1'
PACKAGE_STRING='RcppArmadillo 14.2.2-1'
PACKAGE_BUGREPORT='edd@debian.org'
PACKAGE_URL=''

Expand Down Expand Up @@ -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 14.2.1-1 to adapt to many kinds of systems.
\`configure' configures RcppArmadillo 14.2.2-1 to adapt to many kinds of systems.

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

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

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

Expand Down Expand Up @@ -1372,7 +1372,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
RcppArmadillo configure 14.2.1-1
RcppArmadillo configure 14.2.2-1
generated by GNU Autoconf 2.71

Copyright (C) 2021 Free Software Foundation, Inc.
Expand Down Expand Up @@ -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 14.2.1-1, which was
It was created by RcppArmadillo $as_me 14.2.2-1, which was
generated by GNU Autoconf 2.71. Invocation command line was

$ $0$ac_configure_args_raw
Expand Down Expand Up @@ -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 14.2.1-1, which was
This file was extended by RcppArmadillo $as_me 14.2.2-1, which was
generated by GNU Autoconf 2.71. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -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 14.2.1-1
RcppArmadillo config.status 14.2.2-1
configured by $0, generated by GNU Autoconf 2.71,
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],[14.2.1-1],[edd@debian.org])
AC_INIT([RcppArmadillo],[14.2.2-1],[edd@debian.org])

## Set R_HOME, respecting an environment variable if one is set
: ${R_HOME=$(R RHOME)}
Expand Down
12 changes: 11 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@
\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.2.2-1 (2024-12-05)}{
\itemize{
\item Upgraded to Armadillo release 14.2.2 (Smooth Caffeine)
\itemize{
\item Workarounds for regressions in pre-release versions of GCC 15
\item More selective detection of symmetric/hermitian matrices by various functions
}
}
}

\section{Changes in RcppArmadillo version 14.2.1-1 (2024-11-24) (GitHub Only)}{
\itemize{
\item Upgraded to Armadillo release 14.2.1 (Smooth Caffeine)
\itemize{
Fix for \code{index_min()} and \code{index_max()} to ensure that the
\item Fix for \code{index_min()} and \code{index_max()} to ensure that the
first index of equal extremum values is found
}
}
Expand Down
2 changes: 2 additions & 0 deletions inst/include/armadillo_bits/Col_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ class Col<eT>::fixed : public Col<eT>
{
private:

using Mat<eT>::mem_local;

static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);

arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
Expand Down
10 changes: 5 additions & 5 deletions inst/include/armadillo_bits/Col_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,11 +1345,11 @@ Col<eT>::fixed<fixed_n_elem>::fixed(const fill::fill_class<fill_type>&)
{
arma_debug_sigprint_this(this);

if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
}


Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Cube_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,9 @@ class Cube<eT>::fixed : public Cube<eT>
{
private:

using Cube<eT>::mat_ptrs_local;
using Cube<eT>::mem_local;

static constexpr uword fixed_n_elem = fixed_n_rows * fixed_n_cols * fixed_n_slices;
static constexpr uword fixed_n_elem_slice = fixed_n_rows * fixed_n_cols;

Expand Down
8 changes: 4 additions & 4 deletions inst/include/armadillo_bits/Cube_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5412,10 +5412,10 @@ Cube<eT>::fixed<fixed_n_rows, fixed_n_cols, fixed_n_slices>::fixed(const fill::f

mem_setup();

if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
if(is_same_type<fill_type, fill::fill_zeros>::yes) { Cube<eT>::zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { Cube<eT>::ones(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { Cube<eT>::randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { Cube<eT>::randn(); }

arma_static_check( (is_same_type<fill_type, fill::fill_eye>::yes), "Cube::fixed::fixed(): unsupported fill type" );
}
Expand Down
2 changes: 2 additions & 0 deletions inst/include/armadillo_bits/Mat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -825,6 +825,8 @@ class Mat<eT>::fixed : public Mat<eT>
{
private:

using Mat<eT>::mem_local;

static constexpr uword fixed_n_elem = fixed_n_rows * fixed_n_cols;
static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);

Expand Down
10 changes: 5 additions & 5 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -9565,11 +9565,11 @@ Mat<eT>::fixed<fixed_n_rows, fixed_n_cols>::fixed(const fill::fill_class<fill_ty
{
arma_debug_sigprint_this(this);

if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
}


Expand Down
2 changes: 2 additions & 0 deletions inst/include/armadillo_bits/Row_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ class Row<eT>::fixed : public Row<eT>
{
private:

using Mat<eT>::mem_local;

static constexpr bool use_extra = (fixed_n_elem > arma_config::mat_prealloc);

arma_align_mem eT mem_local_extra[ (use_extra) ? fixed_n_elem : 1 ];
Expand Down
10 changes: 5 additions & 5 deletions inst/include/armadillo_bits/Row_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1345,11 +1345,11 @@ Row<eT>::fixed<fixed_n_elem>::fixed(const fill::fill_class<fill_type>&)
{
arma_debug_sigprint_this(this);

if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { (*this).eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { (*this).randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { (*this).randn(); }
if(is_same_type<fill_type, fill::fill_zeros>::yes) { (*this).zeros(); }
if(is_same_type<fill_type, fill::fill_ones >::yes) { (*this).ones(); }
if(is_same_type<fill_type, fill::fill_eye >::yes) { Mat<eT>::eye(); }
if(is_same_type<fill_type, fill::fill_randu>::yes) { Mat<eT>::randu(); }
if(is_same_type<fill_type, fill::fill_randn>::yes) { Mat<eT>::randn(); }
}


Expand Down
2 changes: 1 addition & 1 deletion inst/include/armadillo_bits/arma_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define ARMA_VERSION_MAJOR 14
#define ARMA_VERSION_MINOR 2
#define ARMA_VERSION_PATCH 1
#define ARMA_VERSION_PATCH 2
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@conradsnicta As you may have noticed I have not merged yet.

#define ARMA_VERSION_NAME "Smooth Caffeine"


Expand Down
37 changes: 32 additions & 5 deletions inst/include/armadillo_bits/sym_helper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,26 @@ guess_sympd_worker(const Mat<eT>& A)
const eT* A_mem = A.memptr();
const eT* A_col = A_mem;

bool diag_below_tol = true;

eT max_diag = eT(0);

for(uword j=0; j < N; ++j)
{
const eT A_jj = A_col[j];

if(A_jj <= eT(0)) { return false; }
if( A_jj <= eT(0)) { return false; }
if(arma_isfinite(A_jj) == false) { return false; }

if(A_jj >= tol) { diag_below_tol = false; }

max_diag = (A_jj > max_diag) ? A_jj : max_diag;

A_col += N;
}

if(diag_below_tol) { return false; } // assume matrix is suspect if all diagonal elements are close to zero

A_col = A_mem;

const uword Nm1 = N-1;
Expand Down Expand Up @@ -128,6 +135,8 @@ guess_sympd_worker(const Mat<eT>& A)
const eT* A_mem = A.memptr();
const eT* A_col = A_mem;

bool diag_below_tol = true;

T max_diag = T(0);

for(uword j=0; j < N; ++j)
Expand All @@ -138,15 +147,21 @@ guess_sympd_worker(const Mat<eT>& A)
const T A_jj_rabs = std::abs(A_jj_r);
const T A_jj_iabs = std::abs(A_jj_i);

if(A_jj_r <= T(0) ) { return false; } // real should be positive
if(A_jj_iabs > tol ) { return false; } // imag should be approx zero
if(A_jj_iabs > A_jj_rabs) { return false; } // corner case: real and imag are close to zero, and imag is dominant
if( A_jj_r <= T(0) ) { return false; } // real should be positive
if(arma_isfinite(A_jj_r) == false) { return false; }

if(A_jj_iabs > tol ) { return false; } // imag should be approx zero
if(A_jj_iabs > A_jj_rabs) { return false; } // corner case: real and imag are close to zero, and imag is dominant

if(A_jj_r >= tol) { diag_below_tol = false; }

max_diag = (A_jj_r > max_diag) ? A_jj_r : max_diag;

A_col += N;
}

if(diag_below_tol) { return false; } // assume matrix is suspect if all diagonal elements are close to zero

const T square_max_diag = max_diag * max_diag;

if(arma_isfinite(square_max_diag) == false) { return false; }
Expand Down Expand Up @@ -264,15 +279,21 @@ is_approx_sym_worker(const Mat<eT>& A)
const eT* A_mem = A.memptr();
const eT* A_col = A_mem;

bool diag_below_tol = true;

for(uword j=0; j < N; ++j)
{
const eT& A_jj = A_col[j];
const eT A_jj = A_col[j];

if(arma_isfinite(A_jj) == false) { return false; }

if(std::abs(A_jj) >= tol) { diag_below_tol = false; }

A_col += N;
}

if(diag_below_tol) { return false; } // assume matrix is suspect if all diagonal elements are close to zero

A_col = A_mem;

const uword Nm1 = N-1;
Expand Down Expand Up @@ -324,6 +345,8 @@ is_approx_sym_worker(const Mat<eT>& A)
const eT* A_mem = A.memptr();
const eT* A_col = A_mem;

bool diag_below_tol = true;

// ensure diagonal has approx real-only elements
for(uword j=0; j < N; ++j)
{
Expand All @@ -338,9 +361,13 @@ is_approx_sym_worker(const Mat<eT>& A)

if(arma_isfinite(A_jj_r) == false) { return false; }

if(A_jj_rabs >= tol) { diag_below_tol = false; }

A_col += N;
}

if(diag_below_tol) { return false; } // assume matrix is suspect if all diagonal elements are close to zero

A_col = A_mem;

const uword Nm1 = N-1;
Expand Down
Loading