Skip to content

Commit 37de525

Browse files
committed
Armadillo 14.0.2
1 parent 01cd96a commit 37de525

19 files changed

+57
-127
lines changed

inst/include/armadillo

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include <cmath>
3636
#include <ctime>
3737

38+
#include <memory>
3839
#include <iostream>
3940
#include <fstream>
4041
#include <sstream>
@@ -52,7 +53,7 @@
5253
#include <chrono>
5354
#include <atomic>
5455

55-
#if !defined(ARMA_DONT_USE_STD_MUTEX)
56+
#if defined(ARMA_USE_STD_MUTEX)
5657
#include <mutex>
5758
#endif
5859

inst/include/armadillo_bits/Cube_meat.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3562,7 +3562,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
35623562
//! element accessor; no bounds check
35633563
template<typename eT>
35643564
arma_inline
3565-
eT&
3565+
eT&
35663566
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice)
35673567
{
35683568
return access::rw( mem[in_slice*n_elem_slice + in_col*n_rows + in_row] );
@@ -3573,7 +3573,7 @@ Cube<eT>::operator() (const uword in_row, const uword in_col, const uword in_sli
35733573
//! element accessor; no bounds check
35743574
template<typename eT>
35753575
arma_inline
3576-
const eT&
3576+
const eT&
35773577
Cube<eT>::operator[] (const uword in_row, const uword in_col, const uword in_slice) const
35783578
{
35793579
return mem[in_slice*n_elem_slice + in_col*n_rows + in_row];

inst/include/armadillo_bits/Mat_meat.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6500,7 +6500,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
65006500
//! element accessor; no bounds check
65016501
template<typename eT>
65026502
arma_inline
6503-
eT&
6503+
eT&
65046504
Mat<eT>::operator[] (const uword in_row, const uword in_col)
65056505
{
65066506
return access::rw( mem[in_row + in_col*n_rows] );
@@ -6511,7 +6511,7 @@ Mat<eT>::at(const uword in_row, const uword in_col) const
65116511
//! element accessor; no bounds check
65126512
template<typename eT>
65136513
arma_inline
6514-
const eT&
6514+
const eT&
65156515
Mat<eT>::operator[] (const uword in_row, const uword in_col) const
65166516
{
65176517
return mem[in_row + in_col*n_rows];

inst/include/armadillo_bits/Proxy.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -795,7 +795,7 @@ struct Proxy< CubeToMatOp<T1, op_vectorise_cube_col> >
795795

796796
static constexpr bool use_at = false;
797797
static constexpr bool use_mp = false;
798-
static constexpr bool has_subview = false;
798+
static constexpr bool has_subview = true;
799799

800800
static constexpr bool is_row = false;
801801
static constexpr bool is_col = true;
@@ -891,7 +891,7 @@ struct Proxy< SpToDOp<SpMat<eT>, op_sp_nonzeros> >
891891

892892
static constexpr bool use_at = false;
893893
static constexpr bool use_mp = false;
894-
static constexpr bool has_subview = false;
894+
static constexpr bool has_subview = true;
895895

896896
static constexpr bool is_row = false;
897897
static constexpr bool is_col = true;

inst/include/armadillo_bits/SpMat_meat.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3374,7 +3374,7 @@ SpMat<eT>::operator()(const uword i) const
33743374

33753375
template<typename eT>
33763376
arma_inline
3377-
SpMat_MapMat_val<eT>
3377+
SpMat_MapMat_val<eT>
33783378
SpMat<eT>::operator[] (const uword in_row, const uword in_col)
33793379
{
33803380
return SpMat_MapMat_val<eT>((*this), cache, in_row, in_col);
@@ -3384,7 +3384,7 @@ SpMat<eT>::operator()(const uword i) const
33843384

33853385
template<typename eT>
33863386
arma_inline
3387-
eT
3387+
eT
33883388
SpMat<eT>::operator[] (const uword in_row, const uword in_col) const
33893389
{
33903390
return get_value(in_row, in_col);

inst/include/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 14
2525
#define ARMA_VERSION_MINOR 0
26-
#define ARMA_VERSION_PATCH 0
26+
#define ARMA_VERSION_PATCH 2
2727
#define ARMA_VERSION_NAME "Stochastic Parrot"
2828

2929

inst/include/armadillo_bits/compiler_setup.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,6 @@
304304
#endif
305305

306306
#undef ARMA_HAVE_GCC_ASSUME_ALIGNED
307-
#undef ARMA_HAVE_ICC_ASSUME_ALIGNED
308-
#define ARMA_HAVE_ICC_ASSUME_ALIGNED
309307

310308
#endif
311309

inst/include/armadillo_bits/config.hpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -349,18 +349,6 @@
349349
#define ARMA_WARN_LEVEL 3
350350
#endif
351351

352-
#if defined(ARMA_DONT_PRINT_ERRORS)
353-
#pragma message ("INFO: support for ARMA_DONT_PRINT_ERRORS option has been removed")
354-
355-
#if defined(ARMA_PRINT_EXCEPTIONS)
356-
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL and ARMA_DONT_PRINT_EXCEPTIONS options instead")
357-
#else
358-
#pragma message ("INFO: suggest to use ARMA_WARN_LEVEL option instead")
359-
#endif
360-
361-
#pragma message ("INFO: see the documentation for details")
362-
#endif
363-
364352
#if defined(ARMA_DONT_PRINT_EXCEPTIONS)
365353
#undef ARMA_PRINT_EXCEPTIONS
366354
#endif

inst/include/armadillo_bits/diskio_meat.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ diskio::save_coord_ascii(const Mat<eT>& x, std::ostream& f)
10621062
f.put('\n');
10631063
}
10641064

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

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

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

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

30673067

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

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

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

40224022
// MATLAB forces the users to specify a name at save time for HDF5;
40234023
// Octave will use the default of 'dataset' unless otherwise specified.

inst/include/armadillo_bits/field_meat.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
614614
//! element accessor; no bounds check
615615
template<typename oT>
616616
arma_inline
617-
oT&
617+
oT&
618618
field<oT>::operator[] (const uword in_row, const uword in_col)
619619
{
620620
return (*mem[in_row + in_col*n_rows]);
@@ -625,7 +625,7 @@ field<oT>::operator() (const uword in_row, const uword in_col, const uword in_sl
625625
//! element accessor; no bounds check
626626
template<typename oT>
627627
arma_inline
628-
const oT&
628+
const oT&
629629
field<oT>::operator[] (const uword in_row, const uword in_col) const
630630
{
631631
return (*mem[in_row + in_col*n_rows]);

0 commit comments

Comments
 (0)