CUDA Como fazer CUDA w O CUDA w

































- Slides: 33
CUDA Como fazer?
CUDA w O CUDA? w O Visual C++. w Integração com o Visual C++. w Compilando (Open. GL). w Exemplos de código.
Onde baixar o CUDA? w Link: n http: //www. nvidia. com/object/cuda_get. html
O que baixar?
O que baixar?
O que baixar?
O que baixar?
O Visual C++ w Link: n http: //www. nvidia. com/object/cuda_get. html
Criando o projeto
Criando o projeto
Criando o projeto
Criando o projeto marcar
Criando o projeto marcar
Configurando parâmetros: include
Configurando parâmetros: include
Configurando parâmetros: include
Configurando parâmetros: lib
Configurando parâmetros: lib
Configurando parâmetros: lib
O Visual C++
O Visual C++
Parâmetros de compilação do arquivo “kernel. cu”
Parâmetros de compilação do arquivo “kernel. cu”
Parâmetros de compilação do arquivo “kernel. cu” w Command line: w $(CUDA_BIN_PATH)nvcc. exe -ccbin "$(VCInstall. Dir)bin" -c D_DEBUG -DWIN 32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc, /W 3, /nologo, /Od, /Zi, /RTC 1, /MDd -I"$(CUDA_INC_PATH)" I. / -o $(Configuration. Name)kernel. obj kernel. cu w Outputs: w $(Configuration. Name)kernel. obj
Parâmetros de compilação do arquivo “kernel. cu” w Command line: w $(CUDA_BIN_PATH)nvcc. exe -ccbin "$(VCInstall. Dir)bin" -c D_DEBUG -DWIN 32 -D_CONSOLE -D_MBCS -Xcompiler /EHsc, /W 3, /nologo, /Od, /Zi, /RTC 1, /MDd -I"$(CUDA_INC_PATH)" I. / -o $(Configuration. Name)kernel. obj kernel. cu w Outputs: w $(Configuration. Name)kernel. obj
Parâmetros de compilação do arquivo “kernel. cu”
Parâmetros de compilação do arquivo “kernel. cu” Configurações
Biliotecas utilizadas w CUDA n Includes l l l n vector_types. h cuda_runtime_api. h Libs l l cuda. lib cudart. lib
Biliotecas utilizadas w CUDA com Open. GL n Includes l l l l vector_types. h cuda_runtime_api. h cuda_gl_interop. h glew. h glut. h glu. h –Libs • cuda. lib • cudart. lib • glew 32. lib • glut 32. lib • opengl 32. lib • glu 32. lib
Integração w CUDA com Open. GL n Funções para trabalhar com imagens cuda. GLRegister. Buffer. Object l cuda. GLUnregister. Buffer. Object l cuda. GLMap. Buffer. Object l cuda. GLUnmap. Buffer. Object l
Exemplos
Referências l http: //www. nvidia. com/object/cuda_develop. html w Quickstart guide w Programming guide w reference manual w Toolkit release notes w SDK release notes windows
FIM