Skip to content

Commit

Permalink
Merge branch 'master' into rw-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
oclaw authored Dec 12, 2024
2 parents b9c290b + 6c17cba commit ec00e8d
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 67 deletions.
57 changes: 0 additions & 57 deletions crypto3/cmake/CheckSSE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -58,63 +58,6 @@ macro(check_sse)
set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
endif(SSE42_TRUE)

elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
execute_process(COMMAND "/usr/bin/env -S sysctl -n machdep.cpu.features" OUTPUT_VARIABLE
CPUINFO)

string(REGEX REPLACE "^.*[^S](SSE2).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "SSE2" "${SSE_THERE}" SSE2_TRUE)
if(SSE2_TRUE)
set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
else(SSE2_TRUE)
set(SSE2_FOUND false CACHE BOOL "SSE2 available on host")
endif(SSE2_TRUE)

string(REGEX REPLACE "^.*[^S](SSE3).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "SSE3" "${SSE_THERE}" SSE3_TRUE)
if(SSE3_TRUE)
set(SSE3_FOUND true CACHE BOOL "SSE3 available on host")
else(SSE3_TRUE)
set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
endif(SSE3_TRUE)

string(REGEX REPLACE "^.*(SSSE3).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "SSSE3" "${SSE_THERE}" SSSE3_TRUE)
if(SSSE3_TRUE)
set(SSSE3_FOUND true CACHE BOOL "SSSE3 available on host")
else(SSSE3_TRUE)
set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
endif(SSSE3_TRUE)

string(REGEX REPLACE "^.*(SSE4.1).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "SSE4.1" "${SSE_THERE}" SSE41_TRUE)
if(SSE41_TRUE)
set(SSE4_1_FOUND true CACHE BOOL "SSE4.1 available on host")
else(SSE41_TRUE)
set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
endif(SSE41_TRUE)

string(REGEX REPLACE "^.*(SSE4.2).*$" "\\1" SSE_THERE "${CPUINFO}")
string(COMPARE EQUAL "SSE4.2" "${SSE_THERE}" SSE42_TRUE)
if(SSE42_TRUE)
set(SSE4_2_FOUND true CACHE BOOL "SSE4.2 available on host")
else(SSE42_TRUE)
set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
endif(SSE42_TRUE)

elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
# TODO
set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
else(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(SSE2_FOUND true CACHE BOOL "SSE2 available on host")
set(SSE3_FOUND false CACHE BOOL "SSE3 available on host")
set(SSSE3_FOUND false CACHE BOOL "SSSE3 available on host")
set(SSE4_1_FOUND false CACHE BOOL "SSE4.1 available on host")
set(SSE4_2_FOUND false CACHE BOOL "SSE4.2 available on host")
endif(CMAKE_SYSTEM_NAME MATCHES "Linux")

if(CMAKE_COMPILER_IS_GNUCXX)
Expand Down
2 changes: 1 addition & 1 deletion crypto3/libs/multiprecision/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ macro(define_big_int_test name)
# target_link_libraries(${test_name} no_eh_support)
add_dependencies(${CURRENT_PROJECT_NAME}_test_suite_big_int_tests ${test_name})

endmacro(define_big_uint_test)
endmacro(define_big_int_test)

set(RUNTIME_TESTS_NAMES
"inverse"
Expand Down
2 changes: 0 additions & 2 deletions evm-assigner/cmake/cable/cable.cmake
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#!/usr/bin/env -S cmake -P

# Cable: CMake Bootstrap Library <https://github.com/ethereum/cable>
# Copyright 2019-2020 Pawel Bylica.
# Licensed under the Apache License, Version 2.0.
Expand Down
1 change: 0 additions & 1 deletion evm-assigner/cmake/cable/toolchains/mips64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER mips64-linux-gnuabi64-gcc)
set(CMAKE_CXX_COMPILER mips64-linux-gnuabi64-g++)

set(CMAKE_FIND_ROOT_PATH /usr/mips64-linux-gnuabi64)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Expand Down
1 change: 0 additions & 1 deletion evm-assigner/cmake/cable/toolchains/powerpc64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER powerpc64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER powerpc64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH /usr/powerpc64-linux-gnu)
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Expand Down
2 changes: 0 additions & 2 deletions evm-assigner/cmake/toolchains/riscv32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
# Copyright 2023 Pawel Bylica.
# Licensed under the Apache License, Version 2.0. See the LICENSE file.

set(RISCV /usr/local/riscv)

set(CMAKE_SYSTEM_PROCESSOR riscv32)
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_C_COMPILER ${RISCV}/bin/clang)
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@
parallel-crypto3-gcc = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-gcc-bench = (pkgs.callPackage ./parallel-crypto3.nix {
runTests = true;
enableDebug = false;
benchmarkTests = true;
});
parallel-crypto3-clang = (pkgs.callPackage ./parallel-crypto3.nix {
stdenv = pkgs.llvmPackages_19.stdenv;
Expand Down
4 changes: 2 additions & 2 deletions parallel-crypto3/benchmarks/polynomial_dfs_benchmark.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ BENCHMARK_AUTO_TEST_CASE(dummy_test, 100) {
STOP_TIMER("dummy")
}

BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 20) {
BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 10) {
using Field = nil::crypto3::algebra::fields::bls12_fr<381>;

std::vector<polynomial_dfs<typename Field::value_type>> random_polynomials;
Expand All @@ -174,7 +174,7 @@ BENCHMARK_AUTO_TEST_CASE(polynomial_product_test, 20) {
STOP_TIMER("polynomial_product")
}

BENCHMARK_AUTO_TEST_CASE(polynomial_sum_real_test, 20) {
BENCHMARK_AUTO_TEST_CASE(polynomial_sum_real_test, 10) {
using Field = nil::crypto3::algebra::fields::bls12_fr<381>;

std::vector<polynomial_dfs<typename Field::value_type>> random_polynomials;
Expand Down

0 comments on commit ec00e8d

Please sign in to comment.