Skip to content

Commit

Permalink
Update armadillo version 12.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TLCFEM committed May 10, 2024
1 parent e0795d9 commit 536e1a3
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Include/armadillo/armadillo_bits/arma_version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

#define ARMA_VERSION_MAJOR 12
#define ARMA_VERSION_MINOR 8
#define ARMA_VERSION_PATCH 2
#define ARMA_VERSION_PATCH 3
#define ARMA_VERSION_NAME "Cortisol Injector"


Expand Down
3 changes: 0 additions & 3 deletions Include/armadillo/armadillo_bits/compiler_setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,14 +377,11 @@


#if defined(__SUNPRO_CC)

// http://www.oracle.com/technetwork/server-storage/solarisstudio/training/index-jsp-141991.html
// http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/cplusplus-faq-355066.html

#if (__SUNPRO_CC < 0x5140)
#error "*** newer compiler required ***"
#endif

#endif


Expand Down
5 changes: 5 additions & 0 deletions Include/armadillo/armadillo_bits/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@

#if defined(ARMA_EXTRA_DEBUG)
#undef ARMA_NO_DEBUG
#undef ARMA_DONT_CHECK_NONFINITE

#undef ARMA_CHECK_NONFINITE
#define ARMA_CHECK_NONFINITE

#undef ARMA_WARN_LEVEL
#define ARMA_WARN_LEVEL 3
#endif
Expand Down
5 changes: 5 additions & 0 deletions Include/armadillo/armadillo_bits/config.hpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,11 @@

#if defined(ARMA_EXTRA_DEBUG)
#undef ARMA_NO_DEBUG
#undef ARMA_DONT_CHECK_NONFINITE

#undef ARMA_CHECK_NONFINITE
#define ARMA_CHECK_NONFINITE

#undef ARMA_WARN_LEVEL
#define ARMA_WARN_LEVEL 3
#endif
Expand Down
8 changes: 4 additions & 4 deletions Include/armadillo/armadillo_bits/debug.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ arma_assert_same_size(const uword A_n_rows, const uword A_n_cols, const uword B_



//! stop if given matrices have different sizes
//! stop if given matrices do not have the same size
template<typename eT1, typename eT2>
arma_hot
inline
Expand All @@ -600,7 +600,7 @@ arma_assert_same_size(const Mat<eT1>& A, const Mat<eT2>& B, const char* x)



//! stop if given proxies have different sizes
//! stop if given proxies do not have the same size
template<typename eT1, typename eT2>
arma_hot
inline
Expand Down Expand Up @@ -804,7 +804,7 @@ arma_assert_same_size(const uword A_n_rows, const uword A_n_cols, const uword A_



//! stop if given cubes have different sizes
//! stop if given cubes do not have the same size
template<typename eT1, typename eT2>
arma_hot
inline
Expand Down Expand Up @@ -883,7 +883,7 @@ arma_assert_same_size(const subview_cube<eT>& A, const ProxyCube<T1>& B, const c



//! stop if given cube proxies have different sizes
//! stop if given cube proxies do not have the same size
template<typename eT1, typename eT2>
arma_hot
inline
Expand Down
32 changes: 31 additions & 1 deletion Include/armadillo/armadillo_bits/fft_engine_fftw3.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@

#if defined(ARMA_USE_FFTW3)

struct fft_engine_fftw3_aux
{
#if (!defined(ARMA_DONT_USE_STD_MUTEX))
static inline std::mutex& get_plan_mutex() { static std::mutex plan_mutex; return plan_mutex; }
#endif
};

template<typename cx_type, bool inverse>
class fft_engine_fftw3
{
Expand Down Expand Up @@ -74,7 +81,30 @@ class fft_engine_fftw3
const int fftw3_flags = fftw3_flag_destroy | fftw3_flag_estimate;

arma_extra_debug_print("fft_engine_fftw3::constructor: generating 1D plan");
fftw3_plan = fftw3::plan_dft_1d<cx_type>(N, X_work.memptr(), Y_work.memptr(), fftw3_sign, fftw3_flags);

// only fftw3::execute() is thread safe, as per FFTW docs:
// https://www.fftw.org/fftw3_doc/Thread-safety.html

#if defined(ARMA_USE_OPENMP)
{
#pragma omp critical (arma_fft_engine_fftw3)
{
fftw3_plan = fftw3::plan_dft_1d<cx_type>(N, X_work.memptr(), Y_work.memptr(), fftw3_sign, fftw3_flags);
}
}
#elif (!defined(ARMA_DONT_USE_STD_MUTEX))
{
std::mutex& plan_mutex = fft_engine_fftw3_aux::get_plan_mutex();

const std::lock_guard<std::mutex> lock(plan_mutex);

fftw3_plan = fftw3::plan_dft_1d<cx_type>(N, X_work.memptr(), Y_work.memptr(), fftw3_sign, fftw3_flags);
}
#else
{
fftw3_plan = fftw3::plan_dft_1d<cx_type>(N, X_work.memptr(), Y_work.memptr(), fftw3_sign, fftw3_flags);
}
#endif

if(fftw3_plan == nullptr) { arma_stop_runtime_error("fft_engine_fftw3::constructor: failed to create plan"); }
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ Additional libraries used in **suanPan** are listed as follows.
- [**VTK**](https://vtk.org/) version 9.2.6
- [**CUDA**](https://docs.nvidia.com/cuda/cuda-toolkit-release-notes/) version 12.0
- [**MAGMA**](https://icl.utk.edu/magma/) version 2.8.0
- [**Armadillo**](http://arma.sourceforge.net/) version 12.8.2
- [**Armadillo**](http://arma.sourceforge.net/) version 12.8.3
- [**ensmallen**](https://ensmallen.org/) version 2.20.0
- [**oneMKL**](https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/onemkl.html) version 2024.1.0
- [**Catch2**](https://github.com/catchorg/Catch2) version 3.5.4
Expand Down

0 comments on commit 536e1a3

Please sign in to comment.