From 5a2a5679708c098a9d9d5973bc485f2e3c35c61d Mon Sep 17 00:00:00 2001
From: AlexeyAB <alexeyab84@gmail.com>
Date: Wed, 17 Jan 2018 09:56:51 +0000
Subject: [PATCH] Fixed wait_stream flag, for compilation without GPU

---
 src/yolo_v2_class.cpp |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/yolo_v2_class.cpp b/src/yolo_v2_class.cpp
index f509d21..518ea65 100644
--- a/src/yolo_v2_class.cpp
+++ b/src/yolo_v2_class.cpp
@@ -180,11 +180,12 @@
 	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;

--
Gitblit v1.10.0