From f297db01ef267b087cf9dcd69c1efe2b1f260bd5 Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Mon, 25 Jun 2012 21:12:28 -0400
Subject: [PATCH] Make an explicit constructor for complex numbers.

---
 src/cl/pyopencl-complex.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/cl/pyopencl-complex.h b/src/cl/pyopencl-complex.h
index d027df29..67ae2cfd 100644
--- a/src/cl/pyopencl-complex.h
+++ b/src/cl/pyopencl-complex.h
@@ -35,6 +35,7 @@
   REAL_TP TPROOT##_abs(TP a) { return hypot(a.x, a.y); } \
   \
   TP TPROOT##_fromreal(REAL_TP a) { return (TP)(a, 0); } \
+  TP TPROOT##_new(REAL_TP a, REAL_TP b) { return (TP)(a, b); } \
   TP TPROOT##_conj(TP a) { return (TP)(a.x, -a.y); } \
   \
   TP TPROOT##_add(TP a, TP b) \
-- 
GitLab