This project implements and benchmarks three parallelization strategies for a computationally intensive image processing pipeline (Gaussian blur + Sobel edge detection):
- Sequential Baseline - Single-threaded reference implementation
- CPU Multi-threading - OpenMP with block, tiled, and SIMD decompositions
- GPU Acceleration - CUDA with shared memory optimization
src/- source code for sequential, OpenMP, and CUDA pipelinesinclude/- shared headers and pipeline declarationsdatasets/input/- input image data for experimentsdatasets/output/- generated output images and intermediate databuild/- local build artifacts created by CMakeresults/- benchmark CSV and summary filesplots_*/- generated performance plotsreport_*/- generated analysis reports and visualizationsscripts/- helper scripts for plotting and profiling
- Input datasets are stored in
datasets/input/. - Processed images and benchmark outputs are written to
datasets/output/or the generated report directories. - This repository tracks the source code, while generated artifacts such as build files, temporary
.ppmfiles, benchmark plots, and report outputs are ignored by.gitignore.
The full report output is saved under directories named report_<timestamp>/.
Each report directory typically contains:
report.html- human-readable benchmark summary and analysissummary.txt- plain-text performance summaryperformance_data.txt- raw performance measurementsimages/- sample output images from the pipelineplots/- generated benchmarking plots and charts
- Build the project with CMake or
make. - Run the sequential, OpenMP, or CUDA pipeline targets.
- Use
generate_report.shto produce the report and plots. - Inspect generated results in
report_<timestamp>/andresults/.
A sample demo was run using the repository inputs and generated output images plus a full report.
- Input images used:
datasets/input/4k.jpgdatasets/input/8k.jpgdatasets/input/test_4k.ppmdatasets/input/test_8k.ppm
- Generated output images:
datasets/output/4k_seq.jpgdatasets/output/4k_cuda.jpgdatasets/output/4k_omp_16.jpgdatasets/output/8k_seq.jpgdatasets/output/8k_cuda.jpgdatasets/output/8k_omp_16.jpg
- Result image examples from the report:
report_20260620_153314/images/4k_cuda.jpgreport_20260620_153314/images/8k_cuda.jpg
The demo produced a full report in report_20260620_153314/, including:
report_20260620_153314/report.htmlreport_20260620_153314/summary.txtreport_20260620_153314/performance_data.txtreport_20260620_153314/images/report_20260620_153314/plots/
A selection of generated images and plots was copied into output/ for easier review:
output/4k_cuda.jpgoutput/8k_cuda.jpgoutput/4k_omp_16.jpgoutput/8k_omp_16.jpgoutput/test.jpgoutput/cpu_vs_gpu.pngoutput/efficiency_heatmap.pngoutput/execution_time.pngoutput/speedup_comparison.pngoutput/strong_scaling.png
The sample run showed strong acceleration from the parallel versions:
- CUDA speedup: 4.17x for 8K input, 1.24x for 4K input
- Best OpenMP speedup: 4.98x with 32 threads (8K), 4.79x with 32 threads (4K)
- OpenMP (16 threads) speedup: 4.35x (8K) and 3.84x (4K)