microsoft / EVA

Compiler for the SEAL homomorphic encryption library
MIT License
223 stars 58 forks source link

List of floating-point numbers as input possible (CKKS)? #20

Open n0mead opened 2 years ago

n0mead commented 2 years ago

Hi,

I want to do a simple sum calculation of some floating-point numbers, but I just want to use an List as input. I know that we can do something like this to sum up a specific amount of numbers:

sum = EvaProgram('Sum', vec_size=4096)
with sum:
    x = Input('x')
    y = Input('y')
    z = Input('z')
    Output('sum', x+y+z)

Is there a way to transmit data as a list which contains all summands? Something like this:

sum = EvaProgram('Sum', vec_size=4096)
with sum:
    summands = Input('summands')

    result = 0
    for summand in summands:
            result = result + summand

    Output('sum', result)

Or is this not possible? Thank you.