diff --git a/GPU_version/vio/src/cl_class.cpp b/GPU_version/vio/src/cl_class.cpp index c3af6a1..0a0b5a3 100644 --- a/GPU_version/vio/src/cl_class.cpp +++ b/GPU_version/vio/src/cl_class.cpp @@ -13,7 +13,7 @@ opencl::opencl(vk::AbstractCamera* cam):cam(cam) { std::vector all_devices; for(auto i:all_platforms){ std::cout << "Find platform number:"<< i.getInfo() << "\n"; - i.getDevices(CL_DEVICE_TYPE_GPU, &all_devices); + i.getDevices(CL_DEVICE_TYPE_CPU, &all_devices); } if (all_devices.size() == 0){ diff --git a/GPU_version/vio/src/frame_handler_mono.cpp b/GPU_version/vio/src/frame_handler_mono.cpp index 430f051..ff44ab1 100644 --- a/GPU_version/vio/src/frame_handler_mono.cpp +++ b/GPU_version/vio/src/frame_handler_mono.cpp @@ -61,8 +61,8 @@ FrameHandlerMono::FrameHandlerMono(vk::AbstractCamera* cam,Eigen::Matrixwrite_buf(1,8,9*300,H); cl_float3 J[300]; gpu_fast_->write_buf(1,9,300,J); - float chi2[1]={0.01}; - gpu_fast_->write_buf(1,10,1,chi2); + float chi2[300]={0.01}; + gpu_fast_->write_buf(1,10,300,chi2); klt_homography_init_=new initialization::KltHomographyInit(gpu_fast_); initialize(); }