concept OpenACC in category parallel computing

appears as: OpenACC, OpenACC
Parallel and High Performance Computing

This is an excerpt from Manning's book Parallel and High Performance Computing.

We’ll work through some basic examples[1] in OpenACC and OpenMP to give you an idea of how they work. We suggest that you try out the examples on your target system to see what compilers are available and their current status. Many programmers find themselves “on the fence” in regard to which directive-based language, OpenACC or OpenMP, they should use. Often, the choice is clear once you find out what is available on your system of choice. Often, the biggest hurdle to overcome is to start. If you later decide to switch GPU languages, the preliminary work will still prove valuable as the core concepts transcend the language.

#pragma acc parallel loop gang \
    device_type(acc_device_nvidia) vector_length(256) \
    device_type(acc_device_radeon) vector_length(64)
for (int j=0; j<jmax; j++){
      #pragma acc loop vector
      for (int i=0; i<imax; i++){
          <work>
      }
}