tags:

views:

403

answers:

1
+1  Q: 

Using CUDA Kernels

I'm interested in using CUSP library for CUDA (available here). However, I'm either having trouble getting this library to work with my application linking with CUDA and/or CUBLAS static libraries. I'm assuming from glancing through the header and source files that I either use the kernels by building the related files as a static library file (using nvcc compiler) to be used in my application (which is built using MS Visual Studio compiler), or use the kernels directly in my application (which I don't know how it's going to work out). The CUSP library also uses METIS library as well, which I also have trouble figuring out how to install it in Windows. What would be your suggestions on the best way of using CUSP features in my application? Thanks in advance.

+1  A: 

After a quick look through the CUSP source, it seems that CUSP follows the same model as (and even makes use of) Thrust. These are template-based libraries that only make use of header files (with some #included inline code), like most of the STL and boost libraries. Take dia_matrix.h for example. The 'implementation' is in dia_matrix.inl, which is #included at the bottom of dia_matrix.h.

Take a look at the Thrust and CUSP examples for how to use these libraries in your own code. It should be nothing more than a matter of including the correct header files and working with the data types they provide. The CUDA kernels will be generated at compile time for you and you shouldn't need to worry about those details.

Eric