OpenACC Directives for Data Movement

 

Summary

The powerful OpenACC data directive allows you to control the movement of data in an application, with the purpose of improving performance. In this article, I looked at five data directive “clauses” – copy, copyin, copyout, create, and present – that give you great control over moving data between the host and the accelerator and give the compiler some hints as to what is going on in the code so it can generate better data movement (and, therefore, better performance).

With the two OpenACC directives discussed so far – parallel loop and data (along with its clauses) – you have the basics for getting started writing code using OpenACC.