PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

How to get to the second line when the clause is too long?

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
HuWei39533



Joined: 06 Dec 2012
Posts: 7

PostPosted: Fri May 03, 2013 8:15 am    Post subject: How to get to the second line when the clause is too long? Reply with quote

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
View user's profile
TheMatt



Joined: 06 Jul 2009
Posts: 263
Location: Greenbelt, MD

PostPosted: Fri May 03, 2013 10:13 am    Post subject: Re: How to get to the second line when the clause is too lon Reply with quote

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
View user's profile
HuWei39533



Joined: 06 Dec 2012
Posts: 7

PostPosted: Fri May 03, 2013 6:33 pm    Post subject: Re: How to get to the second line when the clause is too lon Reply with quote

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
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
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