stack_dist_calc.cc (11189:4237221d3e31) stack_dist_calc.cc (11321:02e930db812d)
1/*
2 * Copyright (c) 2014-2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 202 unchanged lines hidden (view full) ---

211// the node sums till the root.
212uint64_t
213StackDistCalc::getSum(Node* node, bool from_left, uint64_t sum_from_below,
214 uint64_t stack_dist, uint64_t level) const
215{
216 ++level;
217 // Variable stack_dist is updated only
218 // when arriving from Left.
1/*
2 * Copyright (c) 2014-2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 202 unchanged lines hidden (view full) ---

211// the node sums till the root.
212uint64_t
213StackDistCalc::getSum(Node* node, bool from_left, uint64_t sum_from_below,
214 uint64_t stack_dist, uint64_t level) const
215{
216 ++level;
217 // Variable stack_dist is updated only
218 // when arriving from Left.
219 if(from_left) {
219 if (from_left) {
220 stack_dist += node->sumRight;
221 }
222
223 // Recursively call the getSum operation till the
224 // root node is reached
220 stack_dist += node->sumRight;
221 }
222
223 // Recursively call the getSum operation till the
224 // root node is reached
225 if(node->parent) {
225 if (node->parent) {
226 stack_dist = getSum(node->parent, node->isLeftNode,
227 node->sumLeft + node->sumRight,
228 stack_dist, level);
229 }
230
231 return stack_dist;
232}
233

--- 365 unchanged lines hidden ---
226 stack_dist = getSum(node->parent, node->isLeftNode,
227 node->sumLeft + node->sumRight,
228 stack_dist, level);
229 }
230
231 return stack_dist;
232}
233

--- 365 unchanged lines hidden ---