Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
Loading...
Searching...
No Matches
paramgrill.c File Reference
#include "util.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "timefn.h"
#include "mem.h"
#include "zstd.h"
#include "datagen.h"
#include "xxhash.h"
#include "benchfn.h"
#include "benchzstd.h"
#include "zstd_errors.h"
#include "zstd_internal.h"

Data Structures

struct  paramValues_t
 
struct  memoTable_t
 
struct  winnerInfo_t
 
struct  constraint_t
 
struct  winner_ll_node
 
struct  BMK_initCCtxArgs
 
struct  BMK_initDCtxArgs
 
struct  buffers_t
 
struct  contexts_t
 
struct  level_constraints_t
 

Macros

#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_parameters, ZSTD_estimateCCtxSize */
 
#define PROGRAM_DESCRIPTION   "ZSTD parameters tester"
 
#define AUTHOR   "Yann Collet"
 
#define WELCOME_MESSAGE   "*** %s %s %i-bits, by %s ***\n", PROGRAM_DESCRIPTION, ZSTD_VERSION_STRING, (int)(sizeof(void*)*8), AUTHOR
 
#define TIMELOOP_NANOSEC   (1*1000000000ULL) /* 1 second */
 
#define NB_LEVELS_TRACKED   22 /* ensured being >= ZSTD_maxCLevel() in BMK_init_level_constraints() */
 
#define COMPRESSIBILITY_DEFAULT   0.50
 
#define DISPLAY(...)
 
#define DISPLAYLEVEL(n, ...)
 
#define DEBUGOUTPUT(...)
 
#define TIMED   0
 
#define DEBUG   0
 
#define MIN(a, b)
 
#define MAX(a, b)
 
#define CUSTOM_LEVEL   99
 
#define BASE_CLEVEL   1
 
#define FADT_MIN   0
 
#define FADT_MAX   ((U32)-1)
 
#define WLOG_RANGE   (ZSTD_WINDOWLOG_MAX - ZSTD_WINDOWLOG_MIN + 1)
 
#define CLOG_RANGE   (ZSTD_CHAINLOG_MAX - ZSTD_CHAINLOG_MIN + 1)
 
#define HLOG_RANGE   (ZSTD_HASHLOG_MAX - ZSTD_HASHLOG_MIN + 1)
 
#define SLOG_RANGE   (ZSTD_SEARCHLOG_MAX - ZSTD_SEARCHLOG_MIN + 1)
 
#define MML_RANGE   (ZSTD_MINMATCH_MAX - ZSTD_MINMATCH_MIN + 1)
 
#define TLEN_RANGE   17
 
#define STRT_RANGE   (ZSTD_STRATEGY_MAX - ZSTD_STRATEGY_MIN + 1)
 
#define FADT_RANGE   3
 
#define CHECKTIME(r)
 
#define CHECKTIMEGT(ret, val, _gototag)
 
#define PARAM_UNSET   ((U32)-2) /* can't be -1 b/c fadt uses -1 */
 
#define BOUNDCHECK(val, min, max)
 
#define WORSE_RESULT   0
 
#define BETTER_RESULT   1
 
#define ERROR_RESULT   2
 
#define SPEED_RESULT   4
 
#define SIZE_RESULT   5
 
#define VARIANCE   1.2
 
#define INFEASIBLE_THRESHOLD   200
 
#define PARAMTABLELOG   25
 
#define PARAMTABLESIZE   (1<<PARAMTABLELOG)
 
#define PARAMTABLEMASK   (PARAMTABLESIZE-1)
 
#define TRY_DECAY   1
 
#define PARSE_SUB_ARGS(stringLong, stringShort, variable)
 

Typedefs

typedef struct winner_ll_node winner_ll_node
 

Enumerations

enum  varInds_t {
  wlog_ind = 0 , clog_ind = 1 , hlog_ind = 2 , slog_ind = 3 ,
  mml_ind = 4 , tlen_ind = 5 , strt_ind = 6 , fadt_ind = 7 ,
  NUM_PARAMS = 8
}
 
enum  memoTableType_t { directMap , xxhashMap , noMemo }
 

Functions

int main (int argc, const char **argv)
 

Macro Definition Documentation

◆ AUTHOR

#define AUTHOR   "Yann Collet"

◆ BASE_CLEVEL

#define BASE_CLEVEL   1

◆ BETTER_RESULT

#define BETTER_RESULT   1

◆ BOUNDCHECK

#define BOUNDCHECK ( val,
min,
max )
Value:
{ \
if (((val)<(min)) | ((val)>(max))) { \
DISPLAY("INVALID PARAMETER CONSTRAINTS\n"); \
return 0; \
} }
#define min(a, b)
Definition compress42.c:304

◆ CHECKTIME

#define CHECKTIME ( r)
Value:
{ if(BMK_timeSpan_s(g_time) > g_timeLimit_s) { DEBUGOUTPUT("Time Limit Reached\n"); return r; } }
#define DEBUGOUTPUT(...)
Definition paramgrill.c:57

◆ CHECKTIMEGT

#define CHECKTIMEGT ( ret,
val,
_gototag )
Value:
{ if(BMK_timeSpan_s(g_time) > g_timeLimit_s) { DEBUGOUTPUT("Time Limit Reached\n"); ret = val; goto _gototag; } }
ret
Definition zlib_interface.c:30

◆ CLOG_RANGE

#define CLOG_RANGE   (ZSTD_CHAINLOG_MAX - ZSTD_CHAINLOG_MIN + 1)

◆ COMPRESSIBILITY_DEFAULT

#define COMPRESSIBILITY_DEFAULT   0.50

◆ CUSTOM_LEVEL

#define CUSTOM_LEVEL   99

◆ DEBUG

#define DEBUG   0

◆ DEBUGOUTPUT

#define DEBUGOUTPUT ( ...)
Value:
{ if (DEBUG) DISPLAY(__VA_ARGS__); }
#define DISPLAY(...)
Definition paramgrill.c:55
#define DEBUG
Definition paramgrill.c:61

◆ DISPLAY

#define DISPLAY ( ...)
Value:
fprintf(stderr, __VA_ARGS__)

◆ DISPLAYLEVEL

#define DISPLAYLEVEL ( n,
... )
Value:
if(g_displayLevel >= n) { fprintf(stderr, __VA_ARGS__); }

◆ ERROR_RESULT

#define ERROR_RESULT   2

◆ FADT_MAX

#define FADT_MAX   ((U32)-1)

◆ FADT_MIN

#define FADT_MIN   0

◆ FADT_RANGE

#define FADT_RANGE   3

◆ HLOG_RANGE

#define HLOG_RANGE   (ZSTD_HASHLOG_MAX - ZSTD_HASHLOG_MIN + 1)

◆ INFEASIBLE_THRESHOLD

#define INFEASIBLE_THRESHOLD   200

◆ MAX

#define MAX ( a,
b )
Value:
( (a) > (b) ? (a) : (b) )
#define b(i)
Definition sha256.c:42
#define a(i)
Definition sha256.c:41

◆ MIN

#define MIN ( a,
b )
Value:
( (a) < (b) ? (a) : (b) )

◆ MML_RANGE

#define MML_RANGE   (ZSTD_MINMATCH_MAX - ZSTD_MINMATCH_MIN + 1)

◆ NB_LEVELS_TRACKED

#define NB_LEVELS_TRACKED   22 /* ensured being >= ZSTD_maxCLevel() in BMK_init_level_constraints() */

◆ PARAM_UNSET

#define PARAM_UNSET   ((U32)-2) /* can't be -1 b/c fadt uses -1 */

◆ PARAMTABLELOG

#define PARAMTABLELOG   25

◆ PARAMTABLEMASK

#define PARAMTABLEMASK   (PARAMTABLESIZE-1)

◆ PARAMTABLESIZE

#define PARAMTABLESIZE   (1<<PARAMTABLELOG)

◆ PARSE_SUB_ARGS

#define PARSE_SUB_ARGS ( stringLong,
stringShort,
variable )
Value:
{ \
if ( longCommandWArg(&argument, stringLong) \
|| longCommandWArg(&argument, stringShort) ) { \
variable = readU32FromChar(&argument); \
if (argument[0]==',') { \
argument++; continue; \
} else break; \
} }

◆ PROGRAM_DESCRIPTION

#define PROGRAM_DESCRIPTION   "ZSTD parameters tester"

◆ SIZE_RESULT

#define SIZE_RESULT   5

◆ SLOG_RANGE

#define SLOG_RANGE   (ZSTD_SEARCHLOG_MAX - ZSTD_SEARCHLOG_MIN + 1)

◆ SPEED_RESULT

#define SPEED_RESULT   4

◆ STRT_RANGE

#define STRT_RANGE   (ZSTD_STRATEGY_MAX - ZSTD_STRATEGY_MIN + 1)

◆ TIMED

#define TIMED   0

◆ TIMELOOP_NANOSEC

#define TIMELOOP_NANOSEC   (1*1000000000ULL) /* 1 second */

◆ TLEN_RANGE

#define TLEN_RANGE   17

◆ TRY_DECAY

#define TRY_DECAY   1

◆ VARIANCE

#define VARIANCE   1.2

◆ WELCOME_MESSAGE

#define WELCOME_MESSAGE   "*** %s %s %i-bits, by %s ***\n", PROGRAM_DESCRIPTION, ZSTD_VERSION_STRING, (int)(sizeof(void*)*8), AUTHOR

◆ WLOG_RANGE

#define WLOG_RANGE   (ZSTD_WINDOWLOG_MAX - ZSTD_WINDOWLOG_MIN + 1)

◆ WORSE_RESULT

#define WORSE_RESULT   0

◆ ZSTD_STATIC_LINKING_ONLY

#define ZSTD_STATIC_LINKING_ONLY   /* ZSTD_parameters, ZSTD_estimateCCtxSize */

Typedef Documentation

◆ winner_ll_node

typedef struct winner_ll_node winner_ll_node

Enumeration Type Documentation

◆ memoTableType_t

Enumerator
directMap 
xxhashMap 
noMemo 

◆ varInds_t

enum varInds_t
Enumerator
wlog_ind 
clog_ind 
hlog_ind 
slog_ind 
mml_ind 
tlen_ind 
strt_ind 
fadt_ind 
NUM_PARAMS 

Function Documentation

◆ main()

int main ( int argc,
const char ** argv )