[arrayfire] 27/79: Resolve ambiguous pow error on osx cuda(6.5)

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Jun 15 13:38:04 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository arrayfire.

commit c4a723a735f8a877e2402f0e26d5b229b165c3f9
Author: Umar Arshad <umar at arrayfire.com>
Date:   Sat Jun 6 17:48:03 2015 -0400

    Resolve ambiguous pow error on osx cuda(6.5)
---
 src/api/c/norm.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/api/c/norm.cpp b/src/api/c/norm.cpp
index 17012ea..bf83353 100644
--- a/src/api/c/norm.cpp
+++ b/src/api/c/norm.cpp
@@ -53,7 +53,7 @@ double vectorNorm(const Array<T> &A, double p)
 
     Array<T> P = createValueArray<T>(A.dims(), scalar<T>(p));
     Array<T> A_p = arithOp<T, af_pow_t>(A, P, A.dims());
-    return std::pow(reduce_all<af_add_t, T, T>(A_p), 1.0/p);
+    return std::pow(reduce_all<af_add_t, T, T>(A_p), T(1.0/p));
 }
 
 template<typename T>
@@ -79,7 +79,7 @@ double LPQNorm(const Array<T> &A, double p, double q)
     Array<T> Q = createValueArray<T>(A_p_norm.dims(), scalar<T>(q));
     Array<T> A_p_norm_q = arithOp<T, af_pow_t>(A_p_norm, Q, Q.dims());
 
-    return std::pow(reduce_all<af_add_t, T, T>(A_p_norm_q), 1.0/q);
+    return std::pow(reduce_all<af_add_t, T, T>(A_p_norm_q), T(1.0/q));
 }
 
 template<typename T>

-- 
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