From ca2e55dc87be89df92267ff7d16074304db08698 Mon Sep 17 00:00:00 2001 From: conrad Date: Tue, 28 Sep 2021 16:51:14 +1000 Subject: [PATCH] avoid creating the proxy in openmp path --- include/armadillo_bits/op_htrans_meat.hpp | 4 ++-- include/armadillo_bits/op_strans_meat.hpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/armadillo_bits/op_htrans_meat.hpp b/include/armadillo_bits/op_htrans_meat.hpp index 20345594..4b9ed3eb 100644 --- a/include/armadillo_bits/op_htrans_meat.hpp +++ b/include/armadillo_bits/op_htrans_meat.hpp @@ -312,7 +312,7 @@ op_htrans::apply_direct(Mat& out, const T1& X) typedef typename T1::elem_type eT; // allow detection of in-place transpose - if(is_Mat::value) + if(is_Mat::value || (arma_config::openmp && Proxy::use_mp)) { const unwrap U(X); @@ -324,7 +324,7 @@ op_htrans::apply_direct(Mat& out, const T1& X) const bool is_alias = P.is_alias(out); - if(is_Mat::stored_type>::value || (arma_config::openmp && Proxy::use_mp)) + if(is_Mat::stored_type>::value) { const quasi_unwrap::stored_type> U(P.Q); diff --git a/include/armadillo_bits/op_strans_meat.hpp b/include/armadillo_bits/op_strans_meat.hpp index b5564c95..519f8b1d 100644 --- a/include/armadillo_bits/op_strans_meat.hpp +++ b/include/armadillo_bits/op_strans_meat.hpp @@ -381,7 +381,7 @@ op_strans::apply_direct(Mat& out, const T1& X) typedef typename T1::elem_type eT; // allow detection of in-place transpose - if(is_Mat::value) + if(is_Mat::value || (arma_config::openmp && Proxy::use_mp)) { const unwrap U(X); @@ -393,7 +393,7 @@ op_strans::apply_direct(Mat& out, const T1& X) const bool is_alias = P.is_alias(out); - if(is_Mat::stored_type>::value || (arma_config::openmp && Proxy::use_mp)) + if(is_Mat::stored_type>::value) { const quasi_unwrap::stored_type> U(P.Q);