     int block = pcl::device::appnearest_search::KernelPolicy::CTA_SIZE;
     int grid = (batch.queries_num + block - 1) / block;    
 
-    cudaSafeCall( cudaFuncSetCacheConfig(pcl::device::appnearest_search::KernelAN<PointType>, cudaFuncCachePreferL1) );
+    cudaSafeCall( cudaFuncSetCacheConfig(pcl::device::appnearest_search::KernelAN, cudaFuncCachePreferL1) );
 
     pcl::device::appnearest_search::KernelAN<<<grid, block>>>(batch);
     cudaSafeCall( cudaGetLastError() );


		}
	};

	template<typename PointType>
	__global__ void KernelAN(const Batch<PointType> batch) 
	{         
		int query_index = blockIdx.x * blockDim.x + threadIdx.x;



		__device__ __forceinline__ void processNode(int node_idx)
		{   
            __shared__ volatile int  per_warp_buffer[KernelPolicy::WARPS_COUNT];

			int mask = __ballot(node_idx != -1);                        

			while(mask)
			{                
