Skip to content

Commit db2ae07

Browse files
committed
Armadillo 15.0.1
1 parent b483312 commit db2ae07

File tree

5 files changed

+89
-47
lines changed

5 files changed

+89
-47
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-08-22 Dirk Eddelbuettel <[email protected]>
2+
3+
* inst/include/current/: Armadillo 15.0.1
4+
15
2025-08-21 Dirk Eddelbuettel <[email protected]>
26

37
* DESCRIPTION (Version, Date): RcppArmadillo 15.0.0-1

inst/include/current/armadillo_bits/arma_version.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#define ARMA_VERSION_MAJOR 15
2525
#define ARMA_VERSION_MINOR 0
26-
#define ARMA_VERSION_PATCH 0
26+
#define ARMA_VERSION_PATCH 1
2727
#define ARMA_VERSION_NAME "Medium Roast"
2828

2929

inst/include/current/armadillo_bits/fn_repmat.hpp

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,34 @@ repcube(const BaseCube<typename T1::elem_type,T1>& A, const uword r, const uword
6161

6262

6363

64+
template<typename T1>
65+
arma_warn_unused
66+
inline
67+
Cube<typename T1::elem_type>
68+
repcube(const Base<typename T1::elem_type,T1>& A, const uword copies_per_row, const uword copies_per_col, const uword copies_per_slice)
69+
{
70+
arma_debug_sigprint();
71+
72+
typedef typename T1::elem_type eT;
73+
74+
const Mat<eT> B = arma::repmat(A.get_ref(), copies_per_row, copies_per_col);
75+
76+
const eT* B_mem = B.memptr();
77+
const uword B_n_elem = B.n_elem;
78+
79+
Cube<eT> out(B.n_rows, B.n_cols, copies_per_slice);
80+
81+
if( (B_n_elem > 0) && (out.n_elem > 0) )
82+
{
83+
for(uword s=0; s < copies_per_slice; ++s)
84+
{
85+
arrayops::copy(out.slice_memptr(s), B_mem, B_n_elem);
86+
}
87+
}
88+
89+
return out;
90+
}
91+
92+
93+
6494
//! @}

inst/include/current/armadillo_bits/op_dot_bones.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ struct op_dot
3030
typename arma_not_cx<eT>::result
3131
direct_dot_generic(const uword n_elem, const eT* const A, const eT* const B);
3232

33-
template<typename eT>
34-
arma_hot inline static
35-
typename arma_not_cx<eT>::result
36-
direct_dot_generic_force_optimise(const uword n_elem, const eT* const A, const eT* const B);
33+
// template<typename eT>
34+
// arma_hot inline static
35+
// typename arma_not_cx<eT>::result
36+
// direct_dot_generic_force_optimise(const uword n_elem, const eT* const A, const eT* const B);
3737

3838
template<typename eT>
3939
arma_hot inline static

inst/include/current/armadillo_bits/op_dot_meat.hpp

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -62,47 +62,53 @@ op_dot::direct_dot_generic(const uword n_elem, const eT* const A, const eT* cons
6262

6363

6464

65-
//! generic version for non-complex values with forced optimisation under GCC
66-
template<typename eT>
67-
#if defined(ARMA_REAL_GCC) && !defined(ARMA_DONT_FORCE_OPTIMISE_DOT)
68-
__attribute__((optimize("O3", "fast-math")))
69-
#endif
70-
inline
71-
typename arma_not_cx<eT>::result
72-
op_dot::direct_dot_generic_force_optimise(const uword n_elem, const eT* const A, const eT* const B)
73-
{
74-
arma_debug_sigprint();
75-
76-
#if defined(__FAST_MATH__)
77-
{
78-
eT val = eT(0);
79-
80-
for(uword i=0; i < n_elem; ++i) { val += (A[i] * B[i]); }
81-
82-
return val;
83-
}
84-
#else
85-
{
86-
eT val1 = eT(0);
87-
eT val2 = eT(0);
88-
89-
uword i, j;
90-
91-
for(i=0, j=1; j < n_elem; i+=2, j+=2)
92-
{
93-
val1 += (A[i] * B[i]);
94-
val2 += (A[j] * B[j]);
95-
}
96-
97-
if(i < n_elem)
98-
{
99-
val1 += (A[i] * B[i]);
100-
}
101-
102-
return (val1 + val2);
103-
}
104-
#endif
105-
}
65+
// //! generic version for non-complex values with forced SIMD optimisation under OpenMP
66+
// template<typename eT>
67+
// inline
68+
// typename arma_not_cx<eT>::result
69+
// op_dot::direct_dot_generic_force_optimise(const uword n_elem, const eT* const A, const eT* const B)
70+
// {
71+
// arma_debug_sigprint();
72+
//
73+
// #if defined(ARMA_USE_OPENMP)
74+
// {
75+
// eT val = eT(0);
76+
//
77+
// #pragma omp simd
78+
// for(uword i=0; i < n_elem; ++i) { val += (A[i] * B[i]); }
79+
//
80+
// return val;
81+
// }
82+
// #elif defined(__FAST_MATH__)
83+
// {
84+
// eT val = eT(0);
85+
//
86+
// for(uword i=0; i < n_elem; ++i) { val += (A[i] * B[i]); }
87+
//
88+
// return val;
89+
// }
90+
// #else
91+
// {
92+
// eT val1 = eT(0);
93+
// eT val2 = eT(0);
94+
//
95+
// uword i, j;
96+
//
97+
// for(i=0, j=1; j < n_elem; i+=2, j+=2)
98+
// {
99+
// val1 += (A[i] * B[i]);
100+
// val2 += (A[j] * B[j]);
101+
// }
102+
//
103+
// if(i < n_elem)
104+
// {
105+
// val1 += (A[i] * B[i]);
106+
// }
107+
//
108+
// return (val1 + val2);
109+
// }
110+
// #endif
111+
// }
106112

107113

108114

@@ -209,7 +215,9 @@ op_dot::direct_dot(const uword n_elem, const eT* const A, const eT* const B)
209215
{
210216
arma_debug_sigprint();
211217

212-
return (n_elem <= 32u) ? op_dot::direct_dot_generic(n_elem, A, B) : op_dot::direct_dot_generic_force_optimise(n_elem, A, B);
218+
// return (n_elem <= 32u) ? op_dot::direct_dot_generic(n_elem, A, B) : op_dot::direct_dot_generic_force_optimise(n_elem, A, B);
219+
220+
return op_dot::direct_dot_generic(n_elem, A, B);
213221
}
214222

215223

0 commit comments

Comments
 (0)