SWDEV-515574: Cache Number_Node static value. (#217)
* Cache Number_Node static value. To avoid value overwriting in consecutive dispatch callbacks. * Format. * tests for number_node evaluate. --------- Co-authored-by: Venkateshwar Reddy Kandula <vkandula@amd.com>
This commit is contained in:
committed by
GitHub
parent
b4b81f9095
commit
5cb4ad449f
@@ -767,7 +767,12 @@ EvaluateAST::evaluate(
|
||||
case NONE:
|
||||
case CONSTANT_NODE:
|
||||
case RANGE_NODE: break;
|
||||
case NUMBER_NODE: return &_static_value;
|
||||
case NUMBER_NODE:
|
||||
{
|
||||
cache.emplace_back(std::make_unique<std::vector<rocprofiler_record_counter_t>>());
|
||||
*cache.back() = _static_value;
|
||||
return cache.back().get();
|
||||
}
|
||||
case ADDITION_NODE:
|
||||
return perform_op([](auto& a, auto& b) {
|
||||
return rocprofiler_record_counter_t{
|
||||
|
||||
Reference in New Issue
Block a user