From 5a2a5679708c098a9d9d5973bc485f2e3c35c61d Mon Sep 17 00:00:00 2001 From: AlexeyAB Date: Wed, 17 Jan 2018 12:56:51 +0300 Subject: [PATCH] Fixed wait_stream flag, for compilation without GPU --- src/yolo_v2_class.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp index f509d21d..518ea654 100644 --- a/src/yolo_v2_class.cpp +++ b/src/yolo_v2_class.cpp @@ -180,11 +180,12 @@ YOLODLL_API std::vector Detector::detect(image_t img, float thresh, bool cudaGetDevice(&old_gpu_index); if(cur_gpu_id != old_gpu_index) cudaSetDevice(net.gpu_index); + + net.wait_stream = wait_stream; // 1 - wait CUDA-stream, 0 - not to wait #endif //std::cout << "net.gpu_index = " << net.gpu_index << std::endl; //float nms = .4; - net.wait_stream = wait_stream; // 1 - wait CUDA-stream, 0 - not to wait image im; im.c = img.c;