[英]How to use the GNU scientific library (gsl) in nvidia Nsight eclipse
I would like to use some gsl functions in my CUDA code. 我想在我的CUDA代码中使用一些gsl函数。 (in Nsight eclipse on linux) I have installed gsl and now I should setup the linker setting in eclipse.
(在Linux上的Nsight eclipse中)我已经安装了gsl,现在应该在eclipse中设置链接器设置。
I have tried to follow the steps outlined here , but I have some issues. 我尝试按照此处概述的步骤进行操作,但是存在一些问题。 In the project properties there is no "C/C++ Build" menu only "Build" and I was not able to find the setting mentioned in the above blog post.
在项目属性中,没有“ C / C ++ Build”菜单,只有“ Build”菜单,我无法找到上述博客文章中提到的设置。
How can I setup the linker settings ? 如何设置链接器设置?
Thanks in advance! 提前致谢!
You won't be able to use gsl routines directly in CUDA device code. 您将无法直接在CUDA设备代码中使用gsl例程。 The gsl libraries (
-lgsl
) are compiled for x86 usage and will not run on a GPU. gsl库(
-lgsl
)是为x86使用而编译的,不会在GPU上运行。
If you only want to use gsl routines in host code, it should be sufficient to simply specify the include file and path, the linker path, and the linker library: 如果只想在主机代码中使用gsl例程,只需指定包含文件和路径,链接器路径和链接器库就足够了:
-I/usr/local/include/gsl
-L/usr/local/lib (or /usr/local/lib64)
-lgsl
Here's a question/answer discussing how to make these kind of additions in nsight eclipse 这是一个讨论如何在nsight eclipse中进行此类添加的问题/答案
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.