From c9c0daa098f22662ff0b747af95797a622fa145b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Max=20L=C3=BCbke?= Date: Thu, 5 Oct 2023 08:22:08 +0200 Subject: [PATCH] Add source of prevPower function --- src/sycl_comp.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/sycl_comp.cpp b/src/sycl_comp.cpp index 6263b99..420c7fa 100644 --- a/src/sycl_comp.cpp +++ b/src/sycl_comp.cpp @@ -132,7 +132,11 @@ auto matrixMultTransposeSYCL(sycl::queue &q, const Matrix &matA, return matRes.chksum(); } -/* Obtains the previous power of two from the given integer. +/* + * Obtained from + * https://github.com/codeplaysoftware/computecpp-sdk/blob/master/samples/matrix-multiply.cpp + * + * Obtains the previous power of two from the given integer. * It works by masking out all ones after the first one bit, * then leaves the first one bit intact, effectively * yielding the first power of two < x. */