diff options
author | Reto Koradi <reto@fb.com> | 2019-11-04 19:51:41 (GMT) |
---|---|---|
committer | Reto Koradi <reto@fb.com> | 2019-11-06 07:38:00 (GMT) |
commit | cc91777c98d71194c9d29544f84880742ffdf86c (patch) | |
tree | a292c1082221dcf05549d1a88a3b6c36c93186d9 /programs/platform.h | |
parent | e8baeca51ef2003d6c9ec21c32f1563fef1065b9 (diff) | |
download | lz4-cc91777c98d71194c9d29544f84880742ffdf86c.zip lz4-cc91777c98d71194c9d29544f84880742ffdf86c.tar.gz lz4-cc91777c98d71194c9d29544f84880742ffdf86c.tar.bz2 |
Make benchmark compatible with dictionary compression
Support the -D command line option for running benchmarks. The
benchmark code was slightly restructured to factor out the calls
that need to be different for each benchmark scenario. Since there
are now 4 scenarios (all combinations of fast/HC and with/without
dictionary), the logic was getting somewhat convoluted otherwise.
This was done by extending the compressionParameters struct that
previously contained just a single function pointer. It now
contains 4 function pointers for init/reset/compress/cleanup,
with the related state. The functions get a pointer to the
structure as their first argument (inspired by C++), so that they
can access the state values in the struct.
Diffstat (limited to 'programs/platform.h')
0 files changed, 0 insertions, 0 deletions