14 #ifndef __UT_Counter__
15 #define __UT_Counter__
35 if (myPeak.load() > 0)
41 printf(
"%s: %s [%s peak, %s increments]\n",
49 myMessage = m.myMessage;
50 myCount.relaxedStore(m.myCount.relaxedLoad());
51 myPeak.relaxedStore(m.myPeak.relaxedLoad());
52 myIncrements.relaxedStore(m.myIncrements.relaxedLoad());
58 myMessage = m.myMessage;
59 myCount.relaxedStore(m.myCount.relaxedLoad());
60 myPeak.relaxedStore(m.myPeak.relaxedLoad());
61 myIncrements.relaxedStore(m.myIncrements.relaxedLoad());
73 myPeak.maximum(myCount.add(v));
81 void reset() { myCount.store(0,
83 exint peak()
const {
return myPeak.
load(); }
85 exint increments()
const {
return myIncrements.load(); }
91 const char *myMessage;
auto printf(const S &fmt, const T &...args) -> int
void itoaPretty(int64 val)
bool load(UT_IStream &is)
Load string from stream. Use is.eof() to check eof status.
const char * buffer() const
OIIO_FORCEINLINE const vint4 & operator+=(vint4 &a, const vint4 &b)
UT_Counter & operator-=(int)
UT_Counter & operator++(int)
Any reordering the compiler or hardware chooses to do is okay.
UT_Counter & operator--(int)
UT_Counter & operator+=(int)
LeafData & operator=(const LeafData &)=delete
ImageBuf OIIO_API max(Image_or_Const A, Image_or_Const B, ROI roi={}, int nthreads=0)
OIIO_FORCEINLINE const vint4 & operator-=(vint4 &a, const vint4 &b)