Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Kashif Rasul
committed
Jul 31, 2011
0 parents
commit 16b937c
Showing
119 changed files
with
374,583 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# This file is used to ignore files which are generated | ||
# ---------------------------------------------------------------------------- | ||
|
||
*.o | ||
.DS_Store | ||
.svn | ||
|
||
# CMake generated files | ||
Makefile* | ||
CMakeFiles | ||
CMakeCache.txt | ||
cmake_install.cmake | ||
|
||
# Vim temporary files | ||
.*.swp | ||
|
||
# Visual Studio generated files | ||
*.ib_pdb_index | ||
*.idb | ||
*.ilk | ||
*.pdb | ||
*.sln | ||
*.suo | ||
*.sdf | ||
*.vcproj | ||
*vcproj.*.*.user | ||
*.vcxproj | ||
*.vcxproj.user | ||
*.vcxproj.filters | ||
*vcxproj.*.*.user | ||
*.ncb | ||
*.dir | ||
Debug | ||
Release | ||
|
||
# Log files | ||
src/*/*.csv | ||
|
||
# Binaries | ||
# -------- | ||
|
||
bin | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
cmake_minimum_required (VERSION 2.8.5) | ||
|
||
set (CMAKE_MODULE_PATH | ||
"${CMAKE_SOURCE_DIR}/cmake" | ||
${CMAKE_MODULE_PATH} | ||
) | ||
|
||
find_package (CUDA 4.0 REQUIRED) | ||
|
||
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/bin) | ||
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) | ||
set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/lib) | ||
|
||
if(UNIX) | ||
add_definitions(-DUNIX) | ||
endif(UNIX) | ||
|
||
add_subdirectory(cutil) | ||
add_subdirectory(shrutil) | ||
add_subdirectory(src) | ||
|
||
CUDA_BUILD_CLEAN_TARGET() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# CUDA Workshop Projects | ||
|
||
Here is an organized folder to develop CUDA applications which should work unchanged under Mac OS X, Linux or Windows. | ||
|
||
## Configuration | ||
|
||
Install CMake from: | ||
http://cmake.org/cmake/resources/software.html | ||
|
||
Install CUDA 4.0 from: | ||
http://developer.nvidia.com/cuda-downloads | ||
|
||
## Adding a new project | ||
|
||
In the `src/` create a project folder e.g. `matrixMul/` with its source files and create a new `CMakeLists.txt` listing the source files and the libraries to link against e.g.: | ||
|
||
CUDA_ADD_EXECUTABLE(matrixMul | ||
matrixMul.cu | ||
matrixMul_gold.cpp | ||
) | ||
|
||
TARGET_LINK_LIBRARIES(matrixMul | ||
cutil | ||
shrutil | ||
) | ||
|
||
Finally add the `matrixMul` sub-directory to the `src/CMakeLists.txt` file e.g.: | ||
|
||
add_subdirectory (matrixMul) | ||
|
||
## Compiling | ||
|
||
Open a Visual Studio command shell or a terminal in Mac OS X or Linux and go to the top directory and do: | ||
|
||
$ cmake CMakeLists.txt | ||
|
||
Under Windows this should create a Visual Studio project file which you can open, and under Mac OS X or Linux do: | ||
|
||
$ make | ||
|
||
and hopefully the CUDA executable will be compiled in the `bin/` folder. |
Oops, something went wrong.