Chapter 20

OpenMP Versus OpenCL

Difference in Performance?

Julia Fedorova; Sergei Vinogradov; Dmitry Prohorov    Intel Corporation, Russia

Abstract

This chapter compares OpenMP and OpenCL, which offer different constructs for describing data parallelism, with the question of whether one has an advantage over the other in the performance. A set of benchmarks is examined that initially show an advantage for OpenCL over OpenMP due to the optimization in the OpenCL code and algorithms, which were not present in naive OpenMP versions. OpenMP was slightly faster once these were corrected in these benchmarks. Also, a set of performance improvements are discussed that were found to be common for all workloads: use of local memory to achieve better ...

Get High Performance Parallelism Pearls Volume Two now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.