| View previous topic :: View next topic |
| Author |
Message |
lschneid
Joined: 22 Mar 2013 Posts: 2
|
Posted: Fri Mar 22, 2013 10:34 am Post subject: OpenACC compatibility with std::vector |
|
|
Hi,
at GPU Tech Conf I learnt that PGI has C++ support for OpenACC. A lot of our code uses std::vector. According to the standard std::vector guarantees contiguous memory and in principal it can be used like a C array by means of &v[0].
Can std::vectors be used in acc parallel loop sections and if so how do you address them in acc data clauses as v in the typical e.g. copy(v) would be of type std::vector and not double*.
Or would I have to workaround it locally with double* p = &v[0] if I were not willing to change all std::vectors to C arrays in my code?
Thanks,
Lutz |
|
| Back to top |
|
 |
Deborah Caruso
Joined: 20 Oct 2004 Posts: 43
|
Posted: Fri Mar 22, 2013 12:57 pm Post subject: |
|
|
Lutz-
We do not yet support vectors in OpenACC regions. The "[]" operator may work like
C, but vectors require constructors, destructors, and other functions masquerading
as operators. These functions can not yet be run in OpenAcc regions. You would
have to work around it locally with a C array. |
|
| Back to top |
|
 |
lschneid
Joined: 22 Mar 2013 Posts: 2
|
Posted: Fri Mar 22, 2013 4:37 pm Post subject: |
|
|
Hi Deborah,
thanks for the quick response. Your answer somehow implies that you might support this in the future. In case you have this on your list how would rate the priority (high - medium - low)?
Thanks,
Lutz |
|
| Back to top |
|
 |
Deborah Caruso
Joined: 20 Oct 2004 Posts: 43
|
Posted: Wed Mar 27, 2013 9:36 am Post subject: |
|
|
We are still investigating the technical issues involved in implementing this, and have not
yet added it to our schedule. It does not have high priority. User interest
plays a part in all of this. Please file a bug report/request for enhancement if this
issue is important to you. |
|
| Back to top |
|
 |
|