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

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/

主站蜘蛛池模板: 金堂县| 襄汾县| 云梦县| 德保县| 开封县| 拉萨市| 池州市| 疏附县| 韶关市| 咸宁市| 梨树县| 惠水县| 荃湾区| 绥滨县| 确山县| 思南县| 太仆寺旗| 江川县| 怀柔区| 乌拉特后旗| 上林县| 聂拉木县| 左权县| 沈阳市| 喀喇沁旗| 泗阳县| 霍山县| 邵东县| 明星| 资阳市| 福鼎市| 江山市| 嘉鱼县| 平凉市| 仁化县| 望谟县| 承德市| 东明县| 临安市| 重庆市| 玉屏|