Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion barretenberg/cpp/cmake/toolchains/i386-linux.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ set(CMAKE_SYSTEM_PROCESSOR i386)
add_compile_options("-m32")
add_link_options("-m32")
set(MULTITHREADING OFF)
add_definitions(-DDISABLE_SHENANIGANS=1)
add_definitions(-DDISABLE_ASM=1)
4 changes: 2 additions & 2 deletions barretenberg/cpp/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ endif()
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${MSGPACK_INCLUDE})

# I feel this should be limited to ecc, however it's currently used in headers that go across libraries,
# and there currently isn't an easy way to inherit the DDISABLE_SHENANIGANS parameter.
# and there currently isn't an easy way to inherit the DDISABLE_ASM parameter.
if(DISABLE_ASM)
message("Using fallback non-assembly methods for field multiplications.")
add_definitions(-DDISABLE_SHENANIGANS=1)
add_definitions(-DDISABLE_ASM=1)
else()
message(STATUS "Using optimized assembly for field arithmetic.")
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using namespace bb;
using namespace benchmark;

#ifndef DISABLE_ASM
namespace {
void asm_add_with_coarse_reduction(State& state) noexcept
{
Expand Down Expand Up @@ -205,5 +206,6 @@ void sqr(State& state) noexcept
BENCHMARK(sqr);
} // namespace

// NOLINTNEXTLINE macro invokation triggers style guideline errors from googletest code
BENCHMARK_MAIN();
// NOLINTNEXTLINE macro invocation triggers style guideline errors from googletest code
BENCHMARK_MAIN();
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <random>
#include <span>

#ifndef DISABLE_SHENANIGANS
#ifndef DISABLE_ASM
#ifdef __BMI2__
#define BBERG_NO_ASM 0
#else
Expand Down
2 changes: 1 addition & 1 deletion barretenberg/cpp/src/barretenberg/ecc/groups/group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ template <typename _coordinate_field, typename _subgroup_field, typename GroupPa

} // namespace bb

#ifdef DISABLE_SHENANIGANS
#ifdef DISABLE_ASM
#include "group_impl_int128.tcc"
#else
#include "group_impl_asm.tcc"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#ifndef DISABLE_SHENANIGANS
#ifndef DISABLE_ASM

#include "barretenberg/ecc/groups/group.hpp"
#include <cstdint>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#ifdef DISABLE_SHENANIGANS
#ifdef DISABLE_ASM

#include "barretenberg/ecc/groups/group.hpp"
#include <cstdint>
Expand Down