Posts Tagged ‘Visual Studio’

Install CUDA Tool kit and SDK in you PC.
open your project containing the CUDA files
Set CUDA build Rules to your project.
Right Click on the .cu file
Select properties.
Under Configuration properties, select CUDA BUILD Rule v *.*.*
Under CUDA BUILD Rule v *.*.*, Select
General
Generate Debug Information – Yes (-D_DEBUG)
Emulation Mode – Yes (-deviceemu -D_DEVICEEMU)
Optimization – Disabled (/Od)
Hybrid CUDA/C++ options
RunTime Library – Multi-Threaded Debug (/MTd)

After debugging completed then change the options as
General
Generate Debug Information – No
Emulation Mode – No
Optimization – Maximize Speed (/O2)
Hybrid CUDA/C++ options
RunTime Library – Multi-Threaded (/MT)

Right Click on the .cu file in the project in Solution explorer
Select properties
In Configuration properties, Click General. In the Tool column it displays as Cuda build Rule v*.*.*
Below General you can see Cuda Build Rule v*.*.* and its options
Also it can be checked by selecting the project properties.
ie,Right click on the project.
Selct properties
Under Configuration properties (in the last), CUDA Build Rule v*.*.* can be seen

Open Visual Studio project
Add .cu file to the project
Right Click on the project.
Select custom build rules.
Select CUDA Build Rule v*.*.*
Click OK.
Now build the project.

NB: Do not forget to add the required header files and lib files to project. Also add the path of the included header files and lib files to the project as normal Visual Studio project.

The method by which you make Visual Assist X active on C/C++ files with a different extension varies by IDE.

For VS2010, VS2008, VS2005 and VS.NET:

Add your extension to:
Tools | Options | Projects | VC++ Build | C/C++ File Extensions (VS.NET)
Tools | Options | Projects and Solutions | VC++ Project Settings | C/C++ File Extensions (VS2005, VS2008)
Tools | Options | Projects and Solutions | VC++ Project Settings | Extensions To Include (VS2010)

Exit the IDE and use regedit to clone the following entry to a like entry that ends in your extension:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\8.0\Languages\File Extensions\.cpp

If you are using a 64bit OS then clone the registry key:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\8.0\Languages\File Extensions\.cpp

If your extension denotes a header, use regedit to add the extension to ExtHeader in the following location. Remember to include the dot and terminating semicolon:

HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet8

If your extension denotes a source file that is not a header, add the extension to ExtSource in the following location.

HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VANet8

Press Rebuild on the Performance tab of the Visual Assist X options dialog and restart your IDE.

Replace 8.0 with 10.0 if you use VS 2010.
Replace 8.0 with 9.0 if you use VS 2008.
Replace 8.0 with 7.1 if you use VS.NET 2003.
Replace 8.0 with 7.0 if you use VS.NET 2002.

Replace VANet8 with VANet10 for Visual Studio 2010.
Replace VANet8 with VSNet9 if you use VS2008.
Replace VANet8 with VSNet if you use VS.NET 2003.
Replace VANet8 with VANet7.0 if you use VS.NET 2002.

For VC++ 6.0:

Exit your IDE and use regedit to add the extension to:

HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++\FileExtensions.

If your extension denotes a header, use regedit to add the extension to ExtHeader in the following location. Remember to include the dot and terminating semicolon:

HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VA6

If your extension denotes a source file that is not a header, add the extension to ExtSource in the following location.Remember to include the dot and terminating semicolon:

HKEY_CURRENT_USER\Software\Whole Tomato\Visual Assist X\VA6

Press Rebuild on the Performance tab of the Visual Assist X options dialog and restart your IDE.