2 *****************************************************************************
4 Implementation of interfaces for the TinyRAM ALU gadget.
8 *****************************************************************************
9 * @author This file is part of libsnark, developed by SCIPR Lab
10 * and contributors (see AUTHORS).
11 * @copyright MIT license (see LICENSE file)
12 *****************************************************************************/
14 #ifndef ALU_GADGET_TCC_
15 #define ALU_GADGET_TCC_
20 template<typename FieldT> void ALU_gadget<FieldT>::generate_r1cs_constraints()
22 for (size_t i = 0; i < 1ul << this->pb.ap.opcode_width(); ++i) {
24 components[i]->generate_r1cs_constraints();
29 template<typename FieldT> void ALU_gadget<FieldT>::generate_r1cs_witness()
31 for (size_t i = 0; i < 1ul << this->pb.ap.opcode_width(); ++i) {
33 components[i]->generate_r1cs_witness();
38 } // namespace libsnark
40 #endif // ALU_GADGET_TCC_