Gregor Thalhammer <[email protected]> writes: >>> 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? > > These typed functions are ok for using in custom kernels, but in > pyopencl-complex.h itself they are not used for attribute access, so > the same macro expression can be used to define the complex math > functions for both cfloat and cdouble. Thats the reason why I only see > the options of reverting to use a.x, a.y or introduce macros > (e.g. RE(a), IM(a)) for use in pyopencl-complex.h
pyopencl-complex.h can be changed to use those functions, I think. What part is troublesome in your estimation? Andreas _______________________________________________ PyOpenCL mailing list [email protected] https://lists.tiker.net/listinfo/pyopencl
