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.
问问题
982 次
1 回答
1
在快速浏览 CUSP 源代码后,似乎 CUSP 遵循与(甚至使用)Thrust 相同的模型。这些是基于模板的库,仅使用头文件(带有一些#included 内联代码),就像大多数 STL 和 boost 库一样。以 dia_matrix.h 为例。“实现”在 dia_matrix.inl 中,它在 dia_matrix.h 的底部#included。
查看 Thrust 和 CUSP 示例,了解如何在您自己的代码中使用这些库。只需包含正确的头文件并使用它们提供的数据类型即可。CUDA 内核将在编译时为您生成,您无需担心这些细节。
于 2009-11-23T12:51:41.837 回答