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

Re: Differences between target and target data

Postby andrewdiaz » Mon Sep 21, 2015 4:07 am

In simple words, data environment is that where you can use the value. For example, if you make it public, then it can be used anywhere. If you make it private, then you can use it only that specified area.

target and target data are different in terms of values. Suppose you access target value. This value denotes the address of the location. But, the target data denotes the actual value located in that address.

I hope you are clear now.
Posts: 1
Joined: Fri Sep 18, 2015 2:33 am

Return to OpenMP 4.0 Examples

Who is online

Users browsing this forum: No registered users and 1 guest