From f4dafa64e27e63d8cde5adcfbfa98e2a30fb7504 Mon Sep 17 00:00:00 2001 From: Noobie99 Date: Mon, 5 Feb 2024 22:23:53 +0100 Subject: renamed ntt and bitwiseConv function + more multiply functions --- math/transforms/multiplyBitwise.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 math/transforms/multiplyBitwise.cpp (limited to 'math/transforms/multiplyBitwise.cpp') diff --git a/math/transforms/multiplyBitwise.cpp b/math/transforms/multiplyBitwise.cpp new file mode 100644 index 0000000..0fa671c --- /dev/null +++ b/math/transforms/multiplyBitwise.cpp @@ -0,0 +1,8 @@ +vector mul(vector a, vector b) { + int n = 1 << (__lg(max(sz(a), sz(b)) - 1) + 1); + a.resize(n), b.resize(n); + bitwiseConv(a), bitwiseConv(b); + for (int i=0; i