From ed6aca362fc062052f1fc99fa9150d1b702f6f10 Mon Sep 17 00:00:00 2001 From: dolphin8 Date: Wed, 17 Oct 2018 15:09:28 +0800 Subject: [PATCH] cl_image --- src/framework/cl/cl_image.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/framework/cl/cl_image.h b/src/framework/cl/cl_image.h index f7d86ec853..4c5ce128dd 100644 --- a/src/framework/cl/cl_image.h +++ b/src/framework/cl/cl_image.h @@ -212,10 +212,11 @@ class CLImage { size_t i0 = 0; for (int n = 0; n < N; n++) { for (int c = 0; c < C; c++) { - size_t i1 = i0; + size_t i1 = i0 + (c / 4) * W; for (int h = 0; h < H; h++) { size_t i2 = (i1 << 2) + c % 4; for (int w = 0; w < W; w++) { + // int x = (n * width * H + h * width + (c / 4) * W + w) * 4 + (c % 4); imageData[i2] = Float2Half(*p); i2 += 4; p++; -- GitLab