Skip to content

Commit 35213a5

Browse files
committed
Re-synced with Armadillo 14.90.0
1 parent fa9d6ba commit 35213a5

34 files changed

+344
-232
lines changed

inst/include/current/armadillo_bits/Base_bones.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,11 @@ struct Base
127127
arma_warn_unused inline elem_type min() const;
128128
arma_warn_unused inline elem_type max() const;
129129

130-
arma_frown("use .index_min() instead") inline elem_type min(uword& index_of_min_val) const;
131-
arma_frown("use .index_max() instead") inline elem_type max(uword& index_of_max_val) const;
130+
[[deprecated("use .index_min() instead")]] inline elem_type min(uword& index_of_min_val) const;
131+
[[deprecated("use .index_max() instead")]] inline elem_type max(uword& index_of_max_val) const;
132132

133-
arma_frown("use .index_min() with ind2sub() instead") inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
134-
arma_frown("use .index_max() with ind2sub() instead") inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
133+
[[deprecated("use .index_min() with ind2sub() instead")]] inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
134+
[[deprecated("use .index_max() with ind2sub() instead")]] inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
135135

136136
arma_warn_unused inline uword index_min() const;
137137
arma_warn_unused inline uword index_max() const;

inst/include/current/armadillo_bits/Col_bones.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Col : public Mat<eT>
9191
inline Col(const subview_cube<eT>& X);
9292
inline Col& operator=(const subview_cube<eT>& X);
9393

94-
arma_frown("use braced initialiser list instead") inline mat_injector<Col> operator<<(const eT val);
94+
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Col> operator<<(const eT val);
9595

9696
arma_warn_unused arma_inline const Op<Col<eT>,op_htrans> t() const;
9797
arma_warn_unused arma_inline const Op<Col<eT>,op_htrans> ht() const;
@@ -141,7 +141,7 @@ class Col : public Mat<eT>
141141

142142
template<typename T1> inline void shed_rows(const Base<uword, T1>& indices);
143143

144-
arma_deprecated inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
144+
[[deprecated]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
145145
inline void insert_rows(const uword row_num, const uword N);
146146

147147
template<typename T1> inline void insert_rows(const uword row_num, const Base<eT,T1>& X);

inst/include/current/armadillo_bits/Cube_bones.hpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ class Cube : public BaseCube< eT, Cube<eT> >
218218

219219
template<typename T1> inline void shed_slices(const Base<uword, T1>& indices);
220220

221-
arma_deprecated inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
222-
arma_deprecated inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero);
223-
arma_deprecated inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero);
221+
[[deprecated]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
222+
[[deprecated]] inline void insert_cols(const uword row_num, const uword N, const bool set_to_zero);
223+
[[deprecated]] inline void insert_slices(const uword slice_num, const uword N, const bool set_to_zero);
224224

225225
inline void insert_rows(const uword row_num, const uword N);
226226
inline void insert_cols(const uword row_num, const uword N);
@@ -387,11 +387,11 @@ class Cube : public BaseCube< eT, Cube<eT> >
387387
arma_warn_unused inline eT min() const;
388388
arma_warn_unused inline eT max() const;
389389

390-
arma_frown("use .index_min() instead") inline eT min(uword& index_of_min_val) const;
391-
arma_frown("use .index_max() instead") inline eT max(uword& index_of_max_val) const;
390+
[[deprecated("use .index_min() instead")]] inline eT min(uword& index_of_min_val) const;
391+
[[deprecated("use .index_max() instead")]] inline eT max(uword& index_of_max_val) const;
392392

393-
arma_frown("use .index_min() with ind2sub() instead") inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
394-
arma_frown("use .index_max() with ind2sub() instead") inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;
393+
[[deprecated("use .index_min() with ind2sub() instead")]] inline eT min(uword& row_of_min_val, uword& col_of_min_val, uword& slice_of_min_val) const;
394+
[[deprecated("use .index_max() with ind2sub() instead")]] inline eT max(uword& row_of_max_val, uword& col_of_max_val, uword& slice_of_max_val) const;
395395

396396
arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
397397
arma_cold inline bool save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
@@ -401,13 +401,13 @@ class Cube : public BaseCube< eT, Cube<eT> >
401401
arma_cold inline bool load(const hdf5_name& spec, const file_type type = hdf5_binary);
402402
arma_cold inline bool load( std::istream& is, const file_type type = auto_detect);
403403

404-
arma_deprecated inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
405-
arma_deprecated inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
406-
arma_deprecated inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
404+
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
405+
[[deprecated("use save() instead")]] inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
406+
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
407407

408-
arma_deprecated inline bool quiet_load(const std::string name, const file_type type = auto_detect);
409-
arma_deprecated inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
410-
arma_deprecated inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
408+
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = auto_detect);
409+
[[deprecated("use load() instead")]] inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
410+
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
411411

412412

413413
// iterators

inst/include/current/armadillo_bits/Mat_bones.hpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ class Mat : public Base< eT, Mat<eT> >
190190
inline Mat& operator/=(const spdiagview<eT>& X);
191191

192192

193-
arma_frown("use braced initialiser list instead") inline mat_injector<Mat> operator<<(const eT val);
194-
arma_frown("use braced initialiser list instead") inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
193+
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Mat> operator<<(const eT val);
194+
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Mat> operator<<(const injector_end_of_row<>& x);
195195

196196

197197
arma_inline subview_row<eT> row(const uword row_num);
@@ -310,8 +310,8 @@ class Mat : public Base< eT, Mat<eT> >
310310
template<typename T1> inline void shed_rows(const Base<uword, T1>& indices);
311311
template<typename T1> inline void shed_cols(const Base<uword, T1>& indices);
312312

313-
arma_frown("use insert_rows(row_num, N) instead") inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
314-
arma_frown("use insert_cols(col_num, N) instead") inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
313+
[[deprecated("use insert_rows(row_num, N) instead")]] inline void insert_rows(const uword row_num, const uword N, const bool set_to_zero);
314+
[[deprecated("use insert_cols(col_num, N) instead")]] inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
315315

316316
inline void insert_rows(const uword row_num, const uword N);
317317
inline void insert_cols(const uword col_num, const uword N);
@@ -485,7 +485,7 @@ class Mat : public Base< eT, Mat<eT> >
485485
inline Mat& reshape(const uword new_n_rows, const uword new_n_cols);
486486
inline Mat& reshape(const SizeMat& s);
487487

488-
arma_frown("use reshape(n_rows, n_cols) instead") inline void reshape(const uword new_n_rows, const uword new_n_cols, const uword dim); //!< NOTE: don't use this form: it will be removed
488+
[[deprecated("use reshape(n_rows, n_cols) instead")]] inline void reshape(const uword new_n_rows, const uword new_n_cols, const uword dim); //!< NOTE: don't use this form: it will be removed
489489

490490

491491
template<typename functor> inline Mat& for_each(functor F);
@@ -541,11 +541,11 @@ class Mat : public Base< eT, Mat<eT> >
541541
arma_warn_unused inline eT min() const;
542542
arma_warn_unused inline eT max() const;
543543

544-
arma_frown("use .index_min() instead") inline eT min(uword& index_of_min_val) const;
545-
arma_frown("use .index_max() instead") inline eT max(uword& index_of_max_val) const;
544+
[[deprecated("use .index_min() instead")]] inline eT min(uword& index_of_min_val) const;
545+
[[deprecated("use .index_max() instead")]] inline eT max(uword& index_of_max_val) const;
546546

547-
arma_frown("use .index_min() with ind2sub() instead") inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
548-
arma_frown("use .index_max() with ind2sub() instead") inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;
547+
[[deprecated("use .index_min() with ind2sub() instead")]] inline eT min(uword& row_of_min_val, uword& col_of_min_val) const;
548+
[[deprecated("use .index_max() with ind2sub() instead")]] inline eT max(uword& row_of_max_val, uword& col_of_max_val) const;
549549

550550

551551
arma_cold inline bool save(const std::string name, const file_type type = arma_binary) const;
@@ -558,15 +558,15 @@ class Mat : public Base< eT, Mat<eT> >
558558
arma_cold inline bool load(const csv_name& spec, const file_type type = csv_ascii);
559559
arma_cold inline bool load( std::istream& is, const file_type type = auto_detect);
560560

561-
arma_frown("use save() instead") inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
562-
arma_frown("use save() instead") inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
563-
arma_frown("use save() instead") inline bool quiet_save(const csv_name& spec, const file_type type = csv_ascii) const;
564-
arma_frown("use save() instead") inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
561+
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
562+
[[deprecated("use save() instead")]] inline bool quiet_save(const hdf5_name& spec, const file_type type = hdf5_binary) const;
563+
[[deprecated("use save() instead")]] inline bool quiet_save(const csv_name& spec, const file_type type = csv_ascii) const;
564+
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
565565

566-
arma_frown("use load() instead") inline bool quiet_load(const std::string name, const file_type type = auto_detect);
567-
arma_frown("use load() instead") inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
568-
arma_frown("use load() instead") inline bool quiet_load(const csv_name& spec, const file_type type = csv_ascii);
569-
arma_frown("use load() instead") inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
566+
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = auto_detect);
567+
[[deprecated("use load() instead")]] inline bool quiet_load(const hdf5_name& spec, const file_type type = hdf5_binary);
568+
[[deprecated("use load() instead")]] inline bool quiet_load(const csv_name& spec, const file_type type = csv_ascii);
569+
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = auto_detect);
570570

571571

572572
// for container-like functionality

inst/include/current/armadillo_bits/Row_bones.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Row : public Mat<eT>
9191
inline Row(const subview_cube<eT>& X);
9292
inline Row& operator=(const subview_cube<eT>& X);
9393

94-
arma_frown("use braced initialiser list instead") inline mat_injector<Row> operator<<(const eT val);
94+
[[deprecated("use braced initialiser list instead")]] inline mat_injector<Row> operator<<(const eT val);
9595

9696
arma_warn_unused arma_inline const Op<Row<eT>,op_htrans> t() const;
9797
arma_warn_unused arma_inline const Op<Row<eT>,op_htrans> ht() const;
@@ -141,7 +141,7 @@ class Row : public Mat<eT>
141141

142142
template<typename T1> inline void shed_cols(const Base<uword, T1>& indices);
143143

144-
arma_deprecated inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
144+
[[deprecated]] inline void insert_cols(const uword col_num, const uword N, const bool set_to_zero);
145145
inline void insert_cols(const uword col_num, const uword N);
146146

147147
template<typename T1> inline void insert_cols(const uword col_num, const Base<eT,T1>& X);

inst/include/current/armadillo_bits/SpBase_bones.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,11 @@ struct SpBase
7676
arma_warn_unused inline elem_type min() const;
7777
arma_warn_unused inline elem_type max() const;
7878

79-
arma_frown("use .index_min() instead") inline elem_type min(uword& index_of_min_val) const;
80-
arma_frown("use .index_max() instead") inline elem_type max(uword& index_of_max_val) const;
79+
[[deprecated("use .index_min() instead")]] inline elem_type min(uword& index_of_min_val) const;
80+
[[deprecated("use .index_max() instead")]] inline elem_type max(uword& index_of_max_val) const;
8181

82-
arma_frown("use .index_min() with ind2sub() instead") inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
83-
arma_frown("use .index_max() with ind2sub() instead") inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
82+
[[deprecated("use .index_min() with ind2sub() instead")]] inline elem_type min(uword& row_of_min_val, uword& col_of_min_val) const;
83+
[[deprecated("use .index_max() with ind2sub() instead")]] inline elem_type max(uword& row_of_max_val, uword& col_of_max_val) const;
8484

8585
arma_warn_unused inline uword index_min() const;
8686
arma_warn_unused inline uword index_max() const;

inst/include/current/armadillo_bits/SpMat_bones.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -399,11 +399,11 @@ class SpMat : public SpBase< eT, SpMat<eT> >
399399
arma_cold inline bool load(const csv_name& spec, const file_type type = csv_ascii);
400400
arma_cold inline bool load( std::istream& is, const file_type type = arma_binary);
401401

402-
arma_frown("use save() instead") inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
403-
arma_frown("use save() instead") inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
402+
[[deprecated("use save() instead")]] inline bool quiet_save(const std::string name, const file_type type = arma_binary) const;
403+
[[deprecated("use save() instead")]] inline bool quiet_save( std::ostream& os, const file_type type = arma_binary) const;
404404

405-
arma_frown("use load() instead") inline bool quiet_load(const std::string name, const file_type type = arma_binary);
406-
arma_frown("use load() instead") inline bool quiet_load( std::istream& is, const file_type type = arma_binary);
405+
[[deprecated("use load() instead")]] inline bool quiet_load(const std::string name, const file_type type = arma_binary);
406+
[[deprecated("use load() instead")]] inline bool quiet_load( std::istream& is, const file_type type = arma_binary);
407407

408408

409409

inst/include/current/armadillo_bits/SpValProxy_bones.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ class SpValProxy
7373
// Deletes the element if it is zero; NOTE: does not check if val_ptr == nullptr
7474
arma_inline void check_zero();
7575

76-
arma_aligned const uword row;
77-
arma_aligned const uword col;
76+
const uword row;
77+
const uword col;
7878

7979
arma_aligned eT* val_ptr;
8080

inst/include/current/armadillo_bits/arma_forward.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ struct SizeCube;
7777

7878
struct arma_empty_class {};
7979

80-
class diskio;
80+
struct diskio;
8181

8282
struct op_strans;
8383
struct op_htrans;

inst/include/current/armadillo_bits/compiler_setup.hpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
#undef arma_aligned
2323
#undef arma_align_mem
2424
#undef arma_warn_unused
25-
#undef arma_deprecated
26-
#undef arma_frown
2725
#undef arma_malloc
2826
#undef arma_inline
2927
#undef arma_noinline
@@ -34,8 +32,6 @@
3432
#define arma_aligned
3533
#define arma_align_mem
3634
#define arma_warn_unused
37-
#define arma_deprecated [[deprecated]]
38-
#define arma_frown(msg) [[deprecated(msg)]]
3935
#define arma_malloc
4036
#define arma_inline inline
4137
#define arma_noinline
@@ -171,8 +167,6 @@
171167
#undef arma_aligned
172168
#undef arma_align_mem
173169
#undef arma_warn_unused
174-
#undef arma_deprecated
175-
#undef arma_frown
176170
#undef arma_malloc
177171
#undef arma_inline
178172
#undef arma_noinline
@@ -182,8 +176,6 @@
182176
#define arma_aligned __attribute__((__aligned__))
183177
#define arma_align_mem __attribute__((__aligned__(16)))
184178
#define arma_warn_unused __attribute__((__warn_unused_result__))
185-
#define arma_deprecated __attribute__((__deprecated__))
186-
#define arma_frown(msg) __attribute__((__deprecated__(msg)))
187179
#define arma_malloc __attribute__((__malloc__))
188180
#define arma_inline __attribute__((__always_inline__)) inline
189181
#define arma_noinline __attribute__((__noinline__))
@@ -243,16 +235,6 @@
243235
#define arma_warn_unused __attribute__((__warn_unused_result__))
244236
#endif
245237

246-
#if __has_attribute(__deprecated__)
247-
#undef arma_deprecated
248-
#define arma_deprecated __attribute__((__deprecated__))
249-
#endif
250-
251-
#if __has_attribute(__deprecated__)
252-
#undef arma_frown
253-
#define arma_frown(msg) __attribute__((__deprecated__(msg)))
254-
#endif
255-
256238
#if __has_attribute(__malloc__)
257239
#undef arma_malloc
258240
#define arma_malloc __attribute__((__malloc__))
@@ -310,9 +292,6 @@
310292
#error "*** newer compiler required ***"
311293
#endif
312294

313-
#undef arma_deprecated
314-
#define arma_deprecated __declspec(deprecated)
315-
316295
#undef arma_noinline
317296
#define arma_noinline __declspec(noinline)
318297

0 commit comments

Comments
 (0)