From af4e4f92dc9e5da160eb6c6870a7b38b863f1c6c Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Tue, 28 Oct 2014 02:45:06 +0000
Subject: [PATCH] getting rid of sub_arrays, nvidia driver memory leak
---
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