Skip to content

Commit

Permalink
chore(avm): better log_derivative_inverse_round
Browse files Browse the repository at this point in the history
  • Loading branch information
fcarreiro committed Jul 5, 2024
1 parent 455e4ad commit 4e18758
Show file tree
Hide file tree
Showing 60 changed files with 368 additions and 837 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class incl_main_tag_err_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -68,7 +55,10 @@ class incl_main_tag_err_lookup_settings {
};

template <typename FF_>
using incl_main_tag_err_relation = GenericLookupRelation<incl_main_tag_err_lookup_settings, FF_>;
class incl_main_tag_err_relation : public GenericLookupRelation<incl_main_tag_err_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "incl_main_tag_err";
};
template <typename FF_> using incl_main_tag_err = GenericLookup<incl_main_tag_err_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class incl_mem_tag_err_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -59,7 +46,11 @@ class incl_mem_tag_err_lookup_settings {
}
};

template <typename FF_> using incl_mem_tag_err_relation = GenericLookupRelation<incl_mem_tag_err_lookup_settings, FF_>;
template <typename FF_>
class incl_mem_tag_err_relation : public GenericLookupRelation<incl_mem_tag_err_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "incl_mem_tag_err";
};
template <typename FF_> using incl_mem_tag_err = GenericLookup<incl_mem_tag_err_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class kernel_output_lookup_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -80,7 +67,10 @@ class kernel_output_lookup_lookup_settings {
};

template <typename FF_>
using kernel_output_lookup_relation = GenericLookupRelation<kernel_output_lookup_lookup_settings, FF_>;
class kernel_output_lookup_relation : public GenericLookupRelation<kernel_output_lookup_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "kernel_output_lookup";
};
template <typename FF_> using kernel_output_lookup = GenericLookup<kernel_output_lookup_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_byte_lengths_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -72,7 +59,10 @@ class lookup_byte_lengths_lookup_settings {
};

template <typename FF_>
using lookup_byte_lengths_relation = GenericLookupRelation<lookup_byte_lengths_lookup_settings, FF_>;
class lookup_byte_lengths_relation : public GenericLookupRelation<lookup_byte_lengths_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_byte_lengths";
};
template <typename FF_> using lookup_byte_lengths = GenericLookup<lookup_byte_lengths_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_byte_operations_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -80,7 +67,10 @@ class lookup_byte_operations_lookup_settings {
};

template <typename FF_>
using lookup_byte_operations_relation = GenericLookupRelation<lookup_byte_operations_lookup_settings, FF_>;
class lookup_byte_operations_relation : public GenericLookupRelation<lookup_byte_operations_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_byte_operations";
};
template <typename FF_> using lookup_byte_operations = GenericLookup<lookup_byte_operations_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_div_u16_0_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -67,7 +54,11 @@ class lookup_div_u16_0_lookup_settings {
}
};

template <typename FF_> using lookup_div_u16_0_relation = GenericLookupRelation<lookup_div_u16_0_lookup_settings, FF_>;
template <typename FF_>
class lookup_div_u16_0_relation : public GenericLookupRelation<lookup_div_u16_0_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_div_u16_0";
};
template <typename FF_> using lookup_div_u16_0 = GenericLookup<lookup_div_u16_0_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_div_u16_1_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -67,7 +54,11 @@ class lookup_div_u16_1_lookup_settings {
}
};

template <typename FF_> using lookup_div_u16_1_relation = GenericLookupRelation<lookup_div_u16_1_lookup_settings, FF_>;
template <typename FF_>
class lookup_div_u16_1_relation : public GenericLookupRelation<lookup_div_u16_1_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_div_u16_1";
};
template <typename FF_> using lookup_div_u16_1 = GenericLookup<lookup_div_u16_1_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_div_u16_2_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -67,7 +54,11 @@ class lookup_div_u16_2_lookup_settings {
}
};

template <typename FF_> using lookup_div_u16_2_relation = GenericLookupRelation<lookup_div_u16_2_lookup_settings, FF_>;
template <typename FF_>
class lookup_div_u16_2_relation : public GenericLookupRelation<lookup_div_u16_2_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_div_u16_2";
};
template <typename FF_> using lookup_div_u16_2 = GenericLookup<lookup_div_u16_2_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_div_u16_3_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -67,7 +54,11 @@ class lookup_div_u16_3_lookup_settings {
}
};

template <typename FF_> using lookup_div_u16_3_relation = GenericLookupRelation<lookup_div_u16_3_lookup_settings, FF_>;
template <typename FF_>
class lookup_div_u16_3_relation : public GenericLookupRelation<lookup_div_u16_3_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_div_u16_3";
};
template <typename FF_> using lookup_div_u16_3 = GenericLookup<lookup_div_u16_3_lookup_settings, FF_>;

} // namespace bb
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,11 @@
#include "barretenberg/relations/generic_lookup/generic_lookup_relation.hpp"

#include <cstddef>
#include <string_view>
#include <tuple>

namespace bb {

/**
* @brief This class contains an example of how to set LookupSettings classes used by the
* GenericLookupRelationImpl class to specify a scaled lookup
*
* @details To create your own lookup:
* 1) Create a copy of this class and rename it
* 2) Update all the values with the ones needed for your lookup
* 3) Update "DECLARE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" and "DEFINE_LOOKUP_IMPLEMENTATIONS_FOR_ALL_SETTINGS" to
* include the new settings
* 4) Add the relation with the chosen settings to Relations in the flavor (for example,"`
* using Relations = std::tuple<GenericLookupRelation<ExampleXorLookupSettings,
* FF>>;)`
*
*/
class lookup_div_u16_4_lookup_settings {
public:
static constexpr size_t READ_TERMS = 1;
Expand Down Expand Up @@ -67,7 +54,11 @@ class lookup_div_u16_4_lookup_settings {
}
};

template <typename FF_> using lookup_div_u16_4_relation = GenericLookupRelation<lookup_div_u16_4_lookup_settings, FF_>;
template <typename FF_>
class lookup_div_u16_4_relation : public GenericLookupRelation<lookup_div_u16_4_lookup_settings, FF_> {
public:
static constexpr const char* NAME = "lookup_div_u16_4";
};
template <typename FF_> using lookup_div_u16_4 = GenericLookup<lookup_div_u16_4_lookup_settings, FF_>;

} // namespace bb
Loading

0 comments on commit 4e18758

Please sign in to comment.