Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Public Member Functions | Public Attributes | List of all members
libsnark::ALU_arithmetic_gadget< FieldT > Class Template Reference

#include <alu_arithmetic.hpp>

Inheritance diagram for libsnark::ALU_arithmetic_gadget< FieldT >:
Inheritance graph
[legend]
Collaboration diagram for libsnark::ALU_arithmetic_gadget< FieldT >:
Collaboration graph
[legend]

Public Member Functions

 ALU_arithmetic_gadget (tinyram_protoboard< FieldT > &pb, const pb_variable_array< FieldT > &opcode_indicators, const word_variable_gadget< FieldT > &desval, const word_variable_gadget< FieldT > &arg1val, const word_variable_gadget< FieldT > &arg2val, const pb_variable< FieldT > &flag, const pb_variable< FieldT > &result, const pb_variable< FieldT > &result_flag, const std::string &annotation_prefix="")
 
- Public Member Functions inherited from libsnark::tinyram_standard_gadget< FieldT >
 tinyram_standard_gadget (tinyram_protoboard< FieldT > &pb, const std::string &annotation_prefix="")
 
virtual void generate_r1cs_constraints ()=0
 
virtual void generate_r1cs_witness ()=0
 
- Public Member Functions inherited from libsnark::tinyram_gadget< FieldT >
 tinyram_gadget (tinyram_protoboard< FieldT > &pb, const std::string &annotation_prefix="")
 
- Public Member Functions inherited from libsnark::gadget< FieldT >
 gadget (protoboard< FieldT > &pb, const std::string &annotation_prefix)
 

Public Attributes

const pb_variable_array< FieldT > opcode_indicators
 
const word_variable_gadget< FieldT > desval
 
const word_variable_gadget< FieldT > arg1val
 
const word_variable_gadget< FieldT > arg2val
 
const pb_variable< FieldT > flag
 
const pb_variable< FieldT > result
 
const pb_variable< FieldT > result_flag
 

Additional Inherited Members

- Protected Attributes inherited from libsnark::tinyram_gadget< FieldT >
tinyram_protoboard< FieldT > & pb
 
- Protected Attributes inherited from libsnark::gadget< FieldT >
protoboard< FieldT > & pb
 
const std::string annotation_prefix
 

Detailed Description

template<typename FieldT>
class libsnark::ALU_arithmetic_gadget< FieldT >

Definition at line 26 of file alu_arithmetic.hpp.

Constructor & Destructor Documentation

◆ ALU_arithmetic_gadget()

template<typename FieldT >
libsnark::ALU_arithmetic_gadget< FieldT >::ALU_arithmetic_gadget ( tinyram_protoboard< FieldT > &  pb,
const pb_variable_array< FieldT > &  opcode_indicators,
const word_variable_gadget< FieldT > &  desval,
const word_variable_gadget< FieldT > &  arg1val,
const word_variable_gadget< FieldT > &  arg2val,
const pb_variable< FieldT > &  flag,
const pb_variable< FieldT > &  result,
const pb_variable< FieldT > &  result_flag,
const std::string &  annotation_prefix = "" 
)
inline

Definition at line 37 of file alu_arithmetic.hpp.

47  : tinyram_standard_gadget<FieldT>(pb, annotation_prefix)
49  , desval(desval)
50  , arg1val(arg1val)
51  , arg2val(arg2val)
52  , flag(flag)
53  , result(result)
55  {
56  }

Member Data Documentation

◆ arg1val

template<typename FieldT >
const word_variable_gadget<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::arg1val

Definition at line 31 of file alu_arithmetic.hpp.

◆ arg2val

template<typename FieldT >
const word_variable_gadget<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::arg2val

Definition at line 32 of file alu_arithmetic.hpp.

◆ desval

template<typename FieldT >
const word_variable_gadget<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::desval

Definition at line 30 of file alu_arithmetic.hpp.

◆ flag

template<typename FieldT >
const pb_variable<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::flag

Definition at line 33 of file alu_arithmetic.hpp.

◆ opcode_indicators

template<typename FieldT >
const pb_variable_array<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::opcode_indicators

Definition at line 29 of file alu_arithmetic.hpp.

◆ result

template<typename FieldT >
const pb_variable<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::result

Definition at line 34 of file alu_arithmetic.hpp.

◆ result_flag

template<typename FieldT >
const pb_variable<FieldT> libsnark::ALU_arithmetic_gadget< FieldT >::result_flag

Definition at line 35 of file alu_arithmetic.hpp.


The documentation for this class was generated from the following file:
libsnark::ALU_arithmetic_gadget::arg2val
const word_variable_gadget< FieldT > arg2val
Definition: alu_arithmetic.hpp:32
libsnark::gadget::annotation_prefix
const std::string annotation_prefix
Definition: gadget.hpp:20
libsnark::ALU_arithmetic_gadget::result
const pb_variable< FieldT > result
Definition: alu_arithmetic.hpp:34
libsnark::ALU_arithmetic_gadget::desval
const word_variable_gadget< FieldT > desval
Definition: alu_arithmetic.hpp:30
libsnark::ALU_arithmetic_gadget::opcode_indicators
const pb_variable_array< FieldT > opcode_indicators
Definition: alu_arithmetic.hpp:29
libsnark::tinyram_gadget::pb
tinyram_protoboard< FieldT > & pb
Definition: tinyram_protoboard.hpp:34
libsnark::ALU_arithmetic_gadget::arg1val
const word_variable_gadget< FieldT > arg1val
Definition: alu_arithmetic.hpp:31
libsnark::ALU_arithmetic_gadget::flag
const pb_variable< FieldT > flag
Definition: alu_arithmetic.hpp:33
libsnark::ALU_arithmetic_gadget::result_flag
const pb_variable< FieldT > result_flag
Definition: alu_arithmetic.hpp:35