From b17a37e7c8482a16f33dfa58be41b0efa3d749db Mon Sep 17 00:00:00 2001 From: conrad Date: Mon, 12 Jun 2023 16:51:16 +1000 Subject: [PATCH] emit warnings when attempting to detect non-finite values in fast math mode --- include/armadillo_bits/subview_meat.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/armadillo_bits/subview_meat.hpp b/include/armadillo_bits/subview_meat.hpp index e7439171..0e20d39d 100644 --- a/include/armadillo_bits/subview_meat.hpp +++ b/include/armadillo_bits/subview_meat.hpp @@ -1485,6 +1485,8 @@ subview::is_finite() const { arma_extra_debug_sigprint(); + if(arma_config::fast_math) { arma_debug_warn_level(2, "is_finite(): detection of non-finite values is not reliable in fast math mode"); } + const uword local_n_rows = n_rows; const uword local_n_cols = n_cols;