Gregor Thalhammer <[email protected]> writes: > Great, I will try to look into this. At first glance it seems the > infrastructure for providing a flag is not yet there. Such workarounds > are device dependent. I am thinking about adding device specific build > options, similar to _PLAT_BUILD_OPTIONS in pyopencl/__init__.py, which > defines an macro (e.g. PYOPENCL_COMPLEX_NOSTRUCT) to switch > definitions in pyopencl-complex.h based on this flag.
That sounds reasonable. Who or what would activate that flag? (I'm asking because I'd strongly recommend against some sort of 'magic' or look-up table to activate it.) > A drawback of optionally reverting to the old vector-based complex > types is that the nice .real and .imag attribute access cannot be used > anymore, instead one has to revert to the .x and .y attributes, or > introduce macros for attribute access. Functions (not macros) for the attribute access already exist: cdouble_real(...), cdouble_imag(...) Are you ok just using those? Andreas _______________________________________________ PyOpenCL mailing list [email protected] https://lists.tiker.net/listinfo/pyopencl
