简体   繁体   English

如何在Nvidia Nsight Eclipse中使用GNU科学库(gsl)

[英]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.

相关问题 在Windows中构建用于VS2015的GSL(GNU科学库) - Building GSL (GNU Scientific Library) in Windows for use with VS2015 GNU科学库(GSL)的多项式曲线拟合 - Polynomial Curve fittings with GNU Scientific Library (GSL) 如何为GSL(GNU Scientific Library)改编C ++风格的随机数引擎? - How to adapt a C++-style random number engine for GSL (GNU Scientific Library)? gnu科学图书馆(GSL)三次多项式结果不一致 - gnu scientific library (GSL) cubic polynomial discrepancy in results 使用GNU Scientific Library(GSL)使用不均匀间隔的点绘制2D B样条曲线路径 - Using GNU Scientific Library (GSL) to draw a 2D B-Spline path using unevenly spaced points 使用GNU Scientific Library(GSL)的C / C ++代码给GNUPlot带来了不同的结果 - 可能的浮点不稳定性? - C/C++ code with GNU Scientific Library (GSL) gives different results to GNUPlot - possible floating point instabilities? Nvidia Nsight-如何连接到本地主机? - Nvidia Nsight - how to connect to localhost? 了解GNU科学图书馆文档 - Understanding GNU Scientific Library documentation 链接到集群上的GNU科学图书馆? - Linking to GNU scientific library on cluster? GNU科学库:gsl_blas_dcopy与gsl_vector_memcpy - GNU scientific lib : gsl_blas_dcopy vs gsl_vector_memcpy
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM