Hi Victor, I have no idea if this will work, but have you tried using a lambda function with whatever captures (e.g., [this]) that you need?
Cheers, Jason On Tue, Feb 11, 2020 at 6:53 PM Victor Kariofillis <[email protected]> wrote: > Hi, > > I have created a stat of type Value called zeroBytesPercentage. It is the > percentage of zero bytes of all the lines that are written in the LLC. I > want it to get a value from a function (calcZeroBytesPercentage), so I'm > using functor. > > zeroBytesPercentage > .functor(calcZeroBytesPercentage) > .flags(total) > .precision(3) > ; > > Throughout the program execution I'm populating a vector called > totalLines, which I've declared as public in BaseCache. This vector stores > all the cache lines that are written to the LLC during the execution of the > program. > > My problem is that the function is not static and that it uses non-static > variables (the totalLines vector). I've tried having the function as a > member of either BaseCache or BaseCache::CacheStats, but either way I'm > getting errors about the use of non-static data members. > > How can I do this calculation at the end of the execution and be able to > access variables that are non-static? > _______________________________________________ > gem5-users mailing list > [email protected] > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
_______________________________________________ gem5-users mailing list [email protected] http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
