On Montag 14 September 2009, David Garcia wrote: > Hi Andreas & folks, > I just downloaded and installed pyopencl 0.91 to try the changes. The code > looks cleaner now that we have constructors. Thanks a lot :) > > However, when I tried executing the code below I get an error: > >>> ctx = cl.create_context_from_type(cl.device_type.CPU)>>> ctx.DEVICES
Short version: Use ctx.devices intead--the docs specify lowercase for .info attributes, to match PEP8. Long version: Ah. Nice. Side effect of a performance optimization. Previously, the .info lookup feature would transform the string to upper case and look it up in the appropriate scope. Now it uses a lookup table of pre-intern()ed strings, which should be an estimated bajillion times faster. Side effect: You can't do ctx.DEVICES (or ctx.DeViCeS, for that matter) any more. Andreas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyOpenCL mailing list [email protected] http://tiker.net/mailman/listinfo/pyopencl_tiker.net
