From 2387bacc9753145792d146ab5ab903d35b94b012 Mon Sep 17 00:00:00 2001 From: Joel Falcou Date: Sun, 12 Oct 2025 19:49:34 +0200 Subject: [PATCH] Implement square See merge request oss/rotgen!37 --- include/rotgen/functions/functions.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/rotgen/functions/functions.hpp b/include/rotgen/functions/functions.hpp index 786bf0c..81464bb 100644 --- a/include/rotgen/functions/functions.hpp +++ b/include/rotgen/functions/functions.hpp @@ -125,6 +125,12 @@ namespace rotgen return a / b; } + template + auto square(A const& a) + { + return mul(a,a); + } + //----------------------------------------------------------------------------------------------- // Reductions //-----------------------------------------------------------------------------------------------