gem5/ext/dsent/libutil/MathUtil.h
Nilay Vaish e8ed7b1d1b ext: add the source code for DSENT
This patch adds a tool called DSENT to the ext/ directory.  DSENT
is a tool that models power and area for on-chip networks.  The next
patch adds a script for using the tool.
2014-10-11 15:02:23 -05:00

22 lines
373 B
C++

#ifndef __MATH_H__
#define __MATH_H__
#include <cmath>
namespace LibUtil
{
class Math
{
public:
static const double epsilon;
static inline bool isEqual(double value1_, double value2_)
{
return (std::fabs(value1_ - value2_) < epsilon);
}
};
} // namespace LibUtil
#endif // __MATH_H__