description: zero
program: |
  func.func @main() -> (tensor<2x!FHE.eint<7>>, !FHE.eint<2>) {
    %0 = "FHE.zero_tensor"(): () -> tensor<2x!FHE.eint<7>>
    %1 = "FHE.zero"(): () -> !FHE.eint<2>
    return %0, %1 : tensor<2x!FHE.eint<7>>, !FHE.eint<2>
  }
tests:
  - inputs:
  - outputs:
    - tensor: [0, 0]
      shape: [2]
    - scalar: 0
---
description: identity_mono_precision
program: |
  func.func @main(%arg0: !FHE.eint<3>, %arg1: !FHE.eint<3>, %arg2: !FHE.eint<3>, %arg3: !FHE.eint<3>) -> (!FHE.eint<3>, !FHE.eint<3>, !FHE.eint<3>, !FHE.eint<3>) {
    return %arg0, %arg1, %arg2, %arg3 : !FHE.eint<3>, !FHE.eint<3>, !FHE.eint<3>, !FHE.eint<3>
  }
tests:
  - inputs:
    - scalar: 7
    - scalar: 2
    - scalar: 3
    - scalar: 6
    outputs:
    - scalar: 7
    - scalar: 2
    - scalar: 3
    - scalar: 6
---
description: apply_lookup_table_multi_precision
program: |
  func.func @main(%arg0: !FHE.eint<3>, %arg1: !FHE.eint<4>, %arg2: !FHE.eint<5>, %arg3: !FHE.eint<6>) -> (!FHE.eint<3>, !FHE.eint<4>, !FHE.eint<5>, !FHE.eint<6>) {
    %lut0 = arith.constant dense<[0, 1, 2, 3, 4, 5, 6, 7]> : tensor<8xi64>
    %bs0 = "FHE.apply_lookup_table"(%arg0, %lut0): (!FHE.eint<3>, tensor<8xi64>) -> (!FHE.eint<3>)

    %lut1 = arith.constant dense<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]> : tensor<16xi64>
    %bs1 = "FHE.apply_lookup_table"(%arg1, %lut1): (!FHE.eint<4>, tensor<16xi64>) -> (!FHE.eint<4>)

    %lut3 = arith.constant dense<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]> : tensor<32xi64>
    %bs3 = "FHE.apply_lookup_table"(%arg2, %lut3): (!FHE.eint<5>, tensor<32xi64>) -> (!FHE.eint<5>)

    %lut4 = arith.constant dense<[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63]> : tensor<64xi64>
    %bs4 = "FHE.apply_lookup_table"(%arg3, %lut4): (!FHE.eint<6>, tensor<64xi64>) -> (!FHE.eint<6>)

    return %bs0, %bs1, %bs3, %bs4 : !FHE.eint<3>, !FHE.eint<4>, !FHE.eint<5>, !FHE.eint<6>
  }
tests:
  - inputs:
    - scalar: 7
    - scalar: 15
    - scalar: 31
    - scalar: 63
    outputs:
    - scalar: 7
    - scalar: 15
    - scalar: 31
    - scalar: 63
