ALF is designed to help you to develop robust data parallel problems
and task parallel problems.
The following problem types are well suited to work on ALF:
- Computationally intensive data-parallel problems: The ALF API is
designed to support data-parallel problems with the following characteristics:
- Most of the parallel work focuses on performing operations on a large
data set. The data set is typically organized into a common data structure,
for example, an array of data elements.
- A set of accelerators work collectively on the same data set, however,
each accelerator works on a different partition of the data set. For ALF,
the data set does not have to be regularly partitioned. Any accelerator can
be set to work on any part of the data set.
- The programs on the accelerators usually perform the same task on the
data set.
- Task-parallel problems: The ALF API supports multiple tasks running
on multiple accelerators at the same time. You can divide your application
into subproblems and create one task for each subproblem. The ALF runtime
can then determine the best way to schedule the multiple tasks on the available
accelerators to get the most parallelism.
Certain problems can seem to be inherently serial at first; however, there
might be alternative approaches to divide the problem into subproblems, and
one or all of the subproblems can often be parallelized.
You need to be aware of the physical limitations on the supported platforms. For example, for the Cell BE implementation, the SPE has
the local memory size of 256 KB. If the data set of the problem cannot
be divided into work blocks that fit into local storage, then ALF cannot be
used to solve that problem.