Michael Wolfe on OpenACC Kernels and Parallel Constructs

Print Friendly, PDF & Email

Michael Wolfe from The Portland Group writes that OpenACC kernel constructs and parallel constructs are two ways to solve the same problem: identifying loop parallelism and mapping it to the machine parallelism.

The kernels construct is more implicit, giving the compiler more freedom to find and map parallelism according to the requirements of the target accelerator. The parallel construct is more explicit, and requires more analysis by the programmer to determine when it is legal and appropriate. Both constructs allow for automatic vectorization within the loops. The actual behavior may depend on the compiler you are using.

Wolfe provides a number of code examples in this feature to show how the constructs work. Read the Full Story.