-
비주얼 스튜디오 2010에서 CUDA C에 인텔리센스 적용하기CUDA 2011. 8. 23. 13:44
First make sure Visual Studio knows .cu files are C/C++ files:
- Open Tools | Options | Projects and Solutions | VC++ Project Settings
- Add “.cu” to the Extensions To Include (VS2010)
Next add the CUDA include path to the project’s VC++ Directories:
- Open the project’s properties dialog
- Select the Configuration Properties | VC++ Directories tab
- Append $(CUDA_INC_PATH) to the list of Include Directories
Then add the CUDA specific keywords to the user defined list:
- Open C:\Users\<USER>\AppData\Local\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\doc\syntax_highlighting\visual_studio_8\usertype.dat (this may be in a hidden AppData folder).
- If usertype.dat isn’t there then try C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\doc\syntax_highlighting\visual_studio_8. (thanks Vlad).
- Create or open the usertype.dat in the same folder as devenv.exe. This is Program Files\Microsoft Visual Studio 10.0\Common7\IDE (or Program Files (x86) on x64 machines. You may have to create this file.
- Copy the contents of the NVIDIA provided file into the one in the devenev.exe folder.
- Restart Visual Studio.
Finally include the right header files in the .cu file:
Typically you should include the following headers:
#include "cuda.h" #include "cuda_runtime.h" #include "device_launch_parameters.h"
'CUDA' 카테고리의 다른 글
Parallel Nsight 사용하여 CUDA 디버깅 하기 (0) 2011.08.24 비주얼 스튜디오 2010 + CUDA 4.0 템플릿 설정하기 (0) 2011.08.23 비주얼스튜디오 2010에 CUDA 문법강조 적용하기 (0) 2011.08.23 CUDA 메모리 구조(3) (0) 2011.04.21 cuda template project (0) 2011.04.20 댓글