Hello. I attach patch containing code that is supposed to initialise Sobol32 direction vectors. Initially I wanted to implement it myself based on article, but after looking at CUDA 4.0 (and new functions that would also need to be reimplemented) I decided just to call existing function in library.
Few remarks about implementation: 1) I have added new option to configure.py and new configuration variable HAVE_LIBRARIES It might not be ideal for CURAND, but I am also thinking about additional libraries that are available in CUDA 4.0 in cudatoolssdk_4.0_linux_64.run. I believe that it might be possible to include CURAND in the PyCUDA core (and hence add dependency on libcurand), but I also believe that dependency on e.g. libcupti should be optional. In such case I would propose changing name from HAVE_LIBRARIES to HAVE_TOOLS and changing patch not to surround CURAND-related code with ifdefs. 2) I have added enum direction_vector_set; currently it has only one value, but it will have more in CUDA 4.0 - so please leave it as is. 3) Although there is ability to call function get_direction_vectors32 and to create object Sobol32* there is no code that joins those two. I am thinking whether this code should be in C or in Python - so for now please just apply patch to curand branch, and after I have good implementation I will send it to the list. 4) Sorry - no documentation for C code yet. Thanks. Best regards.
curand.diff
Description: Binary data

Hello. I attach patch containing code that is supposed to initialise Sobol32 direction vectors. Initially I wanted to implement it myself based on article, but after looking at CUDA 4.0 (and new functions that would also need to be reimplemented) I decided just to call existing function in library. Few remarks about implementation: 1) I have added new option to configure.py and new configuration variable HAVE_LIBRARIES It might not be ideal for CURAND, but I am also thinking about additional libraries that are available in CUDA 4.0 in cudatoolssdk_4.0_linux_64.run. I believe that it might be possible to include CURAND in the PyCUDA core (and hence add dependency on libcurand), but I also believe that dependency on e.g. libcupti should be optional. In such case I would propose changing name from HAVE_LIBRARIES to HAVE_TOOLS and changing patch not to surround CURAND-related code with ifdefs. 2) I have added enum direction_vector_set; currently it has only one value, but it will have more in CUDA 4.0 - so please leave it as is. 3) Although there is ability to call function get_direction_vectors32 and to create object Sobol32* there is no code that joins those two. I am thinking whether this code should be in C or in Python - so for now please just apply patch to curand branch, and after I have good implementation I will send it to the list. Thanks. Best regards.
_______________________________________________ PyCUDA mailing list PyCUDA@tiker.net http://lists.tiker.net/listinfo/pycuda