From f398d046ed5ff6e3bf803c3f16d1fb470b464bdb Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Mon, 22 Sep 2025 15:53:45 +0200 Subject: Add sqrt and normalize --- modules/codec/c++/data_math.hpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'modules/codec/c++/data_math.hpp') diff --git a/modules/codec/c++/data_math.hpp b/modules/codec/c++/data_math.hpp index efdca7d..51657c7 100644 --- a/modules/codec/c++/data_math.hpp +++ b/modules/codec/c++/data_math.hpp @@ -120,6 +120,17 @@ public: return c; } + + template + data, encode::Native> cast_to(){ + data, encode::Native> native_change; + rank_iterator::in_fixed_bounds([&](const data, encode::Native>& index) -> error_or{ + native_change.at(index) = at(index).template cast_to(); + return make_void(); + }); + + return inner_change; + } }; } -- cgit v1.2.3