A bug of 3_CUDA_Features/cdpQuadtree
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 9.6k
- Forks
- 2.4k
- Avg merge
- 53m
- Merged PRs (30d)
- 1
Description
Running the cdpQuadtree (cuda-samples/Samples/3_CUDA_Features/cdpQuadtree), it will be failed if the num_points is large enough to make any of the Quadtree nodes on max depth be actually used.
The error is resulted from the wrongly computing of max_nodes.
In cuda-samples/Samples/3_CUDA_Features/cdpQuadtree/cdpQuadtree.cu,
the original codes (line 663) are as following,
for (int i = 0, num_nodes_at_level = 1; i < max_depth;
++i, num_nodes_at_level *= 4)
max_nodes += num_nodes_at_level;
Statement " i < max_depth;" should be " i <= max_depth;".
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect cuda-samples/Samples/3_CUDA_Features/cdpQuadtree/cdpQuadtree.cu around line 663 and compare max_nodes calculation with the stated max_depth range. Run the cdpQuadtree sample with enough points to use a node at maximum depth; done means it no longer fails in that case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- hpc
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100