"CRV§ADER//KY" <[email protected]> writes: > I second that the caching should be done internally by opencl, as this > would produce more readable code and avoid obscure bugs like the opener's. > Is there any reason against it? > > As a general python rule, if you have a @property that takes a > non-negligible amount of time to compute after the first invocation, you're > doing it wrong and it should be either cached or replaced by a function. > Just my 2c.
I generally agree, although this is a bit subtler, since "prg.sum" is cheap. It's just using "prg.sum(...)" incurs sigificant cost each time. Nonetheless, yes, I agree that this should be fixed. https://github.com/pyopencl/pyopencl/issues/112 I'd be happy to take a patch if one of you gets to it before I do. Andreas _______________________________________________ PyOpenCL mailing list [email protected] https://lists.tiker.net/listinfo/pyopencl
