On Mittwoch 20 Mai 2009, Bryan Catanzaro wrote: > Would it be possible to change both the Device.get_attribute() and the > Function.get_attribute() calls to make them Python attributes instead > of using function-and-flag? It seems like this could avoid the > inconsistency between the two. > > I agree with Ian - aesthetically it doesn't seem optimal to echo the C > API exactly in PyCUDA, when Python gives us much richer possibilities.
Here's something that somehow feels like a second-best solution, but it at least maintains consistency: Everything that can be accessed as something.get_attribute(some.scope.ATTR_NAME) can now *also* be accessed as something.attr_name. I don't think I want to kill the get_attribute interface entirely. This would still mean that Function.registers would be deprecated, in favor of Function.num_regs The point is that the name of the attribute and the name of the magic number would be consistent with each other and therefore could be implemented automatically--with no further maintenance burden. Opinions on this one? Andreas
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ PyCuda mailing list PyCuda@tiker.net http://tiker.net/mailman/listinfo/pycuda_tiker.net