OpenACC (Using the GNU Compiler Collection (GCC))

### 6.8 OpenACC ¶

OpenACC is an application programming interface (API) that supports offloading of code to accelerator devices. It consists of a set of compiler directives, library routines, and environment variables that influence run-time behavior.

GCC strives to be compatible with the OpenACC Application Programming Interface v2.6.

To enable the processing of OpenACC directives ‘`#pragma acc`’ in C and C++, GCC needs to be invoked with the `-fopenacc` option. This option also arranges for automatic linking of the OpenACC runtime library. See GNU Offloading and Multi Processing Runtime Library.

See Options Controlling OpenMP and OpenACC, for additional options useful with `-fopenacc`.