Ok, fixed that ( needed to use "uint" not "uint32". Numpy basic types don't seem to be anywhere near the surface of Google and are hard to find ). I now have another related question :
the documentation for the pycuda prepare function states "setting up the argument types as arg_types. arg_types is expected to be an iterable containing type characters understood by the struct module or numpy.dtype objects." Since I am still baffled by numpy datatypes ( which definitely don't seem to include pointers), how do I tell CUDA that "this is a pointer to a float" and "this is a pointer to an integer" using this function ? sincerely, mrule. On Tue, Jun 30, 2009 at 1:42 PM, Michael Rule<mrule7...@gmail.com> wrote: > I'm sorry to bother the list, but I can't seem to generate > appropriately typed arguments for the memset_d32 function > my current attempt looks like : > > array=pycuda.driver.mem_alloc(bytes) > > pycuda.driver.memset_d32(numpy.uint32(array),numpy.uint32(0),numpy.uint32(N)) > > Which generates the following error : > > Boost.Python.ArgumentError: Python argument types in > pycuda._driver.memset_d32(numpy.uint32, numpy.uint32, numpy.uint32) > did not match C++ signature: > memset_d32(unsigned int dest, unsigned int data, unsigned int size) > > how do I cast to this particular unsigned int type ? > > sincerely, > mrule. > _______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://tiker.net/mailman/listinfo/pycuda_tiker.net