[mlpack-git] master: arma::inplace_trans is not available for older versions of arma (df09588)
gitdub at big.cc.gt.atl.ga.us
gitdub at big.cc.gt.atl.ga.us
Thu Mar 5 22:17:38 EST 2015
Repository : https://github.com/mlpack/mlpack
On branch : master
Link : https://github.com/mlpack/mlpack/compare/904762495c039e345beba14c1142fd719b3bd50e...f94823c800ad6f7266995c700b1b630d5ffdcf40
>---------------------------------------------------------------
commit df09588fc10bcbde275e7a505ada2c4b982c7242
Author: Stephen Tu <tu.stephenl at gmail.com>
Date: Mon Mar 2 19:56:07 2015 -0800
arma::inplace_trans is not available for older versions of arma
>---------------------------------------------------------------
df09588fc10bcbde275e7a505ada2c4b982c7242
src/mlpack/core/data/load_impl.hpp | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/src/mlpack/core/data/load_impl.hpp b/src/mlpack/core/data/load_impl.hpp
index eede8a3..593f455 100644
--- a/src/mlpack/core/data/load_impl.hpp
+++ b/src/mlpack/core/data/load_impl.hpp
@@ -26,7 +26,14 @@ bool inline inplace_transpose(arma::Mat<eT>& X)
}
catch (std::bad_alloc& exception)
{
+#if ARMA_VERSION_MAJOR >= 4
arma::inplace_trans(X, "lowmem");
+#else
+ Log::Fatal << "inplace_transpose is only available on "
+ << "Armadillo 4.xxx.x or higher. Ran out of memory to "
+ << "transpose matrix."
+ << std::endl;
+#endif
return true;
}
}
More information about the mlpack-git
mailing list