.. index:: pair: class; xf::compression::xfZlib .. _doxid-classxf_1_1compression_1_1xfZlib: .. _cid-xf::compression::xfzlib: class xf::compression::xfZlib ============================= .. toctree:: :hidden: .. code-block:: cpp :class: overview-code-block #include "zlib.hpp" Overview ~~~~~~~~ :ref:`xfZlib ` class. .. _doxid-classxf_1_1compression_1_1xfZlib_1a055669f3d7d7dfe98761b48b0b3ae307: .. _cid-xf::compression::xfzlib::deflate_buffer: .. _doxid-classxf_1_1compression_1_1xfZlib_1aa2477f22a23fc8ce1ffa8c968c588f29: .. _cid-xf::compression::xfzlib::get_event_duration_ns: .. ref-code-block:: cpp :class: overview-code-block .. FunctionSection Methods ~~~~~~~ .. _doxid-classxf_1_1compression_1_1xfZlib_1aac31d05070fc44eaa7b73e39d1e55387: .. _cid-xf::compression::xfzlib::compress_buffer: compress_buffer --------------- .. ref-code-block:: cpp :class: title-code-block size_t compress_buffer ( uint8_t* in, uint8_t* out, size_t input_size, uint32_t host_buffer_size = HOST_BUFFER_SIZE, int cu = 0 ) This method does the overlapped execution of compression where data transfers and kernel computation are overlapped. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - input byte sequence * - out - output byte sequence * - input_size - input size * - host_buffer_size - buffer size for kernel * - cu - comput unit name .. _doxid-classxf_1_1compression_1_1xfZlib_1aa6fc980499fbe77fb8c760362140cc97: .. _cid-xf::compression::xfzlib::deflate_buffer-2: deflate_buffer -------------- .. ref-code-block:: cpp :class: title-code-block size_t deflate_buffer ( uint8_t* in, uint8_t* out, size_t& input_size, bool& last_data, bool last_buffer, const std::string& cu ) This method does the overlapped execution of decompression where data transfers and kernel computation are overlapped. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - input byte sequence * - out - output byte sequence * - input_size - input size * - last_data - last compressed output buffer * - last_buffer - last input buffer * - cu - comput unit name .. _doxid-classxf_1_1compression_1_1xfZlib_1a5dc1443008daebba8e3aa47c1962434a: .. _cid-xf::compression::xfzlib::decompress: decompress ---------- .. ref-code-block:: cpp :class: title-code-block size_t decompress ( uint8_t* in, uint8_t* out, size_t actual_size, size_t max_outbuf_size, int cu_run = 0 ) This method does serial execution of decompression where data transfers and kernel execution in serial manner. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - input byte sequence * - out - output byte sequence * - actual_size - input size * - cu_run - compute unit number .. _doxid-classxf_1_1compression_1_1xfZlib_1aed3a52d3bcb4e2603d367a559c85e175: .. _cid-xf::compression::xfzlib::compress: compress -------- .. ref-code-block:: cpp :class: title-code-block size_t compress ( uint8_t* in, uint8_t* out, size_t input_size, int cu, int level = 1, int strategy = 0, int window_bits = 15 ) This API does end to end compression in a single call. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - input byte sequence * - out - output byte sequence * - input_size - input size .. _doxid-classxf_1_1compression_1_1xfZlib_1a4dae7f3471aa3788ffc0c11a9b6196fc: .. _cid-xf::compression::xfzlib::compress_file: compress_file ------------- .. ref-code-block:: cpp :class: title-code-block uint64_t compress_file ( std::string& inFile_name, std::string& outFile_name, uint64_t input_size, int cu_run = 0 ) This method does file operations and invokes compress API which internally does zlib compression on FPGA in overlapped manner. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inFile_name - input file name * - outFile_name - output file name * - actual_size - input size .. _doxid-classxf_1_1compression_1_1xfZlib_1a847206ba337f6811dbd477c1533586c3: .. _cid-xf::compression::xfzlib::decompress_file: decompress_file --------------- .. ref-code-block:: cpp :class: title-code-block uint32_t decompress_file ( std::string& inFile_name, std::string& outFile_name, uint64_t input_size, int cu_run ) This method does file operations and invokes decompress API which internally does zlib decompression on FPGA in overlapped manner. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - inFile_name - input file name * - outFile_name - output file name * - input_size - input size * - cu_run - compute unit number .. _doxid-classxf_1_1compression_1_1xfZlib_1a6bfce462da5c36380222b69972dfbfd4: .. _cid-xf::compression::xfzlib::xfzlib: xfZlib ------ xfZlib overload (1) +++++++++++++++++++ .. ref-code-block:: cpp :class: title-code-block xfZlib ( const std::string& binaryFile, uint8_t cd_flow, const cl::Device& device, const cl_context_properties& platform, enum design_flow dflow = XILINX_GZIP ) Constructor responsible for creating various host/device buffers. This skips the creation of platform and device steps. .. _doxid-classxf_1_1compression_1_1xfZlib_1a7712b200970e31a07526a43b40661dfe: .. _cid-xf::compression::xfzlib::xfzlib-2: xfZlib overload (2) +++++++++++++++++++ .. ref-code-block:: cpp :class: title-code-block xfZlib ( const std::string& binaryFile, uint8_t c_max_cr = MAX_CR, uint8_t cd_flow = BOTH, uint8_t device_id = 0, uint8_t profile = 0, uint8_t d_type = DYNAMIC, enum design_flow dflow = XILINX_GZIP ) Constructor responsible for creating various host/device buffers. .. _doxid-classxf_1_1compression_1_1xfZlib_1a50efe5b6226616a043af9044323a982a: .. _cid-xf::compression::xfzlib::init: init ---- .. ref-code-block:: cpp :class: title-code-block int init ( const std::string& binaryFile, uint8_t dtype, bool skipPlatformCheck = false ) OpenCL setup initialization. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - binaryFile - .. _doxid-classxf_1_1compression_1_1xfZlib_1a161a134c573011f422026e83597b96b3: .. _cid-xf::compression::xfzlib::release: release ------- .. ref-code-block:: cpp :class: title-code-block void release () OpenCL setup release. .. _doxid-classxf_1_1compression_1_1xfZlib_1a6904dbfc6bf5a6f9917fb727ed5e391d: .. _cid-xf::compression::xfzlib::~xfzlib: ~xfZlib ------- .. ref-code-block:: cpp :class: title-code-block ~xfZlib () Release host/device memory. .. _doxid-classxf_1_1compression_1_1xfZlib_1a287855eea3200b5fb64a09bce2e19f67: .. _cid-xf::compression::xfzlib::error_code: error_code ---------- .. ref-code-block:: cpp :class: title-code-block int error_code (void) error_code of a OpenCL call .. _doxid-classxf_1_1compression_1_1xfZlib_1a334578509391cdb59adf3fc8dada79eb: .. _cid-xf::compression::xfzlib::get_checksum: get_checksum ------------ .. ref-code-block:: cpp :class: title-code-block uint32_t get_checksum (void) returns check sum value (CRC32/Adler32) .. _doxid-classxf_1_1compression_1_1xfZlib_1aa0659ec7543b798f008891b160deeed3: .. _cid-xf::compression::xfzlib::set_checksum: set_checksum ------------ .. ref-code-block:: cpp :class: title-code-block void set_checksum (uint32_t cval) set check sum value (CRC32/Adler32) .. _doxid-classxf_1_1compression_1_1xfZlib_1ac893340263a91d6429824fa68e93d39e: .. _cid-xf::compression::xfzlib::getcompresskernel: getCompressKernel ----------------- .. ref-code-block:: cpp :class: title-code-block std::string getCompressKernel (int index) get compress kernel name .. _doxid-classxf_1_1compression_1_1xfZlib_1a396520949b83c409a780da720a35ce01: .. _cid-xf::compression::xfzlib::getdecompresskernel: getDeCompressKernel ------------------- .. ref-code-block:: cpp :class: title-code-block std::string getDeCompressKernel (int index) get decompress kernel name .. _doxid-classxf_1_1compression_1_1xfZlib_1ab52ee4c6869563448f489cd3c81dd2da: .. _cid-xf::compression::xfzlib::compress_buffer-2: compress_buffer --------------- .. ref-code-block:: cpp :class: title-code-block size_t compress_buffer ( uint8_t* in, uint8_t* out, size_t actual_size, bool last_buffer = true, uint32_t host_buffer_size = HOST_BUFFER_SIZE, int cu = 0 ) This method does the overlapped execution of compression where data transfers and kernel computation are overlapped. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - in - input byte sequence * - out - output byte sequence * - actual_size - input size * - last_buffer - * - host_buffer_size - host buffer size .. _doxid-classxf_1_1compression_1_1xfZlib_1a87f13a66b1928934295c46677666fabe: .. _cid-xf::compression::xfzlib::init-2: init ---- .. ref-code-block:: cpp :class: title-code-block int init ( const std::string& binaryFile, uint8_t dtype ) OpenCL setup initialization. .. rubric:: Parameters: .. list-table:: :widths: 20 80 * - binaryFile -