From c1e8680e83aaa213f97d84a81a3b09a567ba5585 Mon Sep 17 00:00:00 2001 From: Vojta Date: Thu, 3 Oct 2024 08:18:49 +0200 Subject: [PATCH 1/2] CGP with more than 26 inputs naming --- ariths_gen/core/cgp_circuit.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ariths_gen/core/cgp_circuit.py b/ariths_gen/core/cgp_circuit.py index 8cd381a..669fbe0 100644 --- a/ariths_gen/core/cgp_circuit.py +++ b/ariths_gen/core/cgp_circuit.py @@ -42,9 +42,15 @@ class UnsignedCGPCircuit(GeneralCircuit): assert sum( input_widths) == c_in, f"CGP input width {c_in} doesn't match input_widths {input_widths}" + + def get_name(i): + if i < 26: + return chr(i + 0x61) + assert i < 26 * 26 + return chr(i // 26 + 0x60) + chr(i % 26 + 0x61) - inputs = [Bus(N=bw, prefix=f"input_{chr(i)}") - for i, bw in enumerate(input_widths, start=0x61)] + inputs = [Bus(N=bw, prefix=f"input_{get_name(i)}") + for i, bw in enumerate(input_widths)] # Assign each Bus object in self.inputs to a named attribute of self for bus in inputs: From 616efb25db822e0841b99fed06256d17779565d2 Mon Sep 17 00:00:00 2001 From: Vojta Date: Thu, 3 Oct 2024 08:20:24 +0200 Subject: [PATCH 2/2] workflow documentation --- .github/workflows/generate.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/generate.yml b/.github/workflows/generate.yml index 1935308..d1e708f 100644 --- a/.github/workflows/generate.yml +++ b/.github/workflows/generate.yml @@ -164,7 +164,7 @@ jobs: name: documentation path: html - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@4 + uses: JamesIves/github-pages-deploy-action@4.1.1 with: branch: gh-pages # The branch the action should deploy to. folder: html/ariths_gen # The folder the action should deploy.