PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Declaring pinned memory

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



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

PostPosted: Wed Mar 03, 2010 12:35 pm    Post subject: Declaring pinned memory Reply with quote

As I get used to CUDA Fortran, I have a simple question about syntax. Does pinned memory have to be allocatable? That is are:
Code:
real, pinned :: ta(m,np)

and
Code:
real, allocatable, pinned :: ta(:,:)
allocate(ta(m,np))

equivalent? Or do you need the explicit allocate to use pinned memory? (Note: I understand the latter is probably better, no matter what, since you can use the PINNED keyword with it.)
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Mar 03, 2010 12:53 pm    Post subject: Reply with quote

Hi Matt,

Pinned is only effective with allocatables. It's ignored otherwise.

Note that I put in a request last week to have a warning emitted when using the pinned attribute on a non-allocatable.

- 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