Skip to content

Commit 6a0905e

Browse files
committed
Armadillo 15.0.0 "Medium Roast"
1 parent a6afc00 commit 6a0905e

29 files changed

+487
-891
lines changed

inst/include/current/armadillo

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ namespace arma
302302
#include "armadillo_bits/op_flip_bones.hpp"
303303
#include "armadillo_bits/op_reverse_bones.hpp"
304304
#include "armadillo_bits/op_princomp_bones.hpp"
305-
#include "armadillo_bits/op_misc_bones.hpp"
305+
#include "armadillo_bits/op_elem_bones.hpp"
306306
#include "armadillo_bits/op_orth_null_bones.hpp"
307307
#include "armadillo_bits/op_relational_bones.hpp"
308308
#include "armadillo_bits/op_find_bones.hpp"
@@ -549,7 +549,6 @@ namespace arma
549549
#include "armadillo_bits/fn_circshift.hpp"
550550
#include "armadillo_bits/fn_shuffle.hpp"
551551
#include "armadillo_bits/fn_prod.hpp"
552-
#include "armadillo_bits/fn_eps.hpp"
553552
#include "armadillo_bits/fn_pinv.hpp"
554553
#include "armadillo_bits/fn_rank.hpp"
555554
#include "armadillo_bits/fn_kron.hpp"
@@ -761,7 +760,7 @@ namespace arma
761760
#include "armadillo_bits/op_flip_meat.hpp"
762761
#include "armadillo_bits/op_reverse_meat.hpp"
763762
#include "armadillo_bits/op_princomp_meat.hpp"
764-
#include "armadillo_bits/op_misc_meat.hpp"
763+
#include "armadillo_bits/op_elem_meat.hpp"
765764
#include "armadillo_bits/op_orth_null_meat.hpp"
766765
#include "armadillo_bits/op_relational_meat.hpp"
767766
#include "armadillo_bits/op_find_meat.hpp"

inst/include/current/armadillo_bits/arma_version.hpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// SPDX-License-Identifier: Apache-2.0
2-
//
2+
//
33
// Copyright 2008-2016 Conrad Sanderson (https://conradsanderson.id.au)
44
// Copyright 2008-2016 National ICT Australia (NICTA)
5-
//
5+
//
66
// Licensed under the Apache License, Version 2.0 (the "License");
77
// you may not use this file except in compliance with the License.
88
// You may obtain a copy of the License at
99
// https://www.apache.org/licenses/LICENSE-2.0
10-
//
10+
//
1111
// Unless required by applicable law or agreed to in writing, software
1212
// distributed under the License is distributed on an "AS IS" BASIS,
1313
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -21,10 +21,10 @@
2121

2222

2323

24-
#define ARMA_VERSION_MAJOR 14
25-
#define ARMA_VERSION_MINOR 6
26-
#define ARMA_VERSION_PATCH 3
27-
#define ARMA_VERSION_NAME "Caffe Mocha"
24+
#define ARMA_VERSION_MAJOR 15
25+
#define ARMA_VERSION_MINOR 0
26+
#define ARMA_VERSION_PATCH 0
27+
#define ARMA_VERSION_NAME "Medium Roast"
2828

2929

3030

@@ -33,16 +33,16 @@ struct arma_version
3333
static constexpr unsigned int major = ARMA_VERSION_MAJOR;
3434
static constexpr unsigned int minor = ARMA_VERSION_MINOR;
3535
static constexpr unsigned int patch = ARMA_VERSION_PATCH;
36-
36+
3737
static
3838
inline
3939
std::string
4040
as_string()
4141
{
4242
const char* nickname = ARMA_VERSION_NAME;
43-
43+
4444
std::ostringstream ss;
45-
45+
4646
ss << arma_version::major
4747
<< '.'
4848
<< arma_version::minor
@@ -51,7 +51,7 @@ struct arma_version
5151
<< " ("
5252
<< nickname
5353
<< ')';
54-
54+
5555
return ss.str();
5656
}
5757
};

inst/include/current/armadillo_bits/cond_rel_bones.hpp

Lines changed: 0 additions & 42 deletions
This file was deleted.

inst/include/current/armadillo_bits/cond_rel_meat.hpp

Lines changed: 0 additions & 134 deletions
This file was deleted.

inst/include/current/armadillo_bits/config.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
#define ARMA_OPTIMISE_SYM
164164
//// Comment out the above line to disable optimised handling
165165
//// of symmetric/hermitian matrices by various functions:
166-
//// solve(), inv(), pinv(), expmat(), logmat(), sqrtmat(), rcond(), rank()
166+
//// solve(), inv(), pinv(), expmat(), logmat(), sqrtmat(), powmat(), rank(), cond(), rcond()
167167
#endif
168168

169169
#if !defined(ARMA_OPTIMISE_INVEXPR)

inst/include/current/armadillo_bits/debug.hpp

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1330,6 +1330,47 @@ arma_assert_atlas_size(const T1& A, const T2& B)
13301330

13311331

13321332

1333+
template<typename eT>
1334+
inline
1335+
void
1336+
arma_elem_type_string(std::string& out)
1337+
{
1338+
if( is_u8<eT>::value) { out = "u8"; }
1339+
else if( is_s8<eT>::value) { out = "s8"; }
1340+
else if( is_u16<eT>::value) { out = "u16"; }
1341+
else if( is_s16<eT>::value) { out = "s16"; }
1342+
else if( is_u32<eT>::value) { out = "u32"; }
1343+
else if( is_s32<eT>::value) { out = "s32"; }
1344+
else if( is_u64<eT>::value) { out = "u64"; }
1345+
else if( is_s64<eT>::value) { out = "s64"; }
1346+
else if( is_ulng_t<eT>::value) { out = "ulng_t"; }
1347+
else if( is_slng_t<eT>::value) { out = "slng_t"; }
1348+
else if( is_float<eT>::value) { out = "float"; }
1349+
else if( is_double<eT>::value) { out = "double"; }
1350+
else if( is_cx_float<eT>::value) { out = "cx_float"; }
1351+
else if(is_cx_double<eT>::value) { out = "cx_double"; }
1352+
else if( is_fp16<eT>::value) { out = "fp16"; }
1353+
else if( is_cx_fp16<eT>::value) { out = "cx_fp16"; }
1354+
else { out = "unknown"; }
1355+
}
1356+
1357+
1358+
1359+
template<typename eT>
1360+
arma_cold
1361+
inline
1362+
void
1363+
arma_type_print(const char* header)
1364+
{
1365+
std::string elem_type_str;
1366+
1367+
arma_elem_type_string<eT>(elem_type_str);
1368+
1369+
get_cerr_stream() << header << ": " << elem_type_str << std::endl;
1370+
}
1371+
1372+
1373+
13331374
//
13341375
// macros
13351376

@@ -1372,6 +1413,7 @@ arma_assert_atlas_size(const T1& A, const T2& B)
13721413
#define arma_debug_sigprint arma_sigprint(ARMA_FNSIG); arma_bktprint
13731414
#define arma_debug_sigprint_this arma_sigprint(ARMA_FNSIG); arma_thisprint
13741415
#define arma_debug_print arma_print
1416+
#define arma_debug_type_print arma_type_print
13751417

13761418
// for compatibility with earlier versions of Armadillo
13771419
#define arma_extra_debug_sigprint arma_sigprint(ARMA_FNSIG); arma_bktprint
@@ -1383,6 +1425,7 @@ arma_assert_atlas_size(const T1& A, const T2& B)
13831425
#define arma_debug_sigprint true ? (void)0 : arma_bktprint
13841426
#define arma_debug_sigprint_this true ? (void)0 : arma_thisprint
13851427
#define arma_debug_print true ? (void)0 : arma_print
1428+
#define arma_debug_type_print true ? (void)0 : arma_type_print
13861429

13871430
// for compatibility with earlier versions of Armadillo
13881431
#define arma_extra_debug_sigprint true ? (void)0 : arma_bktprint

inst/include/current/armadillo_bits/eop_aux.hpp

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -136,55 +136,6 @@ struct eop_aux
136136

137137
template<typename T1, typename T2> arma_inline static typename arma_integral_only<T1>::result pow (const T1 base, const T2 exponent) { return T1( std::pow( double(base), double(exponent) ) ); }
138138
template<typename T1, typename T2> arma_inline static typename arma_real_or_cx_only<T1>::result pow (const T1 base, const T2 exponent) { return T1( std::pow( base, exponent ) ); }
139-
140-
141-
template<typename eT>
142-
arma_inline
143-
static
144-
typename arma_integral_only<eT>::result
145-
direct_eps(const eT)
146-
{
147-
return eT(0);
148-
}
149-
150-
151-
template<typename eT>
152-
inline
153-
static
154-
typename arma_real_only<eT>::result
155-
direct_eps(const eT x)
156-
{
157-
//arma_debug_sigprint();
158-
159-
// according to IEEE Standard for Floating-Point Arithmetic (IEEE 754)
160-
// the mantissa length for double is 53 bits = std::numeric_limits<double>::digits
161-
// the mantissa length for float is 24 bits = std::numeric_limits<float >::digits
162-
163-
//return std::pow( std::numeric_limits<eT>::radix, (std::floor(std::log10(std::abs(x))/std::log10(std::numeric_limits<eT>::radix))-(std::numeric_limits<eT>::digits-1)) );
164-
165-
const eT radix_eT = eT(std::numeric_limits<eT>::radix);
166-
const eT digits_m1_eT = eT(std::numeric_limits<eT>::digits - 1);
167-
168-
// return std::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std::log10(radix_eT)) - digits_m1_eT) );
169-
return eop_aux::pow( radix_eT, eT(std::floor(std::log10(std::abs(x))/std::log10(radix_eT)) - digits_m1_eT) );
170-
}
171-
172-
173-
template<typename T>
174-
inline
175-
static
176-
typename arma_real_only<T>::result
177-
direct_eps(const std::complex<T>& x)
178-
{
179-
//arma_debug_sigprint();
180-
181-
//return std::pow( std::numeric_limits<T>::radix, (std::floor(std::log10(std::abs(x))/std::log10(std::numeric_limits<T>::radix))-(std::numeric_limits<T>::digits-1)) );
182-
183-
const T radix_T = T(std::numeric_limits<T>::radix);
184-
const T digits_m1_T = T(std::numeric_limits<T>::digits - 1);
185-
186-
return std::pow( radix_T, T(std::floor(std::log10(std::abs(x))/std::log10(radix_T)) - digits_m1_T) );
187-
}
188139
};
189140

190141

0 commit comments

Comments
 (0)