XCode 和 CUDA 集成

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1586350/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 18:54:38  来源:igfitidea点击:

XCode and CUDA integration

xcodemacoscuda

提问by Ljdawson

Was just wondering if anyone has any experience working with CUDA and XCode? I'm having a nightmare setting it all up...

只是想知道是否有人有使用 CUDA 和 XCode 的经验?我做噩梦了

Dawson

道森

采纳答案by Sebastian Dressler

I'm working with XCode, CMAKE & CUDA. No problems so far! Works like a charm, though you'll need to make sure, that XCode is using the gcc 4.0 instead of 4.2 (in case of 10.6).

我正在使用 XCode、CMAKE 和 CUDA。到目前为止没有问题!虽然您需要确保 XCode 使用的是 gcc 4.0 而不是 4.2(在 10.6 的情况下),但它的作用就像一个魅力。

I suggest you to also use CMAKE in combination with FindCUDA.cmake for generating the xcode project file. FindCUDA.cmake is here

我建议您也将 CMAKE 与 FindCUDA.cmake 结合使用来生成 xcode 项目文件。FindCUDA.cmake 在这里

There is also a plugin for XCode, making it recognize .cu files, found herein message #29. Also a good "tutorial" is given here, mentioning the plugin.

还有用于XCode的一个插件,使之认识到.CU文件,发现这里在消息中排名第29。也是一个不错的“教程”被赋予在这里,提插件。