Nathan, Thanks for your quick reply. Yes I want scalar() and am not using binning or database. But, I've got compiling error: "scalar was not declared in this scope". I just wonder, where is the definition of scalar()? or, which head file shall I include in order to use scalar()? I found definition of constant() in m5/base/statistics.hh, but couldn't find scalar() anywhere.
I appreciate your help! Jun --- Nathan Binkert <[EMAIL PROTECTED]> wrote: > > Does anybody know how to use regular variables in > formula stat > > (Stats::Formula)? In "Using the Statistics > Package" of M5 documents, it > > says regular variables must be qualified with > constant() or scalar(). > > I've seen examples of constant(), but I could not > find any definition or > > declaration of scalar(). I tried to use regular > variables in formula > > without any cast, It seemed work ok, but I want to > make sure I use it > > correctly. > > constant(foo), stores the value of foo at the time > the formula is defined > and uses that stored value when the formula is > evaluated. scalar(foo) > wraps the variable foo and reads the variable when > the formula is > evaluated. It sounds like you want scalar. > > There are some caveats though. scalar() does not > currently work with > binning or database output. If you're using neither > of those things > (which I'm willing to be you're not), then you're > fine. > > Nathan > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ m5sim-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/m5sim-users
