A collection of C++ experiments comparing serial execution, OpenMP thread-level parallelism, compiler-assisted SIMD, and hand-written SSE/AVX2 intrinsics.
| Executable | Workload | Implementations compared |
|---|---|---|
variance_benchmark |
Population variance over a large float array | serial, SSE, OpenMP, OpenMP + SIMD, manual SIMD |
watermark_benchmark |
Alpha-blended image watermarking | serial, AVX2, OpenMP, combined variants |
edge_detection_benchmark |
grayscale, Gaussian blur, Sobel X/Y, gradient magnitude | serial, SSE/AVX2, OpenMP, combined variants |
neural_network_benchmark |
two dense matrix stages | serial, AVX2/FMA, OpenMP |
The programs print cycle counts, elapsed time, speedup, and correctness checks where implemented. Image experiments also write their generated images to the ignored results/ directory.
The original report records machine-specific runs rather than portable guarantees:
- In the variance experiment, a larger workload produced roughly
2xspeedup with OpenMP and about5.6xwith the OpenMP + SIMD version. - In some watermark tests, the combined implementation approached
3x; the hand-written OpenMP + SIMD version could underperform the pragma-based version because of thread and implementation overhead. - In the edge-detection experiment, pure SIMD produced approximately
2.3x, OpenMP approximately1.5x, and the manual combined implementation approximately2.1-2.2xrelative to the serial implementation. - The report emphasizes that memory bandwidth, data alignment, workload size, and thread-management overhead strongly affect the results.
- CMake 3.16+
- C++17 compiler with OpenMP
- x86-64 processor with AVX2 and FMA
- OpenCV 4 development libraries
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config ReleaseRun binaries from the repository root so the image programs can find assets/:
./build/variance_benchmark
./build/watermark_benchmark
./build/edge_detection_benchmark
./build/neural_network_benchmarkThe edge-detection executable optionally accepts an input path:
./build/edge_detection_benchmark path/to/image.jpg- Four numbered submission sources were given descriptive filenames.
- Duplicate outputs were collapsed to one representative result image.
- Executables, IDE settings, LaTeX sources, report-build files, and submission archives were excluded.
- Input assets required by the image experiments were retained.
- Benchmarks are sensitive to compiler flags, CPU frequency, cache state, OpenMP runtime, and image size.
- AVX2/FMA requirements make the programs non-portable to older x86 CPUs and non-x86 architectures.
- The experiments allocate large fixed-size arrays; memory and stack behavior may vary by platform.
- No automated numerical-regression suite is included in the original implementation.
docs/report-excerpt.pdf contains a Portfolio-safe results page from the original report; identifying cover content and unrelated report-build sources are excluded.
