mirror of https://github.com/status-im/leopard.git
Benchmark setup
This commit is contained in:
parent
386a777a3e
commit
8473b74821
|
@ -136,6 +136,13 @@ void InitializeCPUArch()
|
|||
CpuHasAVX2 = ((cpu_info[1] & CPUID_EBX_AVX2) != 0);
|
||||
#endif // LEO_TRY_AVX2
|
||||
|
||||
#ifndef LEO_USE_SSSE3_OPT
|
||||
CpuHasAVX2 = false;
|
||||
#endif // LEO_USE_SSSE3_OPT
|
||||
#ifndef LEO_USE_AVX2_OPT
|
||||
CpuHasSSSE3 = false;
|
||||
#endif // LEO_USE_AVX2_OPT
|
||||
|
||||
#endif // LEO_TARGET_MOBILE
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,11 @@
|
|||
|
||||
// Enable 8-bit or 16-bit fields
|
||||
#define LEO_HAS_FF8
|
||||
#define LEO_HAS_FF16
|
||||
//#define LEO_HAS_FF16
|
||||
|
||||
// Enable using SIMD instructions
|
||||
#define LEO_USE_SSSE3_OPT
|
||||
#define LEO_USE_AVX2_OPT
|
||||
|
||||
// Avoid calculating final FFT values in decoder using bitfield
|
||||
#define LEO_ERROR_BITFIELD_OPT
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(disable: 4752) // found Intel(R) Advanced Vector Extensions; consider using /arch:AVX
|
||||
#endif
|
||||
|
||||
namespace leopard { namespace ff16 {
|
||||
|
||||
|
||||
|
@ -871,6 +875,9 @@ static void IFFT_DIT(
|
|||
// If there is one layer left:
|
||||
if (dist < m)
|
||||
{
|
||||
// Assuming that dist = m / 2
|
||||
LEO_DEBUG_ASSERT(dist * 2 == m);
|
||||
|
||||
const ffe_t log_m = skewLUT[dist];
|
||||
|
||||
if (log_m == kModulus)
|
||||
|
|
|
@ -42,8 +42,8 @@ using namespace std;
|
|||
struct TestParameters
|
||||
{
|
||||
#ifdef LEO_HAS_FF16
|
||||
unsigned original_count = 1000; // under 65536
|
||||
unsigned recovery_count = 200; // under 65536 - original_count
|
||||
unsigned original_count = 100; // under 65536
|
||||
unsigned recovery_count = 20; // under 65536 - original_count
|
||||
#else
|
||||
unsigned original_count = 128; // under 65536
|
||||
unsigned recovery_count = 128; // under 65536 - original_count
|
||||
|
@ -370,7 +370,7 @@ static void ShuffleDeck16(PCGRandom &prng, uint16_t * LEO_RESTRICT deck, uint32_
|
|||
|
||||
static bool Benchmark(const TestParameters& params)
|
||||
{
|
||||
const unsigned kTrials = params.original_count > 8000 ? 1 : 10;
|
||||
const unsigned kTrials = params.original_count > 8000 ? 1 : 100;
|
||||
|
||||
std::vector<uint8_t*> original_data(params.original_count);
|
||||
|
||||
|
|
Loading…
Reference in New Issue