need to make kdtree work in cuda