Skip to content
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

Fix - the failures in xzlib with libz.so of data_compression/L3/demos/libzso #131

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Prev Previous commit
Next Next commit
Replaced the wrong enum values COMPRESS/DECOMPRESS with COMP_ONLY/DEC…
…OMP_ONLY for m_cdflow.

The function compares cd_flow to COMPRESS/DECOMPRESS while the arguments are COMP_ONLY/DECOMP_ONLY in zlibDriver.cpp.
  • Loading branch information
Takeshi Ogasawara committed May 8, 2022
commit c5836059296a4af769444d0afe0dbe430671b3de
12 changes: 6 additions & 6 deletions data_compression/common/libs/compress/gzipOCLHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,13 +178,13 @@ int gzipOCLHost::init(const std::string& binaryFileName, uint8_t m_kidx) {
// Create Command Queue
// Compress Command Queue & Kernel Setup
// OCL_CHECK(err, m_def_q = new cl::CommandQueue(*m_context, m_device, m_isProfile, &err));
if ((m_cdflow == BOTH) || (m_cdflow == COMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == COMP_ONLY)) {
OCL_CHECK(err,
m_def_q = new cl::CommandQueue(*m_context, m_device, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE, &err));
}

// DeCompress Command Queue & Kernel Setup
if ((m_cdflow == BOTH) || (m_cdflow == DECOMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == DECOMP_ONLY)) {
for (uint8_t i = 0; i < D_COMPUTE_UNIT; i++) {
OCL_CHECK(err, m_q_dec[i] = new cl::CommandQueue(*m_context, m_device, CL_QUEUE_PROFILING_ENABLE, &err));
OCL_CHECK(err, m_q_rd[i] = new cl::CommandQueue(*m_context, m_device, CL_QUEUE_PROFILING_ENABLE, &err));
Expand Down Expand Up @@ -306,16 +306,16 @@ gzipOCLHost::gzipOCLHost(enum State flow,
return;
}

if ((m_cdflow == BOTH) || (m_cdflow == COMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == COMP_ONLY)) {
m_memMgrCmp = new memoryManager(8, m_context, sb_opt, m_def_q);
}

if ((m_cdflow == BOTH) || (m_cdflow == DECOMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == DECOMP_ONLY)) {
m_memMgrDecMM2S = new memoryManager(8, m_context, sb_opt, m_rd_q);
m_memMgrDecS2MM = new memoryManager(8, m_context, sb_opt, m_wr_q);
}

if ((m_cdflow == BOTH) || (m_cdflow == COMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == COMP_ONLY)) {
if (isSlaveBridge()) {
h_buf_checksum = (uint32_t*)m_memMgrCmp->create_host_buffer(CL_MEM_READ_WRITE, sizeof(uint32_t),
&(buffer_checksum_data));
Expand All @@ -335,7 +335,7 @@ gzipOCLHost::gzipOCLHost(enum State flow,
}
}

if ((m_cdflow == BOTH) || (m_cdflow == DECOMPRESS)) {
if ((m_cdflow == BOTH) || (m_cdflow == DECOMP_ONLY)) {
// Decompression host buffer allocation
for (int j = 0; j < DIN_BUFFERCOUNT; ++j)
MEM_ALLOC_CHECK(h_dbufstream_in[j].resize(INPUT_BUFFER_SIZE), INPUT_BUFFER_SIZE, "Input Buffer");
Expand Down