In the fourth article in whitepapers on your resource page you discuss data regions and updatein and updateout compiler directives. You also state that a data region can contain one of more accelerator regions and even another data region.

The example given is only a piece of code and only for Fortran - not c. Please direct me or give me a complete c code example showing the use of a data region(s) before and after and advantages and also show how a data region can contain another data region.

Also show by example the use of updatein and updateout in data regions.

Below is a small example written in C that shows the use of a data region which contains multiple compute regions. It also shows the use of the update directive for transferring data both to the device and from the device.

If I wanted to see the performance without the data region I could take out the lines:

#pragma acc data region copyin(a,b) copy(c,d

#pragma acc update host(c)

#pragma acc update device(c)

Now with these three lines removed (and replaced with blank lines) I can see the program's performance without any data regions by recompiling the modified code and running. I hopefully would recompie with

ta=nvida,time

command line option, then I will see performance of the program without data regions.