Hi Ying Wai,

On Freitag 11 Dezember 2009, Ying Wai (Daniel) Fan wrote:
> I am using your PyCUDA on some image processing applications. I have
> modified some PyCUDA files for additional functionality. You may find
> these small changes useful to be included in next release of PyCUDA.
> 
> I have modified functions in elementwise.py to for additional codes to
> run before and after the GPU threaded for-loop. In dtype_to_ctype of
> tools.py, I have added support for complex numbers. I have attached the
> modified files.

Regarding your changes to elementwise.py, a similar patch for "loop_prep" has 
already made it in, I've added a post_loop parameter to suit your needs.

I haven't merged your changes to tools.py, because I don't understand the 
reasoning behind most of them:

 def platform_bits():
-    from struct import calcsize
-    return calcsize('l') * 8
+    return tuple.__itemsize__ * 8

Why is this better?

+    elif dtype == numpy.complex64:
+        return "float2"

This is incorrect.

+    elif tp in ["bool"]: return "?"

"?" is not a documented type character in Python's "struct" module.

> Please give me credit for these changes when appropriate.

Done, see revlog.

> I have also written some codes for doing Fast Fourier transform and
> complex number arithmetics with PyCUDA. If you think these can be
> included in PyCUDA, I can send you these files too.

Please do, I think this could be very useful.

Further, the preferred way of submitting changesets is by sending a diff 
against a recent git tree, rather than entire modified files from the last 
release.

Finally, please subscribe to the PyCUDA mailing list and send future 
modifications there instead of to my personal address.

Thanks for your contribution.

Andreas

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