Commit 454f9c52 authored by Peter Eastman's avatar Peter Eastman
Browse files

Minor optimization to evaluating custom expressions

parent c799ea08
......@@ -216,7 +216,7 @@ void OpenCLExpressionUtilities::processExpression(stringstream& out, const Expre
break;
}
case Operation::RECIPROCAL:
out << "1.0f/" << getTempName(node.getChildren()[0], temps);
out << "RECIP(" << getTempName(node.getChildren()[0], temps) << ")";
break;
case Operation::ADD_CONSTANT:
out << doubleToString(dynamic_cast<const Operation::AddConstant*>(&node.getOperation())->getValue()) << "+" << getTempName(node.getChildren()[0], temps);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment