2013년 8월 26일 월요일

openCL VS2010 Project


1. Add CUDA include directory
Project properties > General > C/C++ > General > Additional Include Directory > Edit
then add
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include

2. Add OpenCL Libs
Project properties > linker > input > addtional dependency
then add
OpenCL.lib

3. 4. Add OpenCL Lib Path
Project properties > linker > general > additional library directory
then add
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\lib\Win32

In CUDA toolkit, opecCL path is same with CUDA path
When you write include header in source, add just CL path
For example

#include <CL/cl.h>

2013년 8월 25일 일요일

CUDA VS2010 project setup


After new VS 2010 project ,
It needs to add CUDA related enviroment setup

1. ADD CUTA in specifying custom build tools
 Right Click project file then select "specifying custom build tools"
Check CUDA 5.0 , Press OK














2. Add CUDA include directory
Project properties > General > C/C++ > General > Additional Include Directory > Edit
then add
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v5.0\include

3. Add CUDA Libs
Project properties > linker > input > addtional dependency
then add
cuda.lib;cudart.lib

4. Add CUDA Lib Path
Project properties > linker > general > additional library directory
then add
$(CudaToolkitLibDir)

Now We can write down basic CUDA API in program.