반응형

http://istqb.tistory.com/350

지금부터는
.cu파일을 열어보면 int float #include 등에 상관없이 모두 검정색 글씨로 되어있는데
이걸 일반C++파일을 열었을 때처럼 파란색/갈색으로 하이라이팅 하는 법입니다.
아래 사진처럼 SDK-C--doc-syntax_highlighting-visual_studio_8 안쪽에 있는 usertype.dat를
비주얼스튜디오가 설치된 폴더의 Common7-IDE에 복사합니다. (비주얼스튜디오버전에 맞는 폴더를 찾아가시면됩니다.)





설치후에 보면~~ 푸른색과 갈색?으로 하이라이팅 된 것을 확인하실 수 있습니다~





이번에는 Visual Assist X (비주얼 어시스트 X)설정 법입니다.
Visual Assist X\AutoText\Latest\Cpp.tpl을 하나 복사해서 이름을 Cu.tpl로 바꿉니다.






시작-실행-regedit 하신다음에 HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet7.0
(자신의 VS버전폴더를찾으시면됩니다.) 에 들어가셔서 ExtHeader와 ExtSource에 각각 .cuh와 .cu를 추가해줍니다.





비주얼 스튜디오를 다시 실행시켜보시면 우왕ㅋ굳ㅋ




http://sigttou.com/category/adventures-in-graphicsland

STEP 5: CONFIGURE VISUAL ASSIST X TO KNOW ABOUT CUDA.

To get full syntax highlighting and include support, we need to tell VAX about our CUDA libraries as well as the fact that it should treat CUDA files as C/C++ files.

Launch VS 2010 and open the Options screen (Tools > Options). Under Projects and Solutions > VC++ Project Settings add the following entries to the Extensions to Include item:

  • .cu
  • .cu.h (or whatever you use for your CUDA headers)

It should look something like this:

Extensions to Include

Now close VS 2010 and open up the registry editor (Start > regedit.exe). Browse to the following folder:

  • HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet10

Now look for the ExtHeader key and add .cu.h to the list. Make sure the whole line ends with a semicolon. It should look something like this:

Regedit ExtHeader

Look a little further down and you should see the ExtSource key. Add .cu to the list in the same way. Again, make sure the line ends with a semicolon.

Regedit Source

Now relaunch VS 2010 and open the VAX options (VAssistX > Visual Assist X Options). Open the Projects group on the left and select C/C++ Directories. Under Platform select Custom. Then, select Stable Include Files from the drop down on the right and add the paths to your CUDA toolkit includes and GPU Computing SDK includes. If you used the default installation directories, these are:

  • C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v3.2\include
  • C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\inc

In other words, your screen should look something like this:

Stable Includes

Now switch the drop down to Source files and add the following paths:

  • C:\Program Files (x86)\NVIDIA GPU Computing Toolkit\CUDA\v3.2\src
  • C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK 3.2\C\common\src

Source Files

Lastly, select the Performance item from the left and click the Rebuild Symbol Databases button.

Rebuild Symbol Databases

You should be good to go now with Visual Assist X and CUDA.

반응형

+ Recent posts