Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::NonNativeFieldRelationImpl< FF_ > Class Template Reference

#include <non_native_field_relation.hpp>

Public Types

using FF = FF_
 

Static Public Member Functions

template<typename AllEntities >
static bool skip (const AllEntities &in)
 Returns true if the contribution from all subrelations for the provided inputs is identically zero.
 
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void accumulate (ContainerOverSubrelations &accumulators, const AllEntities &in, const Parameters &params, const FF &scaling_factor)
 Non-native field arithmetic relation.
 

Static Public Attributes

static constexpr std::array< size_t, 1 > SUBRELATION_PARTIAL_LENGTHS
 

Detailed Description

template<typename FF_>
class bb::NonNativeFieldRelationImpl< FF_ >

Definition at line 13 of file non_native_field_relation.hpp.

Member Typedef Documentation

◆ FF

template<typename FF_ >
using bb::NonNativeFieldRelationImpl< FF_ >::FF = FF_

Definition at line 15 of file non_native_field_relation.hpp.

Member Function Documentation

◆ accumulate()

template<typename FF_ >
template<typename ContainerOverSubrelations , typename AllEntities , typename Parameters >
static void bb::NonNativeFieldRelationImpl< FF_ >::accumulate ( ContainerOverSubrelations &  accumulators,
const AllEntities &  in,
const Parameters &  params,
const FF scaling_factor 
)
inlinestatic

Non-native field arithmetic relation.

Adds contributions for identities associated with non-native field arithmetic:

  • Bigfield product evaluation (3 in total)
  • Bigfield limb accumulation (2 in total)

Multiple selectors are used to 'switch' nnf gates on/off according to the following pattern:

gate type q_nnf q_2 q_3 q_4 q_m
Bigfield Limb Accumulation 1 1 0 1 1 0
Bigfield Limb Accumulation 2 1 0 1 0 1
Bigfield Product 1 1 1 1 0 0
Bigfield Product 2 1 1 0 1 0
Bigfield Product 3 1 1 0 0 1
Parameters
evalstransformed to evals + C(in(X)...)*scaling_factor
inan std::array containing the Totaly extended Univariate edges.
parameterscontains beta, gamma, and public_input_delta, ....
scaling_factoroptional term to scale the evaluation before adding to evals.

Non native field arithmetic gate 2 deg 4

        _                                                                               _
       /   _                   _                               _       14                \

q_2 . q_4 | (w_1 . w_2) + (w_1 . w_2) + (w_1 . w_4 + w_2 . w_3 - w_3) . 2 - w_3 - w_4 | _ _/

Definition at line 49 of file non_native_field_relation.hpp.

◆ skip()

template<typename FF_ >
template<typename AllEntities >
static bool bb::NonNativeFieldRelationImpl< FF_ >::skip ( const AllEntities &  in)
inlinestatic

Returns true if the contribution from all subrelations for the provided inputs is identically zero.

Definition at line 25 of file non_native_field_relation.hpp.

Member Data Documentation

◆ SUBRELATION_PARTIAL_LENGTHS

template<typename FF_ >
constexpr std::array<size_t, 1> bb::NonNativeFieldRelationImpl< FF_ >::SUBRELATION_PARTIAL_LENGTHS
staticconstexpr
Initial value:
{
6
}

Definition at line 17 of file non_native_field_relation.hpp.


The documentation for this class was generated from the following file: