From 9e925431b16a09a1e18794a30b95f820d56b037a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Wed, 7 Mar 2012 19:52:08 -0500 Subject: [PATCH] Try and work around an Nvidia compiler issue in cfloat_cast(). (Issue reported by Karsten Wiesner and Alex Nitz) --- src/cl/pyopencl-complex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cl/pyopencl-complex.h b/src/cl/pyopencl-complex.h index 2709ea42..e49e16be 100644 --- a/src/cl/pyopencl-complex.h +++ b/src/cl/pyopencl-complex.h @@ -217,9 +217,9 @@ PYOPENCL_DECLARE_COMPLEX_TYPE_INT(BASE, BASE_3LTR, c##BASE, c##BASE##_t) PYOPENCL_DECLARE_COMPLEX_TYPE(float, FLT); -#define cfloat_cast(a) ((cfloat_t) ((a).x, (a).y)) +#define cfloat_cast(a) ((cfloat_t) ((float) (a).x, (float) (a).y)) #ifdef PYOPENCL_DEFINE_CDOUBLE PYOPENCL_DECLARE_COMPLEX_TYPE(double, DBL); -#define cdouble_cast(a) ((cdouble_t) ((a).x, (a).y)) +#define cdouble_cast(a) ((cdouble_t) ((double) (a).x, (double) (a).y)) #endif -- GitLab