From: inikep Date: Thu, 25 Feb 2016 18:15:08 +0000 (+0100) Subject: fixed paramgrill X-Git-Tag: v0.6.0^2~17^2~92^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59493e8669832b56624c1e1f844d5915a64bc147;p=thirdparty%2Fzstd.git fixed paramgrill --- diff --git a/lib/zstd_opt_internal.h b/lib/zstd_opt_internal.h index a40cad068..0186ebc2b 100644 --- a/lib/zstd_opt_internal.h +++ b/lib/zstd_opt_internal.h @@ -81,7 +81,7 @@ MEM_STATIC void ZSTD_rescaleFreqs(seqStore_t* ssPtr) ssPtr->litLengthSum = ZSTD_FREQ_START*(1<litSum = ZSTD_FREQ_START*(1<offCodeSum = ZSTD_FREQ_START*(1<matchSum = ZSTD_FREQ_START*ssPtr->litSum; + ssPtr->matchSum = ssPtr->litSum; for (u=0; u<=MaxLit; u++) ssPtr->litFreq[u] = ZSTD_FREQ_START; diff --git a/programs/paramgrill.c b/programs/paramgrill.c index 23a54d466..db8ff0e72 100644 --- a/programs/paramgrill.c +++ b/programs/paramgrill.c @@ -127,7 +127,7 @@ static U32 g_rand = 1; static U32 g_singleRun = 0; static U32 g_target = 0; static U32 g_noSeed = 0; -static ZSTD_parameters g_params = { 0, 0, 0, 0, 0, 0, 0, ZSTD_greedy }; +static ZSTD_parameters g_params = { 0, 0, 0, 0, 0, 0, 0, 0, ZSTD_greedy }; void BMK_SetNbIterations(int nbLoops) { @@ -406,7 +406,6 @@ const char* g_stratName[] = { "ZSTD_fast ", "ZSTD_lazy ", "ZSTD_lazy2 ", "ZSTD_btlazy2", - "ZSTD_opt ", "ZSTD_btopt " }; static void BMK_printWinner(FILE* f, U32 cLevel, BMK_result_t result, ZSTD_parameters params, size_t srcSize) @@ -549,7 +548,7 @@ static ZSTD_parameters* sanitizeParams(ZSTD_parameters params) g_params = params; if (params.strategy == ZSTD_fast) g_params.contentLog = 0, g_params.searchLog = 0; - if ((params.strategy != ZSTD_opt) && (params.strategy != ZSTD_btopt )) + if (params.strategy != ZSTD_btopt ) g_params.targetLength = 0; return &g_params; }