Non-Confidential | PDF version | ARM 100614_0300_00_en | ||

| ||||

Home > Converting Existing Code to OpenCL > Parallel processing techniques in OpenCL > Perform computations with dependencies in multiple-passes |

If your application requires continuous updates of data elements and there are dependencies between them, try breaking the computations into discrete units and perform the computations in multiple stages.

This technique extends the technique that computes values per frame by
splitting computations even more.

Divide the data elements into odd and even fields. This divides
the dependencies so the entire computation can be performed in stages.
The processing alternates between computing the odd then the even
fields.

For example, this technique can be used in neural network
simulation.

The individual neurons are arranged in a three-dimensional
grid. Computing the state for a neuron involves reading inputs from
the surrounding neurons. This means that each neuron has dependencies
on the state of the surrounding neurons.

To execute the simulation, the three-dimensional grid is divided
into layers and executed in the following manner:

- The even node values are read.
- The odd layers are computed and the results stored.
- The odd node values are read.
- The even layers are computed and the results stored.