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. [1] (recommended) In this case, you don't 
have to pass sized ints any more, since you've already specified arg types in 
prepare().

I've updated the docs to make this clearer.

HTH,
Andreas

[1] http://is.gd/94wA

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyCuda mailing list
PyCuda@tiker.net
http://tiker.net/mailman/listinfo/pycuda_tiker.net

Reply via email to