gpu-kdtree (imported as gputree)
Copyright 2026 Asier Lambarri

gpu-kdtree is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License version 3, as published by the
Free Software Foundation (see LICENSE). It is distributed in the hope that it
will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Third-party code
----------------

cudaKDTree, https://github.com/ingowald/cudaKDTree
Copyright 2022-2023 Ingo Wald
Licensed under the Apache License, Version 2.0 (see LICENSES/Apache-2.0.txt).

The tree walks and result objects in src/gputree/_stack_search.py are ported
from cudaKDTree's stack-based traversal (traverse_default), its stack-free
traversal (traverse_stack_free), its closest-corner tracking traversal
(traverse_cct), and its closest-point and k-nearest candidate lists
(FCPResult, FlexHeapCandidateList). They were translated from CUDA C++ to
Numba and changed: they run on gputree's own box tree, return original
indices, squared distances and radius results, and the device functions in
src/gputree/_device_functions.py build on them.
