From ed315dfeb3a2b63be8d77dd8aa262289a6a96273 Mon Sep 17 00:00:00 2001 From: miha-q <> Date: Sun, 3 Mar 2024 23:24:54 -0500 Subject: [PATCH] Sun Mar 3 11:24:54 PM EST 2024 --- src/gpu/gpu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gpu/gpu.c b/src/gpu/gpu.c index 9a96306..e9c612c 100644 --- a/src/gpu/gpu.c +++ b/src/gpu/gpu.c @@ -154,9 +154,9 @@ void GPU_mmul(float* ptrR, float* ptrA, float* ptrB, int rowsA, int colsB, int s void GPU_knk(float* ptrR, int rowsR, int colsR, float* ptrA, int rowsA, int colsA, float* ptrB, int rowsB, int colsB) { //Create buffers - size_t sizeA = rowsA * colsA * 2; - size_t sizeB = rowsB * colsB * 2; - size_t sizeR = rowsR * colsR * 2; + size_t sizeA = (rowsA * 2) * (colsA * 2); + size_t sizeB = (rowsB * 2) * (colsB * 2); + size_t sizeR = (rowsR * 2) * (colsR * 2); cl_int err; cl_mem memA = clCreateBuffer(GPU_context, CL_MEM_READ_ONLY, sizeof(float) * sizeA, NULL, &err); gpuerr(clCreateBuffer); -- 2.39.5