官术网_书友最值得收藏!

Standard C compiler

Whenever you are running a CUDA application, it will need two compilers: one for GPU code and one for CPU code. The compiler for the GPU code will come with an installation of CUDA toolkit, which will be discussed in the next section. You also need to install a standard C compiler for executing CPU code. There are different C compilers based on the operating systems:

  • On Windows: For all Microsoft Windows editions, it is recommended to use Microsoft Visual Studio C compiler. It comes with Microsoft Visual Studio and can be downloaded from its official website:  https://www.visualstudio.com/downloads/.

The express edition for commercial applications needs to be purchased, but you can use community editions for free in non-commercial applications. For running the CUDA application, install Microsoft Visual Studio with a Microsoft Visual Studio C compiler selected. Different CUDA versions support different Visual Studio editions, so you can refer to the NVIDIA CUDA website for Visual Studio version support.

  • On Linux: Mostly, all Linux distributions come with a standard GNU C Complier (GCC), and hence it can be used to compile CPU code for CUDA applications.
  • On Mac: On the Mac operating system, you can install a GCC compiler by downloading and installing Xcode for macOS. It is freely available and can be downloaded from Apple's website:

  https://developer.apple.com/xcode/

主站蜘蛛池模板: 静安区| 木兰县| 堆龙德庆县| 临澧县| 徐汇区| 通渭县| 财经| 无锡市| 渝北区| 库尔勒市| 海门市| 威信县| 东港市| 南丰县| 罗城| 海门市| 沂水县| 临湘市| 陇西县| 伊通| 兰州市| 华安县| 颍上县| 包头市| 隆德县| 永兴县| 怀集县| 郴州市| 商洛市| 独山县| 扶绥县| 武平县| 民勤县| 建瓯市| 同心县| 诸暨市| 墨玉县| 寿光市| 新兴县| 邯郸县| 清丰县|