mirror of
https://github.com/xmrig/xmrig.git
synced 2024-10-30 04:57:39 +00:00
e22f798085
Added "astrobwt-avx2" parameter in config.json, it's turned off ("false") by default. 4-5% speedup on CPUs with proper AVX2 support (AMD Ryzen starting with Zen2, Intel Core starting with Haswell). There will be no speedup on the following CPUs: - Intel Pentium/Celeron don't support AVX2 - AMD Zen/Zen+ have only half-speed AVX GCC compiled version is faster without AVX2, MSVC compiled version is faster with AVX2
46 lines
1.3 KiB
CMake
46 lines
1.3 KiB
CMake
if (WITH_ASTROBWT)
|
|
add_definitions(/DXMRIG_ALGO_ASTROBWT)
|
|
|
|
list(APPEND HEADERS_CRYPTO
|
|
src/crypto/astrobwt/AstroBWT.h
|
|
src/crypto/astrobwt/sha3.h
|
|
)
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
src/crypto/astrobwt/AstroBWT.cpp
|
|
src/crypto/astrobwt/sha3.cpp
|
|
)
|
|
|
|
if (XMRIG_ARM)
|
|
list(APPEND HEADERS_CRYPTO
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-config.h
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-machine.h
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-portable.h
|
|
src/crypto/astrobwt/salsa20_ref/ecrypt-sync.h
|
|
)
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
src/crypto/astrobwt/salsa20_ref/salsa20.c
|
|
)
|
|
else()
|
|
if (CMAKE_SIZEOF_VOID_P EQUAL 8)
|
|
enable_language(ASM_MASM)
|
|
add_definitions(/DASTROBWT_AVX2)
|
|
if (CMAKE_C_COMPILER_ID MATCHES MSVC)
|
|
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.asm)
|
|
else()
|
|
list(APPEND SOURCES_CRYPTO src/crypto/astrobwt/sha3_256_avx2.S)
|
|
endif()
|
|
endif()
|
|
|
|
list(APPEND HEADERS_CRYPTO
|
|
src/crypto/astrobwt/Salsa20.hpp
|
|
)
|
|
|
|
list(APPEND SOURCES_CRYPTO
|
|
src/crypto/astrobwt/Salsa20.cpp
|
|
)
|
|
endif()
|
|
else()
|
|
remove_definitions(/DXMRIG_ALGO_ASTROBWT)
|
|
endif()
|