| View previous topic :: View next topic |
| Author |
Message |
HuWei39533
Joined: 06 Dec 2012 Posts: 7
|
Posted: Fri May 03, 2013 8:15 am Post subject: How to get to the second line when the clause is too long? |
|
|
How to get to the second line when the clause after !$acc is too long?
when I use & at the end of the first line ,the compiler tell me the second line is Illegal continuation line.
This is my code:
!$acc kernels loop &
copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec))
my compiler is PGI visual fortran
thank you very much |
|
| Back to top |
|
 |
TheMatt
Joined: 06 Jul 2009 Posts: 263 Location: Greenbelt, MD
|
Posted: Fri May 03, 2013 10:13 am Post subject: Re: How to get to the second line when the clause is too lon |
|
|
| HuWei39533 wrote: | How to get to the second line when the clause after !$acc is too long?
when I use & at the end of the first line ,the compiler tell me the second line is Illegal continuation line.
This is my code:
!$acc kernels loop &
copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec))
my compiler is PGI visual fortran
thank you very much |
I think there are a couple ways:
| Code: | !$acc kernels loop &
!$acc copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec)) |
or you can do this:
| Code: | !$acc kernels loop &
!$acc& copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec)) |
The standard seems to accept either. |
|
| Back to top |
|
 |
HuWei39533
Joined: 06 Dec 2012 Posts: 7
|
Posted: Fri May 03, 2013 6:33 pm Post subject: Re: How to get to the second line when the clause is too lon |
|
|
| TheMatt wrote: | | HuWei39533 wrote: | How to get to the second line when the clause after !$acc is too long?
when I use & at the end of the first line ,the compiler tell me the second line is Illegal continuation line.
This is my code:
!$acc kernels loop &
copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec))
my compiler is PGI visual fortran
thank you very much |
I think there are a couple ways:
| Code: | !$acc kernels loop &
!$acc copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec)) |
or you can do this:
| Code: | !$acc kernels loop &
!$acc& copyin (x(offs(i)+1:offs(i)+nsec),y(offs(i)+1:offs(i)+nsec)) |
The standard seems to accept either. |
Thanks very much! No errors now |
|
| Back to top |
|
 |
|