PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Uninitialized variables

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
andreasm



Joined: 09 Mar 2006
Posts: 8

PostPosted: Thu Mar 09, 2006 6:42 am    Post subject: Uninitialized variables Reply with quote

Hello,

is there any flag for the pgf90 compiler that ensures that in the case of uninitialized varibales the variable is initialized with 0 instead with anything?

Cheers,
Andreas
Back to top
View user's profile
mkcolg



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

PostPosted: Thu Mar 09, 2006 8:54 am    Post subject: Reply with quote

Hi Andreas,

"-Msave" applies the SAVE attribute to all local varaibles and has the side effect of intializing the variables to zero. However, this approach can cause some performance slow-downs.

-Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling 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