diff --git a/doc/array.rst b/doc/array.rst index 9078f6f166e9cf2f92067fa9a653132f0d6c982a..8c3256eb983bb9e78f39f3ee4a6128a59869c900 100644 --- a/doc/array.rst +++ b/doc/array.rst @@ -111,17 +111,23 @@ If you need double precision support, please:: before including the header, as DP support apparently cannot be reliably autodetected. -Under the hood, the complex types are simply `float2` and `double2`. - -.. warning:: - Note that, at the OpenCL source code level, addition (real + complex) and - multiplication (complex*complex) are defined for e.g. `float2`, but yield - wrong results, so that you need to use the corresponding functions. - (The :mod:`Array` type implements complex arithmetic as you remember it, - without any idiotic quirks like this.) +Under the hood, the complex types are struct types as defined in the header. +Ideally, you should only access the structs through the provided functions, +never directly. .. versionadded:: 2012.1 +.. versionchanged:: 2015.2 + + **[INCOMPATIBLE]** Changed PyOpenCL's complex numbers from ``float2`` and + ``double2`` OpenCL vector types to custom ``struct``. This was changed + because it very easily introduced bugs where + + * complex*complex + * real+complex + + *look* like they may do the right thing, but sliently do the wrong thing. + The :class:`Array` Class ------------------------ diff --git a/doc/misc.rst b/doc/misc.rst index 1da2f20f85898ac7f79f673a1a0faaeedf560b6f..6ef89aa5d96d8c445356b935619f30f3381d5c5e 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -143,6 +143,14 @@ Version 2015.2.1 Version 2015.2 -------------- +* **[INCOMPATIBLE]** Changed PyOpenCL's complex numbers from ``float2`` and + ``double2`` OpenCL vector types to custom ``struct``. This was changed + because it very easily introduced bugs where + + * complex*complex + * real+complex + + *look* like they may do the right thing, but sliently do the wrong thing. * Rewrite of the wrapper layer to be based on CFFI * Pypy compatibility * Faster kernel invocation through Python launcher code generation