|
| View previous topic :: View next topic |
| Author |
Message |
Tuan
Joined: 11 Jun 2009 Posts: 226
|
Posted: Sat Dec 19, 2009 10:05 am Post subject: multiline Accelerate directive |
|
|
What if I have a long Accelerate directive statement, can I split them into 2 lines, I tried to using the ampersand, yet I dont know if the continued line need to be commented or not. I try both cases and it doesn't work
Free-form
| Code: |
!$ACC data region copyin(a, b),
!$ACC copyout(c) &
!$ACC END data region
|
Fixed-form
| Code: |
!$acc data region copyin(a, b),
! x copyout(c)
!$ACC END data region
|
I followed the directive in the manual, with fixed-form format, on the 6th column of the continued line, add an 'x' character; yet i still get an error. I hope you can give me explain for both fixed-form format and free-form source format also.
Tuan |
|
| Back to top |
|
 |
mkcolg
Joined: 30 Jun 2004 Posts: 4996 Location: The Portland Group Inc.
|
Posted: Sat Dec 19, 2009 6:29 pm Post subject: |
|
|
Hi Tuan,
With fixed, you just need to add the "acc". For example:
| Code: | program test
real, dimension(10,10) :: a, b
integer :: i
!$ACC region
!$ACCx copyin(a)
i = 19
a = 1.1
b = 3.0
!$acc end region
end program
|
With free, the '&' needs to be on the line where the line break occurs. For example:
| Code: | program test
real, dimension(10,10) :: a, b
integer :: i
!$ACC region &
!$ACC copyin(a)
i = 19
a = 1.1
b = 3.0
!$acc end region
end program
|
Hope this helps,
Mat |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2002 phpBB Group
|