Introduction to Parallel Programming class code
These instructions are for OS X 10.9 "Mavericks".
-
Step 1. Build and install OpenCV. The best way to do this is with Homebrew. However, you must slightly alter the Homebrew OpenCV installation; you must build it with libstdc++ (instead of the default libc++) so that it will properly link against the nVidia CUDA dev kit. This entry in the Udacity discussion forums describes exactly how to build a compatible OpenCV.
-
Step 2. You can now create 10.9-compatible makefiles, which will allow you to build and run your homework on your own machine:
mkdir build
cd build
cmake ..
make
Note that it needs to be compiled with cuda 12.6. Otherwise the cuda kernel is not launched => I haven't figured out why
Here is an example for Lesson 2 Code Snippet
nvcc -lineinfo hello_blockIdx.cu -o example1.exe
./example1.exe
PS1
./../bin/HW1 /home/zhengwang/repositories/intro_to_parallel_programming/Problem_Sets/Problem_Set_1/cinque_terre_small.jpg test_HW1.jpg
./../bin/HW2 /home/zhengwang/repositories/intro_to_parallel_programming/Problem_Sets/Problem_Set_2/cinque_terre_small.jpg test_hw2.jpg
./../bin/HW3 /home/zhengwang/repositories/intro_to_parallel_programming/Problem_Sets/Problem_Set_3/memorial_raw.png test_hw3.jpg
./../bin/HW4 /home/zhengwang/repositories/intro_to_parallel_programming/Problem_Sets/Problem_Set_4/red_eye_effect_5.jpg /home/zhengwang/repositories/intro_to_parallel_programming/Problem_Sets/Problem_Set_4/red_eye_effect_template_5.jpg test_hw4.jpg
./../bin/HW5