You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to create keys for the below code, I get this error: java.lang.StackOverflowError. Is there a way to fix it? Or is it not possible to make a loop with unknown number of iterations?
#include <stdint.h>
struct In {
uint8_t number;
uint8_t exponent;
};
struct Out {
uint64_t result;
};
void compute(struct In *input, struct Out *output) {
output->result = input->number;
uint8_t i = input->exponent;
for(; i > 0; i--){
output->result = output->result * input->number;
}
}
The text was updated successfully, but these errors were encountered:
All loops must be statically bound at compile time, so that they can be compiled to an arithmetic circuit.
You can use the buffetfsm loop transformer to statically bound your loops without re-writing your code. To do this, just make sure you've built the loop transformer using the install_buffet.sh script, and include the annotation in your computation before your loop: [[buffet::fsm(LOOP_BOUND)]]
When trying to create keys for the below code, I get this error:
java.lang.StackOverflowError
. Is there a way to fix it? Or is it not possible to make a loop with unknown number of iterations?The text was updated successfully, but these errors were encountered: