Skip to content

FPGA: reduce snappy decompression simulation duration #1475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@




ALICE'S ADVENTURES IN WONDERLAND

Lewis Carroll

THE MILLENNIUM FULCRUM EDITION 2.9




CHAPTER I

Down the Rabbit-Hole


Alice was beginning to get very tired of sitting by her sister
on the bank, and of having nothing to do: once or twice she had
peeped into the book her sister was reading, but it had no
pictures or conversations in it, `and what is the use of a book,'
thought Alice `without pictures or conversation?'
Original file line number Diff line number Diff line change
Expand Up @@ -240,23 +240,37 @@ bool RunGzipTest(sycl::queue& q, GzipDecompressorT decompressor,
bool RunSnappyTest(sycl::queue& q, SnappyDecompressorT decompressor,
const std::string test_dir) {


#ifdef FPGA_SIMULATOR
std::cout << ">>>>> Alice In Wonderland Test <<<<<" << std::endl;
std::string alice_in_file = test_dir + "/alice29.txt.sz";
std::string alice_in_file = test_dir + "/alice29_small.txt.sz";
auto in_bytes = ReadInputFile(alice_in_file);
auto result = decompressor.DecompressBytes(q, in_bytes, 1, false);

std::string alice_ref_file = test_dir + "/alice29.ref.txt";
std::string alice_ref_file = test_dir + "/alice29_small_ref.txt";
auto ref_bytes = ReadInputFile(alice_ref_file);
bool alice_test_pass =
(result != std::nullopt) && (result.value() == ref_bytes);

PrintTestResults("Alice In Wonderland Test", alice_test_pass);
std::cout << std::endl;

#ifdef FPGA_SIMULATOR
return alice_test_pass;
#else

std::cout << ">>>>> Alice In Wonderland Test <<<<<" << std::endl;
std::string alice_in_file = test_dir + "/alice29.txt.sz";
auto in_bytes = ReadInputFile(alice_in_file);
auto result = decompressor.DecompressBytes(q, in_bytes, 1, false);

std::string alice_ref_file = test_dir + "/alice29.ref.txt";
auto ref_bytes = ReadInputFile(alice_ref_file);
bool alice_test_pass =
(result != std::nullopt) && (result.value() == ref_bytes);

PrintTestResults("Alice In Wonderland Test", alice_test_pass);
std::cout << std::endl;

std::cout << ">>>>> Only Literal Strings Test <<<<<" << std::endl;
auto test1_bytes = GenerateSnappyCompressedData(333, 3, 0, 0, 3);
auto test1_ret = decompressor.DecompressBytes(q, test1_bytes, 1, false);
Expand Down