On Mittwoch 26 November 2008, Brad Zima wrote:
Reading more of the documentation showed that only
certain datatypes may be
passed into the module, none of which are of int type. Is there something
I'm missing here? If not, is there a way to pass variables (i.e. image
width and image height) into a SourceModule?
You're likely passing an int for the r_gpu parameter. The problem is that
PyCuda is refusing to guess what type the Python 'int' may correspond to. You
have to tell it.
There are two ways:
- Use numpy's sized integers in the direct invocation interface. (convenient)
- Use the prepared_call interface.  (recommended) In this case, you don't
have to pass sized ints any more, since you've already specified arg types in
I've updated the docs to make this clearer.