From edbccdfcaf46f11e631afe98796f3e6e170da5d0 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Sun, 26 Oct 2014 05:04:34 +0000
Subject: [PATCH] Maybe something changed?

---
 src/col2im.cl |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/col2im.cl b/src/col2im.cl
index 00d8f83..38d7af3 100644
--- a/src/col2im.cl
+++ b/src/col2im.cl
@@ -23,11 +23,11 @@
 
     int w_start = (w<ksize)?0:(w-ksize)/stride + 1;
     int w_end = w/stride + 1;
-    if(width_col < w_end) w_end = width_col;
+    w_end = (width_col < w_end) ? width_col : w_end;
 
     int h_start = (h<ksize)?0:(h-ksize)/stride+1;
     int h_end = h/stride + 1;
-    if(height_col < h_end) h_end = height_col;
+    h_end = (height_col < h_end) ? height_col : h_end;
 
     int rows = channels * ksize * ksize;
     int cols = height_col*width_col;

--
Gitblit v1.10.0