[arrayfire] 354/408: BUGFIX SVD use gesdd only with MKL, use gesvd with atlas
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:12:29 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository arrayfire.
commit 40912e5a923b2ec80ba13248efe11897c5a970b9
Author: Shehzan Mohammed <shehzan at arrayfire.com>
Date: Tue Aug 25 18:02:40 2015 -0400
BUGFIX SVD use gesdd only with MKL, use gesvd with atlas
---
src/backend/cpu/svd.cpp | 35 ++++++++++++++++++-----------------
1 file changed, 18 insertions(+), 17 deletions(-)
diff --git a/src/backend/cpu/svd.cpp b/src/backend/cpu/svd.cpp
index b34781a..50db1f6 100644
--- a/src/backend/cpu/svd.cpp
+++ b/src/backend/cpu/svd.cpp
@@ -27,39 +27,40 @@ namespace cpu
template<> svd_func_def<T, Tr> svd_func<T, Tr>() \
{ return & LAPACK_NAME(PREFIX##FUNC); }
-#ifdef ARM_ARCH
+#ifdef USE_MKL
+
template<typename T, typename Tr>
using svd_func_def = int (*)(ORDER_TYPE,
- char jobu, char jobvt,
+ char jobz,
int m, int n,
T* in, int ldin,
Tr* s,
T* u, int ldu,
- T* vt, int ldvt,
- Tr *superb);
+ T* vt, int ldvt);
- SVD_FUNC_DEF( gesvd )
- SVD_FUNC(gesvd, float , float , s)
- SVD_FUNC(gesvd, double , double, d)
- SVD_FUNC(gesvd, cfloat , float , c)
- SVD_FUNC(gesvd, cdouble, double, z)
+ SVD_FUNC_DEF( gesdd )
+ SVD_FUNC(gesdd, float , float , s)
+ SVD_FUNC(gesdd, double , double, d)
+ SVD_FUNC(gesdd, cfloat , float , c)
+ SVD_FUNC(gesdd, cdouble, double, z)
-#else
+#else // Atlas causes memory freeing issues with using gesdd
template<typename T, typename Tr>
using svd_func_def = int (*)(ORDER_TYPE,
- char jobz,
+ char jobu, char jobvt,
int m, int n,
T* in, int ldin,
Tr* s,
T* u, int ldu,
- T* vt, int ldvt);
+ T* vt, int ldvt,
+ Tr *superb);
- SVD_FUNC_DEF( gesdd )
- SVD_FUNC(gesdd, float , float , s)
- SVD_FUNC(gesdd, double , double, d)
- SVD_FUNC(gesdd, cfloat , float , c)
- SVD_FUNC(gesdd, cdouble, double, z)
+ SVD_FUNC_DEF( gesvd )
+ SVD_FUNC(gesvd, float , float , s)
+ SVD_FUNC(gesvd, double , double, d)
+ SVD_FUNC(gesvd, cfloat , float , c)
+ SVD_FUNC(gesvd, cdouble, double, z)
#endif
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/arrayfire.git
More information about the debian-science-commits
mailing list