From e36182cd8c5dd5c6d0aa1f77cf5cdca87e8bb1f0 Mon Sep 17 00:00:00 2001
From: Joseph Redmon <pjreddie@gmail.com>
Date: Fri, 21 Nov 2014 23:35:19 +0000
Subject: [PATCH] cleaned up data parsing a lot. probably nothing broken?

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

diff --git a/src/axpy.cl b/src/axpy.cl
index 394d897..901a826 100644
--- a/src/axpy.cl
+++ b/src/axpy.cl
@@ -1,7 +1,7 @@
-__kernel void axpy(int N, float ALPHA, __global float *X, int INCX, __global float *Y, int INCY)
+__kernel void axpy(int N, float ALPHA, __global float *X, int OFFX, int INCX, __global float *Y, int OFFY, int INCY)
 {
     int i = get_global_id(0);
-    Y[i*INCY] += ALPHA*X[i*INCX];
+    Y[OFFY+i*INCY] += ALPHA*X[OFFX+i*INCX];
 }
 
 __kernel void scal(int N, float ALPHA, __global float *X, int INCX)
@@ -10,9 +10,9 @@
     X[i*INCX] *= ALPHA;
 }
 
-__kernel void copy(int N, __global float *X, int INCX, __global float *Y, int INCY)
+__kernel void copy(int N, __global float *X, int OFFX, int INCX, __global float *Y, int OFFY, int INCY)
 {
     int i = get_global_id(0);
-    Y[i*INCY] = X[i*INCX];
+    Y[i*INCY + OFFY] = X[i*INCX + OFFX];
 }
 

--
Gitblit v1.10.0