Finding the scope of the use of OpenCL

Given an algorithm or even some sequential implementation of it, how do we determine whether OpenCL would really help in performance gain? First, find hotspots in your sequential code. If that hot part can be partitioned into smaller parts which can be executed at least to some extent independently, that is, one smaller computation part can be done without waiting for data of previous computation part? Can we find some part of the algorithm where the same instruction is executed on different data without any mutual dependency? Affirmative answer to the first and second part of questions respectively asserts the existence of task and data parallel components in the algorithm. In either case, taking advantage ...

Get OpenCL Programming by Example 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.