Skip to content

Commit 09c970e

Browse files
authored
Merge pull request #461 from RcppCore/feature/arma_14_4_x
Armadillo 14 4.0
2 parents dea7838 + 5db4dcb commit 09c970e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1926
-2014
lines changed

ChangeLog

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,26 @@
1+
2025-02-15 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/armadillo_bits/: Sync again with updated sources for
4+
Armadillo 14.3.92 as an RC for 14.4.*
5+
6+
2025-02-13 Dirk Eddelbuettel <[email protected]>
7+
8+
* inst/include/armadillo_bits/: Sync again with updated sources for
9+
Armadillo 14.3.91 as a RC for 14.4.*
10+
111
2025-02-11 Dirk Eddelbuettel <[email protected]>
212

13+
* inst/include/armadillo_bits/: Sync again with updated sources for
14+
Armadillo 14.3.90 as a RC for 14.4.*
15+
316
* R/RcppArmadillo.package.skeleton.R: Generalise helper function to
417
support additional DESCRIPTION fields
518
* man/RcppArmadillo.package.skeleton.Rd: Document
619

20+
2025-02-10 Dirk Eddelbuettel <[email protected]>
21+
22+
* inst/include/armadillo_bits/: Armadillo 14.3.90 as a RC for 14.4.*
23+
724
2025-02-05 Dirk Eddelbuettel <[email protected]>
825

926
* DESCRIPTION (Version, Date): RcppArmadillo 14.2.3-1

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: 14.2.3-1
5-
Date: 2025-02-05
4+
Version: 14.3.92-1
5+
Date: 2025-02-15
66
Authors@R: c(person("Dirk", "Eddelbuettel", role = c("aut", "cre"), email = "[email protected]",
77
comment = c(ORCID = "0000-0001-6419-907X")),
88
person("Romain", "Francois", role = "aut",

inst/include/armadillo_bits/CubeToMatOp_bones.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ class CubeToMatOp : public Base< typename T1::elem_type, CubeToMatOp<T1, op_type
3333
inline CubeToMatOp(const T1& in_m, const uword in_aux_uword);
3434
inline ~CubeToMatOp();
3535

36-
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
37-
arma_aligned uword aux_uword; //!< auxiliary data, uword format
36+
const T1& m; //!< the operand; must be derived from BaseCube
37+
uword aux_uword; //!< auxiliary data, uword format
3838

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

inst/include/armadillo_bits/Cube_meat.hpp

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2868,6 +2868,14 @@ Cube<eT>::Cube(const eOpCube<T1, eop_type>& X)
28682868

28692869
init_cold();
28702870

2871+
if(is_same_type<eop_type, eop_pow>::value)
2872+
{
2873+
constexpr bool eT_non_int = is_non_integral<eT>::value;
2874+
2875+
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return; }
2876+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return; }
2877+
}
2878+
28712879
eop_type::apply(*this, X);
28722880
}
28732881

@@ -2890,6 +2898,14 @@ Cube<eT>::operator=(const eOpCube<T1, eop_type>& X)
28902898

28912899
init_warm(X.get_n_rows(), X.get_n_cols(), X.get_n_slices());
28922900

2901+
if(is_same_type<eop_type, eop_pow>::value)
2902+
{
2903+
constexpr bool eT_non_int = is_non_integral<eT>::value;
2904+
2905+
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
2906+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
2907+
}
2908+
28932909
eop_type::apply(*this, X);
28942910

28952911
return *this;
@@ -2912,6 +2928,14 @@ Cube<eT>::operator+=(const eOpCube<T1, eop_type>& X)
29122928

29132929
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator+=(tmp); }
29142930

2931+
if(is_same_type<eop_type, eop_pow>::value)
2932+
{
2933+
constexpr bool eT_non_int = is_non_integral<eT>::value;
2934+
2935+
if( X.aux == eT(2) ) { eop_square::apply_inplace_plus(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
2936+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
2937+
}
2938+
29152939
eop_type::apply_inplace_plus(*this, X);
29162940

29172941
return *this;
@@ -2934,6 +2958,14 @@ Cube<eT>::operator-=(const eOpCube<T1, eop_type>& X)
29342958

29352959
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator-=(tmp); }
29362960

2961+
if(is_same_type<eop_type, eop_pow>::value)
2962+
{
2963+
constexpr bool eT_non_int = is_non_integral<eT>::value;
2964+
2965+
if( X.aux == eT(2) ) { eop_square::apply_inplace_minus(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
2966+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
2967+
}
2968+
29372969
eop_type::apply_inplace_minus(*this, X);
29382970

29392971
return *this;
@@ -2956,6 +2988,14 @@ Cube<eT>::operator%=(const eOpCube<T1, eop_type>& X)
29562988

29572989
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator%=(tmp); }
29582990

2991+
if(is_same_type<eop_type, eop_pow>::value)
2992+
{
2993+
constexpr bool eT_non_int = is_non_integral<eT>::value;
2994+
2995+
if( X.aux == eT(2) ) { eop_square::apply_inplace_schur(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
2996+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_schur(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
2997+
}
2998+
29592999
eop_type::apply_inplace_schur(*this, X);
29603000

29613001
return *this;
@@ -2978,6 +3018,14 @@ Cube<eT>::operator/=(const eOpCube<T1, eop_type>& X)
29783018

29793019
if(bad_alias) { const Cube<eT> tmp(X); return (*this).operator/=(tmp); }
29803020

3021+
if(is_same_type<eop_type, eop_pow>::value)
3022+
{
3023+
constexpr bool eT_non_int = is_non_integral<eT>::value;
3024+
3025+
if( X.aux == eT(2) ) { eop_square::apply_inplace_div(*this, reinterpret_cast< const eOpCube<T1, eop_square>& >(X)); return *this; }
3026+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_div(*this, reinterpret_cast< const eOpCube<T1, eop_sqrt >& >(X)); return *this; }
3027+
}
3028+
29813029
eop_type::apply_inplace_div(*this, X);
29823030

29833031
return *this;

inst/include/armadillo_bits/GenCube_bones.hpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ class GenCube
3333
static constexpr bool use_at = false;
3434
static constexpr bool is_simple = (is_same_type<gen_type, gen_ones>::value) || (is_same_type<gen_type, gen_zeros>::value);
3535

36-
arma_aligned const uword n_rows;
37-
arma_aligned const uword n_cols;
38-
arma_aligned const uword n_slices;
36+
const uword n_rows;
37+
const uword n_cols;
38+
const uword n_slices;
3939

4040
arma_inline GenCube(const uword in_n_rows, const uword in_n_cols, const uword in_n_slices);
4141
arma_inline ~GenCube();

inst/include/armadillo_bits/Gen_bones.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ class Gen
3737
static constexpr bool is_col = T1::is_col;
3838
static constexpr bool is_xvec = T1::is_xvec;
3939

40-
arma_aligned const uword n_rows;
41-
arma_aligned const uword n_cols;
40+
const uword n_rows;
41+
const uword n_cols;
4242

4343
arma_inline Gen(const uword in_n_rows, const uword in_n_cols);
4444
arma_inline ~Gen();

inst/include/armadillo_bits/Mat_meat.hpp

Lines changed: 56 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -474,9 +474,9 @@ Mat<eT>::Mat(const char* text)
474474

475475
init( std::string(text) );
476476
}
477-
478-
479-
477+
478+
479+
480480
//! create the matrix from a textual description
481481
template<typename eT>
482482
inline
@@ -489,8 +489,8 @@ Mat<eT>::operator=(const char* text)
489489

490490
return *this;
491491
}
492-
493-
492+
493+
494494

495495
//! create the matrix from a textual description
496496
template<typename eT>
@@ -508,9 +508,9 @@ Mat<eT>::Mat(const std::string& text)
508508

509509
init(text);
510510
}
511-
512-
513-
511+
512+
513+
514514
//! create the matrix from a textual description
515515
template<typename eT>
516516
inline
@@ -5185,6 +5185,14 @@ Mat<eT>::Mat(const eOp<T1, eop_type>& X)
51855185

51865186
init_cold();
51875187

5188+
if(is_same_type<eop_type, eop_pow>::value)
5189+
{
5190+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5191+
5192+
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return; }
5193+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return; }
5194+
}
5195+
51885196
eop_type::apply(*this, X);
51895197
}
51905198

@@ -5207,6 +5215,14 @@ Mat<eT>::operator=(const eOp<T1, eop_type>& X)
52075215

52085216
init_warm(X.get_n_rows(), X.get_n_cols());
52095217

5218+
if(is_same_type<eop_type, eop_pow>::value)
5219+
{
5220+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5221+
5222+
if( X.aux == eT(2) ) { eop_square::apply(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
5223+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
5224+
}
5225+
52105226
eop_type::apply(*this, X);
52115227

52125228
return *this;
@@ -5228,6 +5244,14 @@ Mat<eT>::operator+=(const eOp<T1, eop_type>& X)
52285244

52295245
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator+=(tmp); }
52305246

5247+
if(is_same_type<eop_type, eop_pow>::value)
5248+
{
5249+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5250+
5251+
if( X.aux == eT(2) ) { eop_square::apply_inplace_plus(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
5252+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_plus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
5253+
}
5254+
52315255
eop_type::apply_inplace_plus(*this, X);
52325256

52335257
return *this;
@@ -5249,6 +5273,14 @@ Mat<eT>::operator-=(const eOp<T1, eop_type>& X)
52495273

52505274
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator-=(tmp); }
52515275

5276+
if(is_same_type<eop_type, eop_pow>::value)
5277+
{
5278+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5279+
5280+
if( X.aux == eT(2) ) { eop_square::apply_inplace_minus(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
5281+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_minus(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
5282+
}
5283+
52525284
eop_type::apply_inplace_minus(*this, X);
52535285

52545286
return *this;
@@ -5287,6 +5319,14 @@ Mat<eT>::operator%=(const eOp<T1, eop_type>& X)
52875319

52885320
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator%=(tmp); }
52895321

5322+
if(is_same_type<eop_type, eop_pow>::value)
5323+
{
5324+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5325+
5326+
if( X.aux == eT(2) ) { eop_square::apply_inplace_schur(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
5327+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_schur(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
5328+
}
5329+
52905330
eop_type::apply_inplace_schur(*this, X);
52915331

52925332
return *this;
@@ -5308,6 +5348,14 @@ Mat<eT>::operator/=(const eOp<T1, eop_type>& X)
53085348

53095349
if(bad_alias) { const Mat<eT> tmp(X); return (*this).operator/=(tmp); }
53105350

5351+
if(is_same_type<eop_type, eop_pow>::value)
5352+
{
5353+
constexpr bool eT_non_int = is_non_integral<eT>::value;
5354+
5355+
if( X.aux == eT(2) ) { eop_square::apply_inplace_div(*this, reinterpret_cast< const eOp<T1, eop_square>& >(X)); return *this; }
5356+
if(eT_non_int && (X.aux == eT(0.5))) { eop_sqrt::apply_inplace_div(*this, reinterpret_cast< const eOp<T1, eop_sqrt >& >(X)); return *this; }
5357+
}
5358+
53115359
eop_type::apply_inplace_div(*this, X);
53125360

53135361
return *this;

inst/include/armadillo_bits/OpCube_bones.hpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ class OpCube : public BaseCube< typename T1::elem_type, OpCube<T1, op_type> >
3535
inline OpCube(const BaseCube<typename T1::elem_type, T1>& in_m, const uword in_aux_uword_a, const uword in_aux_uword_b, const uword in_aux_uword_c);
3636
inline ~OpCube();
3737

38-
arma_aligned const T1& m; //!< the operand; must be derived from BaseCube
39-
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
40-
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
41-
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
42-
arma_aligned uword aux_uword_c; //!< auxiliary data, uword format
38+
const T1& m; //!< the operand; must be derived from BaseCube
39+
elem_type aux; //!< auxiliary data, using the element type as used by T1
40+
uword aux_uword_a; //!< auxiliary data, uword format
41+
uword aux_uword_b; //!< auxiliary data, uword format
42+
uword aux_uword_c; //!< auxiliary data, uword format
4343
};
4444

4545

inst/include/armadillo_bits/Op_bones.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ class Op
6161
template<typename eT2>
6262
inline bool is_alias(const Mat<eT2>& X) const;
6363

64-
arma_aligned const T1& m; //!< the operand; must be derived from Base
65-
arma_aligned elem_type aux; //!< auxiliary data, using the element type as used by T1
66-
arma_aligned uword aux_uword_a; //!< auxiliary data, uword format
67-
arma_aligned uword aux_uword_b; //!< auxiliary data, uword format
64+
const T1& m; //!< the operand; must be derived from Base
65+
elem_type aux; //!< auxiliary data, using the element type as used by T1
66+
uword aux_uword_a; //!< auxiliary data, uword format
67+
uword aux_uword_b; //!< auxiliary data, uword format
6868
};
6969

7070

0 commit comments

Comments
 (0)