From 6662f5d8e92b723f60ab88fe1d8628965de207d0 Mon Sep 17 00:00:00 2001 From: CNugteren Date: Sat, 13 Jun 2015 17:07:31 +0200 Subject: Refactored the GEMV kernel --- src/kernels/xgemv.opencl | 88 ++++++++++++++++++++++++++---------------------- 1 file changed, 47 insertions(+), 41 deletions(-) (limited to 'src/kernels') diff --git a/src/kernels/xgemv.opencl b/src/kernels/xgemv.opencl index de7d5a80..46a5e784 100644 --- a/src/kernels/xgemv.opencl +++ b/src/kernels/xgemv.opencl @@ -31,6 +31,48 @@ R"( // ================================================================================================= +// The multiply-add function for the main part (divisable by WGS) +inline void MatrixVectorMain(const __global real* restrict agm, __local real* xlm, real acc[WPT], + const int gid, const int w, const int kwg, + const int a_ld, const int a_offset, const int a_transposed) { + if (a_transposed == 0) { // Not transposed + #pragma unroll + for (int kl=0; kl