Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building kd-tree in cuda

For example I have array of (x,y) points and I want to organize them in kd-tree

Building kd-tree includes sorting and computing bounding boxes. These algorithms work fine on CUDA, but is there any way to build kd-tree utilizing as many threads as possible?

I think there should be some tricks:

Usually, kd-tree is implemented with recursion, but as far as I know, CUDA processors don't have hardware stack, so recursion should be avoided.

How can I build kd-tree in Cuda effectively?

like image 582
qutron Avatar asked Apr 04 '11 11:04

qutron


People also ask

What is time complexity of building kd tree?

Because a d-dimensional kd-tree for a set of n points is a binary tree with n leaves, it uses O(n) storage. The construction time is O(n logn).

How do you make a balanced kd tree?

In order to construct a balanced k-d Tree, each node should split the space such that there are an equal number of nodes in the left subspace as the right subspace. Therefore we need to pick the median among the nodes for the current dimension and make it the subroot.

What is KD tree with example?

A K-D Tree(also called as K-Dimensional Tree) is a binary search tree where data in each node is a K-Dimensional point in space. In short, it is a space partitioning(details below) data structure for organizing points in a K-Dimensional space.


1 Answers

You might want to have a look at the following papers:

  • Stackless KD-Tree Traversal for High Performance GPU Ray Tracing

  • Real-Time KD-Tree Construction on Graphics Hardware

They might help you along. Google them and you'll find them available online.

like image 73
Bart Avatar answered Sep 22 '22 12:09

Bart