From a1583da62ea0f7e9affe868cd509557b5e91fae3 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sat, 30 Aug 2025 19:02:15 +0200 Subject: Fixing sycl --- modules/codec/c++/math.hpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'modules/codec/c++/math.hpp') diff --git a/modules/codec/c++/math.hpp b/modules/codec/c++/math.hpp index dd9e49b..ddeea3f 100644 --- a/modules/codec/c++/math.hpp +++ b/modules/codec/c++/math.hpp @@ -4,9 +4,22 @@ namespace saw { namespace math { +/* template data norm_2(const data& d){ return {}; } +*/ + +template +data, Encoding> dot(const data, Encoding>& left, const data, Encoding>& right){ + data,Encoding> val; + auto& inner = val({}); + for(uint64_t i = 0u; i < D; ++i){ + inner = inner + left({{i}}) * right({{i}}); + } + + return val; +} } } -- cgit v1.2.3