This coursera-heterogeneous project provides offline resources to work on the assignments of Heterogenous Parallel Programming course from Coursera. This is a collaborative effort by the students of the course and you are welcome to contribute to improve it.
Files available include:
wb.h
)mp0.cu
, mp1.cu
, ...)GenDataMP1.cpp
, GenDataMP2.cpp
, ...)All of this works only if you have access to CUDA hardware or an OpenCL installation.
wb.h
header in the same directory as your CUDA source file (mp1.cu
for example)Make sure you have Xcode (and/or the Command Line Tools) and CMake installed (CMake is a cross-platform, open-source build system). The preferred method of obtaining CMake is from Homebrew via: brew update && brew install cmake
brew update && brew install cmake
)Initial setup:
CL_DEVICE_TYPE_CPU
selected during development)nvcc
cmake CMakeLists.txt -G Xcode
To run each assignment:
sudo apt-get install cmake
sudo yum install cmake
Initial setup:
cmake CMakeLists.txt
To run each assignment:
make mp<N>
, where <N>
is that assignment's number
make mp2
./mp<N> tests/mp<N>/<D>/*
, where <N>
is a homework number and <D>
is a data set number
./mp2 tests/mp2/0/*
You can also test each assignment against the official datasets
using CMake's ctest
:
ctest -V
ctest -L mp2 -V
You can view all of the information presented during the testing phase in the folder Testing/Temporary/LastTest.log
We welcome improvements to this code. Simply fork it, make your change, and initiate a pull request! (Please follow the coding conventions already in use in the source files).
All the files in this project are shared under the MIT License.
Copyright (C) 2012 Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.