PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Using COLLAPSE clause in PGI Accelerator Model?

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



Joined: 07 Apr 2012
Posts: 29

PostPosted: Tue Aug 07, 2012 6:58 am    Post subject: Using COLLAPSE clause in PGI Accelerator Model? Reply with quote

I know a COLLAPSE clause is present in 12.6. I have a loop nest and I want to collapse two loops, my present code structure:

Code:

!$ACC DO PARALLEL(64) PRIVATE(...)
DO k=k0,k1
   !I want to Collapse i and j
   !$ACC DO PARALLEL(4)
   DO i=i0,i1
      !$ACC DO VECTOR(128)
      DO j=j0,j1
....


I tried using collapse, but noticed that the compiler did not show any messages pertaining to it. Can anyone please show me a short code snippet with it's usage?

Thank you
Sayan
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Tue Aug 07, 2012 9:16 am    Post subject: Reply with quote

Hi Sayan,

Collapse is only part of OpenACC so you'll need to change to the OpenACC syntax. Something like:
Code:

!$ACC PARALLEL VECTOR_LENGTH(128)
!$ACC LOOP COLLAPSE(2) GANG PRIVATE(...)
DO k=k0,k1
   DO i=i0,i1
      !$ACC LOOP VECTOR
      DO j=j0,j1


Hope this helps,
Mat
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 © phpBB Group