2c2
< * Copyright (c) 2016 ARM Limited
---
> * Copyright (c) 2016-2017 ARM Limited
69,74c69
< double getDynamicPower() const {
< return dyn_expr.eval(
< std::bind(&MathExprPowerModel::getStatValue,
< this, std::placeholders::_1)
< );
< }
---
> double getDynamicPower() const { return eval(dyn_expr); }
81,86c76
< double getStaticPower() const {
< return st_expr.eval(
< std::bind(&MathExprPowerModel::getStatValue,
< this, std::placeholders::_1)
< );
< }
---
> double getStaticPower() const { return eval(st_expr); }
101a92,99
> /**
> * Evaluate an expression in the context of this object, fatal if
> * evaluation fails.
> *
> * @param expr Expression to evaluate
> * @return Value of expression.
> */
> double eval(const MathExpr &expr) const;
102a101,109
> /**
> * Evaluate an expression in the context of this object, set
> * failed if evaluation failed.
> *
> * @param expr Expression to evaluate
> * @return Value of expression.
> */
> double tryEval(const MathExpr &expr) const;
>
110a118,121
>
> // Did the expression fail to evaluate (e.g., because a stat value
> // can't be resolved)
> mutable bool failed;