Differences between target and target data

Discuss the OpenMP 4.0 Examples document.

Differences between target and target data

Postby guraynet » Mon Nov 18, 2013 12:06 pm

I couldn't understand that what is the difference between target and target data? According to specifications target data create a new data environment. So what is the data environment?
Posts: 2
Joined: Thu Nov 07, 2013 6:42 am

Re: Differences between target and target data

Postby chabachull » Thu Nov 28, 2013 8:17 am

The data environment is the scope in which the variables you specified in the directive is alive and valid on the device.

Basically the difference between a target directive and a target data directive directive is that the code inside the target directive scope is executed on the device, while a target data directive just say that you want some data on the device, and they will remain available only inside the scope of the directive.
Posts: 5
Joined: Mon Jun 17, 2013 3:02 am

Return to OpenMP 4.0 Examples

Who is online

Users browsing this forum: No registered users and 2 guests