Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RcppArmadillo 14.0.2 with Armadillo 14.0.2 #451

Merged
merged 2 commits into from
Aug 6, 2024
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
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2024-08-06 Dirk Eddelbuettel <edd@debian.org>

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

2024-08-01 Dirk Eddelbuettel <edd@debian.org>

* DESCRIPTION (Version, Date): Increment micro version, update date
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.0.0-1-1
Date: 2024-08-01
Version: 14.0.2-0
Date: 2024-08-06
Author: Dirk Eddelbuettel, Romain Francois, Doug Bates, Binxiang Ni, and Conrad Sanderson
Maintainer: Dirk Eddelbuettel <edd@debian.org>
Description: 'Armadillo' is a templated C++ linear algebra library (by Conrad
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.0.0-1.
# Generated by GNU Autoconf 2.71 for RcppArmadillo 14.0.2-0.
#
# 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.0.0-1'
PACKAGE_STRING='RcppArmadillo 14.0.0-1'
PACKAGE_VERSION='14.0.2-0'
PACKAGE_STRING='RcppArmadillo 14.0.2-0'
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.0.0-1 to adapt to many kinds of systems.
\`configure' configures RcppArmadillo 14.0.2-0 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.0.0-1:";;
short | recursive ) echo "Configuration of RcppArmadillo 14.0.2-0:";;
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.0.0-1
RcppArmadillo configure 14.0.2-0
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.0.0-1, which was
It was created by RcppArmadillo $as_me 14.0.2-0, 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.0.0-1, which was
This file was extended by RcppArmadillo $as_me 14.0.2-0, 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.0.0-1
RcppArmadillo config.status 14.0.2-0
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.0.0-1],[edd@debian.org])
AC_INIT([RcppArmadillo],[14.0.2-0],[edd@debian.org])

## Set R_HOME, respecting an environment variable if one is set
: ${R_HOME=$(R RHOME)}
Expand Down
7 changes: 6 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
\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.x.y-z (2024-xx-yy)}{
\section{Changes in RcppArmadillo version 14.0.2-0 (2024-08-06) (GitHub Only){
\itemize{
\item Upgraded to Armadillo release 14.0.2 (Stochastic Parrot)
\itemize{
\item Optionally use C++20 memory alignment
\item Minor corrections for several corner-cases
}
\item The order of items displayed by \code{citation()} is reversed (Conrad
in \ghpr{449})
}
Expand Down
3 changes: 2 additions & 1 deletion inst/include/armadillo
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <cmath>
#include <ctime>

#include <memory>
#include <iostream>
#include <fstream>
#include <sstream>
Expand All @@ -52,7 +53,7 @@
#include <chrono>
#include <atomic>

#if !defined(ARMA_DONT_USE_STD_MUTEX)
#if defined(ARMA_USE_STD_MUTEX)
#include <mutex>
#endif

Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/Cube_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3562,7 +3562,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
//! element accessor; no bounds check
template<typename eT>
arma_inline
eT&
eT&
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice)
{
return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] );
Expand All @@ -3573,7 +3573,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
//! element accessor; no bounds check
template<typename eT>
arma_inline
const eT&
const eT&
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice) const
{
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];
Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6500,7 +6500,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
//! element accessor; no bounds check
template<typename eT>
arma_inline
eT&
eT&
Mat<eT>::operator[] (const uword in_row, const uword in_col)
{
return access::rw( mem[in_row + in_col*n_rows] );
Expand All @@ -6511,7 +6511,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
//! element accessor; no bounds check
template<typename eT>
arma_inline
const eT&
const eT&
Mat<eT>::operator[] (const uword in_row, const uword in_col) const
{
return mem[in_row + in_col*n_rows];
Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/Proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ struct Proxy< CubeToMatOp<T1, op_vectorise_cube_col> >

static constexpr bool use_at = false;
static constexpr bool use_mp = false;
static constexpr bool has_subview = false;
static constexpr bool has_subview = true;

static constexpr bool is_row = false;
static constexpr bool is_col = true;
Expand Down Expand Up @@ -891,7 +891,7 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >

static constexpr bool use_at = false;
static constexpr bool use_mp = false;
static constexpr bool has_subview = false;
static constexpr bool has_subview = true;

static constexpr bool is_row = false;
static constexpr bool is_col = true;
Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/SpMat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3374,7 +3374,7 @@ SpMat<eT>::operator()(const uword i) const

template<typename eT>
arma_inline
SpMat_MapMat_val<eT>
SpMat_MapMat_val<eT>
SpMat<eT>::operator[] (const uword in_row, const uword in_col)
{
return SpMat_MapMat_val<eT>((*this), cache, in_row, in_col);
Expand All @@ -3384,7 +3384,7 @@ SpMat<eT>::operator()(const uword i) const

template<typename eT>
arma_inline
eT
eT
SpMat<eT>::operator[] (const uword in_row, const uword in_col) const
{
return get_value(in_row, in_col);
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 0
#define ARMA_VERSION_PATCH 0
#define ARMA_VERSION_PATCH 2
#define ARMA_VERSION_NAME "Stochastic Parrot"


Expand Down
2 changes: 0 additions & 2 deletions inst/include/armadillo_bits/compiler_setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@
#endif

#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
#undef ARMA_HAVE_ICC_ASSUME_ALIGNED
#define ARMA_HAVE_ICC_ASSUME_ALIGNED

#endif

Expand Down
12 changes: 0 additions & 12 deletions inst/include/armadillo_bits/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,18 +349,6 @@
#define ARMA_WARN_LEVEL 3
#endif

#if defined(ARMA_DONT_PRINT_ERRORS)
#pragma message ("INFO: support for ARMA_DONT_PRINT_ERRORS option has been removed")

#if defined(ARMA_PRINT_EXCEPTIONS)
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL and ARMA_DONT_PRINT_EXCEPTIONS options instead")
#else
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL option instead")
#endif

#pragma message ("INFO: see the documentation for details")
#endif

#if defined(ARMA_DONT_PRINT_EXCEPTIONS)
#undef ARMA_PRINT_EXCEPTIONS
#endif
Expand Down
16 changes: 8 additions & 8 deletions inst/include/armadillo_bits/diskio_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1062,7 +1062,7 @@ diskio::save_coord_ascii(const Mat<eT>& x, std::ostream& f)
f.put('\n');
}

// make sure it's possible to figure out the matrix size later
// make sure it's possible to determine the matrix size
if( (x.n_rows > 0) && (x.n_cols > 0) )
{
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
Expand Down Expand Up @@ -1125,7 +1125,7 @@ diskio::save_coord_ascii(const Mat< std::complex<T> >& x, std::ostream& f)
f.put('\n');
}

// make sure it's possible to figure out the matrix size later
// make sure it's possible to determine the matrix size
if( (x.n_rows > 0) && (x.n_cols > 0) )
{
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
Expand Down Expand Up @@ -1319,8 +1319,8 @@ diskio::save_hdf5_binary(const Mat<eT>& x, const hdf5_name& spec, std::string& e
hid_t dataspace = H5Screate_simple(2, dims, NULL); // treat the matrix as a 2d array dataspace
hid_t datatype = hdf5_misc::get_hdf5_type<eT>();

// If this returned something invalid, well, it's time to crash.
arma_check(datatype == -1, "Mat::save(): unknown datatype for HDF5");
// fail if we can't handle the datatype
if(datatype == -1) { err_msg = "unknown datatype for HDF5"; return false; }

// MATLAB forces the users to specify a name at save time for HDF5;
// Octave will use the default of 'dataset' unless otherwise specified.
Expand Down Expand Up @@ -3065,7 +3065,7 @@ diskio::save_coord_ascii(const SpMat<eT>& x, std::ostream& f)
}


// make sure it's possible to figure out the matrix size later
// make sure it's possible to determine the matrix size
if( (x.n_rows > 0) && (x.n_cols > 0) )
{
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
Expand Down Expand Up @@ -3128,7 +3128,7 @@ diskio::save_coord_ascii(const SpMat< std::complex<T> >& x, std::ostream& f)
f.put('\n');
}

// make sure it's possible to figure out the matrix size later
// make sure it's possible to determine the matrix size
if( (x.n_rows > 0) && (x.n_cols > 0) )
{
const uword max_row = (x.n_rows > 0) ? x.n_rows-1 : 0;
Expand Down Expand Up @@ -4016,8 +4016,8 @@ diskio::save_hdf5_binary(const Cube<eT>& x, const hdf5_name& spec, std::string&
hid_t dataspace = H5Screate_simple(3, dims, NULL); // treat the cube as a 3d array dataspace
hid_t datatype = hdf5_misc::get_hdf5_type<eT>();

// If this returned something invalid, well, it's time to crash.
arma_check(datatype == -1, "Cube::save(): unknown datatype for HDF5");
// fail if we can't handle the datatype
if(datatype == -1) { err_msg = "unknown datatype for HDF5"; return false; }

// MATLAB forces the users to specify a name at save time for HDF5;
// Octave will use the default of 'dataset' unless otherwise specified.
Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/field_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
//! element accessor; no bounds check
template<typename oT>
arma_inline
oT&
oT&
field<oT>::operator[] (const uword in_row, const uword in_col)
{
return (*mem[in_row + in_col*n_rows]);
Expand All @@ -625,7 +625,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
//! element accessor; no bounds check
template<typename oT>
arma_inline
const oT&
const oT&
field<oT>::operator[] (const uword in_row, const uword in_col) const
{
return (*mem[in_row + in_col*n_rows]);
Expand Down
53 changes: 0 additions & 53 deletions inst/include/armadillo_bits/fn_accu.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,59 +272,6 @@ accu(const T1& X)



//! explicit handling of dot product expressed as matrix multiplication
template<typename T1, typename T2>
arma_warn_unused
inline
typename T1::elem_type
accu(const Glue<T1,T2,glue_times>& expr)
{
arma_debug_sigprint();

typedef typename T1::elem_type eT;

if( (is_cx<eT>::no) && (resolves_to_rowvector<T1>::value && resolves_to_colvector<T2>::value) )
{
arma_debug_print("accu(): dot product optimisation");

constexpr bool proxy_is_mat = (is_Mat<typename Proxy<T1>::stored_type>::value && is_Mat<typename Proxy<T2>::stored_type>::value);

constexpr bool use_at = (Proxy<T1>::use_at) || (Proxy<T2>::use_at);

constexpr bool fast_unwrap = (partial_unwrap<T1>::is_fast && partial_unwrap<T2>::is_fast);

if(proxy_is_mat || use_at || fast_unwrap)
{
const partial_unwrap<T1> UA(expr.A);
const partial_unwrap<T2> UB(expr.B);

const typename partial_unwrap<T1>::stored_type& A = UA.M;
const typename partial_unwrap<T2>::stored_type& B = UB.M;

arma_conform_assert_mul_size(A, B, UA.do_trans, UB.do_trans, "matrix multiplication");

const eT val = op_dot::direct_dot(A.n_elem, A.memptr(), B.memptr());

return (UA.do_times || UB.do_times) ? (val * UA.get_val() * UB.get_val()) : val;
}
else
{
const Proxy<T1> PA(expr.A);
const Proxy<T2> PB(expr.B);

arma_conform_assert_mul_size(PA.get_n_rows(), PA.get_n_cols(), PB.get_n_rows(), PB.get_n_cols(), "matrix multiplication");

return op_dot::apply_proxy_linear(PA,PB);
}
}

const Mat<eT> tmp(expr);

return arrayops::accumulate( tmp.memptr(), tmp.n_elem );
}



//! explicit handling of multiply-and-accumulate
template<typename T1, typename T2>
arma_warn_unused
Expand Down
Loading