 
 		__device__ __forceinline__ void processNode(int node_idx)
 		{   
-			int mask = __ballot(node_idx != -1);            
+            __shared__ volatile int  per_warp_buffer[KernelPolicy::WARPS_COUNT];
+
+			int mask = __ballot(node_idx != -1);                        
 
 			while(mask)
 			{                


void pcl::device::OctreeImpl::approxNearestSearch(const Queries& queries, NeighborIndices& results) const
{
    typedef OctreeImpl::PointType PointType;
    typedef pcl::device::appnearest_search::Batch<PointType> BatchType;

    BatchType batch;
    batch.indices = indices;

		if (__all(active == false)) 
			return;

		Warp_appNearestSearch search(batch, query_index);
		search.launch(active); 
	}

