Non-Confidential | ![]() | 101574_0301_00_en | ||
| ||||
Home > Converting existing code to OpenCL > Analyzing code for parallelization > About analyzing code for parallelization |
When you have identified the most compute intensive parts of your application, analyze the code to see if you can run it in parallel.
Parallelizing code can present the following degrees of difficulty:
Parallelizing the code requires complex modifications and the use of techniques to avoid dependencies. You can compute values per frame, perform computations in multiple stages, or pre-compute values to remove dependencies.
If parallelizing the code appears to be impossible, this only means that a particular code implementation cannot be parallelized.
The purpose of code is to perform a function. There might be different algorithms that perform the same function but work in different ways. Some of these might be parallelizable.
Investigate different alternatives to the algorithms and data structures that the code uses. These might make parallelization possible.