mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-02-09 01:29:57 +00:00
550.40.07
This commit is contained in:
@@ -145,11 +145,14 @@ static size_t uvm_perf_tree_iter_leaf_to_index_in_level(const uvm_perf_tree_t *t
|
||||
}
|
||||
|
||||
// Computes the number of nodes in the given level
|
||||
static size_t uvm_perf_tree_level_node_count(const uvm_perf_tree_t *tree, size_t level_idx)
|
||||
static size_t uvm_perf_tree_level_node_count(const uvm_perf_tree_t *tree, s8 level_idx)
|
||||
{
|
||||
size_t level_pow2_node_count;
|
||||
size_t level_missing_nodes_to_pow2;
|
||||
|
||||
if ((level_idx < 0) || (level_idx >= tree->level_count))
|
||||
return 0;
|
||||
|
||||
level_pow2_node_count = (size_t)1 << level_idx;
|
||||
level_missing_nodes_to_pow2 = (tree->pow2_leaf_count - tree->leaf_count) >> ((tree->level_count - 1) - level_idx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user