reorganize directory

This commit is contained in:
Dakota St. Laurent
2015-06-17 17:05:28 -04:00
parent bd11706eac
commit 835c48d476
4 changed files with 19 additions and 21 deletions

18
example01/README.md Normal file
View File

@@ -0,0 +1,18 @@
# Example 01
This example compares the timings of adding vectors on the CPU versus adding vectors on the GPU, the latter of which has different implementations.
## Compiling
```
clang++ -std=c++0x -framework OpenCL version01.cpp -o version01.out
```
To ignore deprecation warnings, add the flag `-Wno-deprecated-declarations`.
## About
The code runs the following implementations of adding large vectors (131072 elements; 8 * 32 * 512). The vectors are added together 1000 times.
- CPU
- GPU, where 32 * 512 threads are spawned and each thread thus gets 8 elements to calculate
- GPU, same as before but each iteration involves writing the buffers (to demonstrate overhead)
- GPU, where 8 * 32 * 512 threads are spawned - one for each element