[arrayfire] 96/408: BUGFIX: Fixing casting to and from complex numbers in CPU backend

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Mon Sep 21 19:11:27 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 bd21a82627c14691274869533d415746b39fd3a3
Author: Pavan Yalamanchili <pavan at arrayfire.com>
Date:   Thu Jul 2 19:29:39 2015 -0400

    BUGFIX: Fixing casting to and from complex numbers in CPU backend
---
 src/backend/cpu/cast.hpp | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/backend/cpu/cast.hpp b/src/backend/cpu/cast.hpp
index bb59d5e..67a1c05 100644
--- a/src/backend/cpu/cast.hpp
+++ b/src/backend/cpu/cast.hpp
@@ -49,6 +49,23 @@ struct UnOp<To, std::complex<double>, af_cast_t>
     }
 };
 
+template<>
+struct UnOp<std::complex<float>, std::complex<double>, af_cast_t>
+{
+    std::complex<float> eval(std::complex<double> in)
+    {
+        return std::complex<float>(in);
+    }
+};
+
+template<>
+struct UnOp<std::complex<double>, std::complex<float>, af_cast_t>
+{
+    std::complex<double> eval(std::complex<float> in)
+    {
+        return std::complex<double>(in);
+    }
+};
 
 #define CAST_B8(T)                              \
     template<>                                  \

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