Skip to content

Commit

Permalink
RcppArmadillo 14.1.99-2 with Armadillo 14.2.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
eddelbuettel committed Nov 14, 2024
1 parent 4e639e0 commit fe77912
Show file tree
Hide file tree
Showing 44 changed files with 815 additions and 137 deletions.
8 changes: 6 additions & 2 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
2024-11-07 Dirk Eddelbuettel <[email protected]>
2024-11-14 Dirk Eddelbuettel <[email protected]>

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

* inst/include/armadillo_bits/: Re-sync Armadillo 12.2.0-rc1

2024-11-07 Dirk Eddelbuettel <[email protected]>

* DESCRIPTION (Depends): Increase to Rcpp (>= 1.0.12) as it supplies
the required printf format change more current R versions need

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.1.99-1
Date: 2024-11-07
Version: 14.1.99-2
Date: 2024-11-14
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "[email protected]",
comment = c(ORCID = "0000-0001-6419-907X")),
person("Romain", "Francois", role = "aut",
Expand Down
5 changes: 4 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
\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.1.99-1 (2024-11-07)}{
\section{Changes in RcppArmadillo version 14.1.99-2 (2024-11-14)}{
\itemize{
\item Upgraded to Armadillo release 14.2.0-rc0 (Stochastic Parrot)
\itemize{
\item Faster handling of symmetric matrices by \code{inv()} and
\code{rcond()}
\item Faster handling of hermitian matrices by \code{inv()},
\code{rcond()}, \code{cond()}, \code{pinv()}, \code{rank()}
\item Added \code{solve_opts::force_sym} option to \code{solve()} to
force the use of the symmetric solver
\item More efficient handling of compound expressions by \code{solve()}
}
\item Added exporter specialisation for \code{icube} for the
\code{ARMA_64BIT_WORD} case
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/CubeToMatOp_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
arma_aligned uword aux_uword; //!< auxiliary data, uword format

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }

static constexpr bool is_row = op_type::template traits<T1>::is_row;
static constexpr bool is_col = op_type::template traits<T1>::is_col;
static constexpr bool is_xvec = op_type::template traits<T1>::is_xvec;
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Gen_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ class Gen
inline void apply_inplace_div (Mat<elem_type>& out) const;

inline void apply(subview<elem_type>& out) const;

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }
};


Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Glue_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class Glue
inline Glue(const T1& in_A, const T2& in_B, const uword in_aux_uword);
inline ~Glue();

template<typename eT2>
inline bool is_alias(const Mat<eT2>& X) const;

const T1& A; //!< first operand; must be derived from Base
const T2& B; //!< second operand; must be derived from Base
uword aux_uword; //!< storage of auxiliary data, uword format
Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Glue_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,17 @@ Glue<T1,T2,glue_type>::~Glue()



template<typename T1, typename T2, typename glue_type>
template<typename eT2>
inline
bool
Glue<T1,T2,glue_type>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

return (A.is_alias(X) || B.is_alias(X));
}



//! @}
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Mat_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,9 @@ class Mat : public Base< eT, Mat<eT> >

inline void steal_mem_col(Mat& X, const uword max_n_rows);

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const; //!< don't use this unless you're writing code internal to Armadillo


template<uword fixed_n_rows, uword fixed_n_cols> class fixed;

Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Mat_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,19 @@ Mat<eT>::steal_mem_col(Mat<eT>& x, const uword max_n_rows)



template<typename eT>
template<typename eT2>
arma_inline
bool
Mat<eT>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

return (is_same_type<eT,eT2>::yes) && (void_ptr(this) == void_ptr(&X));
}



//! construct a matrix from a given auxiliary array of eTs.
//! if copy_aux_mem is true, new memory is allocated and the array is copied.
//! if copy_aux_mem is false, the auxiliary array is used directly (without allocating memory and copying).
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/Op_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class Op
inline Op(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
inline ~Op();

template<typename eT2>
inline bool is_alias(const Mat<eT2>& X) const;

arma_aligned const T1& m; //!< the operand; must be derived from Base
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
Expand Down
13 changes: 13 additions & 0 deletions inst/include/armadillo_bits/Op_meat.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,17 @@ Op<T1, op_type>::~Op()



template<typename T1, typename op_type>
template<typename eT2>
inline
bool
Op<T1, op_type>::is_alias(const Mat<eT2>& X) const
{
arma_debug_sigprint();

return m.is_alias(X);
}



//! @}
16 changes: 8 additions & 8 deletions inst/include/armadillo_bits/Proxy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ struct Proxy< Mat<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -235,7 +235,7 @@ struct Proxy< Col<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -282,7 +282,7 @@ struct Proxy< Row<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&Q) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&Q) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down Expand Up @@ -1013,7 +1013,7 @@ struct Proxy< subview<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1060,7 +1060,7 @@ struct Proxy< subview_col<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1109,7 +1109,7 @@ struct Proxy< subview_cols<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(sv.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(sv.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return sv.check_overlap(X); }
Expand Down Expand Up @@ -1156,7 +1156,7 @@ struct Proxy< subview_row<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return Q.check_overlap(X); }
Expand Down Expand Up @@ -1304,7 +1304,7 @@ struct Proxy< diagview<eT> >
arma_inline aligned_ea_type get_aligned_ea() const { return Q; }

template<typename eT2>
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::value) ? (void_ptr(&(Q.m)) == void_ptr(&X)) : false; }
arma_inline bool is_alias(const Mat<eT2>& X) const { return (is_same_type<eT,eT2>::yes) && (void_ptr(&(Q.m)) == void_ptr(&X)); }

template<typename eT2>
arma_inline bool has_overlap(const subview<eT2>& X) const { return is_alias(X.m); }
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/SpToDGlue_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ class SpToDGlue : public Base< typename T1::elem_type, SpToDGlue<T1, T2, glue_ty
inline explicit SpToDGlue(const T1& in_A, const T2& in_B);
inline ~SpToDGlue();

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }

const T1& A; //!< first operand; must be derived from Base or SpBase
const T2& B; //!< second operand; must be derived from Base or SpBase
};
Expand Down
3 changes: 3 additions & 0 deletions inst/include/armadillo_bits/SpToDOp_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ class SpToDOp : public Base< typename T1::elem_type, SpToDOp<T1, op_type> >
inline SpToDOp(const T1& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b);
inline ~SpToDOp();

template<typename eT2>
constexpr bool is_alias(const Mat<eT2>&) const { return false; }

arma_aligned const T1& m; //!< the operand; must be derived from SpBase
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
Expand Down
2 changes: 2 additions & 0 deletions inst/include/armadillo_bits/arma_forward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ class op_diagmat;
class op_trimat;
class op_vectorise_row;
class op_vectorise_col;
class op_symmatu;
class op_symmatl;

class op_row_as_mat;
class op_col_as_mat;
Expand Down
4 changes: 2 additions & 2 deletions inst/include/armadillo_bits/arma_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@

#define ARMA_VERSION_MAJOR 14
#define ARMA_VERSION_MINOR 1
#define ARMA_VERSION_PATCH 90
#define ARMA_VERSION_NAME "unstable"
#define ARMA_VERSION_PATCH 91
#define ARMA_VERSION_NAME "14.2-RC1"



Expand Down
14 changes: 14 additions & 0 deletions inst/include/armadillo_bits/auxlib_bones.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,20 @@ class auxlib

//

template<typename T1>
inline static bool solve_sym_fast(Mat<typename T1::pod_type>& out, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);

template<typename T1>
inline static bool solve_sym_fast(Mat< std::complex<typename T1::pod_type> >& out, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>, T1 >& B_expr);

template<typename T1>
inline static bool solve_sym_rcond(Mat<typename T1::pod_type>& out, typename T1::pod_type& out_rcond, Mat<typename T1::pod_type>& A, const Base<typename T1::pod_type,T1>& B_expr);

template<typename T1>
inline static bool solve_sym_rcond(Mat< std::complex<typename T1::pod_type> >& out, typename T1::pod_type& out_rcond, Mat< std::complex<typename T1::pod_type> >& A, const Base< std::complex<typename T1::pod_type>,T1>& B_expr);

//

template<typename T1>
inline static bool solve_sympd_fast(Mat<typename T1::elem_type>& out, Mat<typename T1::elem_type>& A, const Base<typename T1::elem_type,T1>& B_expr);

Expand Down
Loading

0 comments on commit fe77912

Please sign in to comment.