     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() );

				int end = *warp_buffer;

				float3 active_query;
				volatile float* warp_buffer_float = (float*)&storage.per_warp_buffer[warpId];

				//broadcast warp_query
				if (active_lane == laneId)

#include "utils/boxutils.hpp"
#include "utils/scan_block.hpp"


namespace pcl { namespace device { namespace appnearest_search
{   
    typedef OctreeImpl::PointType PointType;
	
	struct Batch
	{   
		const PointType* queries;

		const int *indices;
