Native API#

Note

Disclaimer: Native APIs are experimental and are subject to change in the next nvCOMP releases.

Bitcomp#

Typedefs

typedef struct bitcompContext *bitcompHandle_t#
typedef enum bitcompResult_t bitcompResult_t
typedef enum bitcompDataType_t bitcompDataType_t
typedef enum bitcompMode_t bitcompMode_t
typedef enum bitcompAlgorithm_t bitcompAlgorithm_t

Enums

enum bitcompResult_t#

Values:

enumerator BITCOMP_SUCCESS#
enumerator BITCOMP_INVALID_PARAMETER#
enumerator BITCOMP_INVALID_COMPRESSED_DATA#
enumerator BITCOMP_INVALID_ALIGNMENT#
enumerator BITCOMP_CUDA_KERNEL_LAUNCH_ERROR#
enumerator BITCOMP_CUDA_API_ERROR#
enumerator BITCOMP_UNKNOWN_ERROR#
enum bitcompDataType_t#

Values:

enumerator BITCOMP_UNSIGNED_8BIT#
enumerator BITCOMP_SIGNED_8BIT#
enumerator BITCOMP_UNSIGNED_16BIT#
enumerator BITCOMP_SIGNED_16BIT#
enumerator BITCOMP_UNSIGNED_32BIT#
enumerator BITCOMP_SIGNED_32BIT#
enumerator BITCOMP_UNSIGNED_64BIT#
enumerator BITCOMP_SIGNED_64BIT#
enumerator BITCOMP_FP16_DATA#
enumerator BITCOMP_FP32_DATA#
enumerator BITCOMP_FP64_DATA#
enum bitcompMode_t#

Values:

enumerator BITCOMP_LOSSLESS#
enumerator BITCOMP_LOSSY_FP_TO_SIGNED#
enumerator BITCOMP_LOSSY_FP_TO_UNSIGNED#
enum bitcompAlgorithm_t#

Values:

enumerator BITCOMP_DEFAULT_ALGO#
enumerator BITCOMP_SPARSE_ALGO#

Functions

bitcompResult_t bitcompCreatePlan(bitcompHandle_t *handle, size_t n, bitcompDataType_t dataType, bitcompMode_t mode, bitcompAlgorithm_t algo)#

Create a bitcomp plan for compression and decompression, lossy or lossless.

The lossless compression can be used on any data type, viewed as integral type. Choosing the right integral type will have an effect on the compression ratio.

Lossy compression: The lossy compression is only available for floating point data types, and is based on a quantization of the floating point values to integers. The floating point values are divided by the delta provided during the compression, and converted to integers. These integers are then compressed with a lossless encoder. Values that would overflow during quantization (e.g. large input values and a very small delta), as well as NaN, +Inf, -Inf will be handled correctly by the compression. The integers can be either signed or unsigned.

The same plan can be used on several devices or on the host, but associating the plan with a stream, or turning on remote compression acceleration will make a plan device-specific. Using a plan concurrently on more than one device is not supported.

Parameters:
  • handle[out] Handle created.

  • n[in] size of the uncompressed data in bytes.

  • dataType[in] Datatype of the uncompressed data.

  • mode[in] Compression mode, lossless or lossy to signed / lossy to unsigned.

  • algo[in] Which compression algorithm to use.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCreatePlanFromCompressedData(bitcompHandle_t *handle, const void *data)#

Create a handle from existing compressed data.

Parameters:
  • handle[out] Handle created.

  • data[in] Pointer to the compressed data, from which all the handle parameters will be extracted.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompDestroyPlan(bitcompHandle_t handle)#

Destroy an existing bitcomp handle.

Parameters:

handle[in] Handle to destroy.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCreateBatchPlan(bitcompHandle_t *handle, size_t nbatch, bitcompDataType_t dataType, bitcompMode_t mode, bitcompAlgorithm_t algo)#

Create a bitcomp plan for compression and decompression of batched inputs, lossy or lossless.

The lossless compression can be used on any data type, viewed as integral type. Choosing the right integral type will have an effect on the compression ratio.

Lossy compression: The lossy compression is only available for floating point data types, and is based on a quantization of the floating point values to integers. The floating point values are divided by the delta provided during the compression, and converted to integers. These integers are then compressed with a lossless encoder. Values that would overflow during quantization (e.g. large input values and a very small delta), as well as NaN, +Inf, -Inf will be handled correctly by the compression. The integers can be either signed or unsigned.

The batch API is recommended to work on lots of data streams, especially if the data streams are small. All the batches are processed in parallel, and it is recommended to have enough batches to load the GPU.

The same plan can be used on several devices or on the host, but associating the plan with a stream, or turning on remote compression acceleration will make a plan device-specific. Using a plan concurrently on more than one device is not supported.

Parameters:
  • handle[out] Handle created.

  • nbatch[in] Number of batches to process.

  • dataType[in] Datatype of the uncompressed data.

  • mode[in] Compression mode, lossless or lossy to signed / lossy to unsigned.

  • algo[in] Which compression algorithm to use.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCreateBatchPlanFromCompressedData(bitcompHandle_t *handle, const void *const *data, size_t batches)#

Create a batch handle from batch-compressed data. The data must be device-visible. Will return an error if the compressed data is invalid, or if the batches have not all be compressed with the same parameters (algorithm, data type, mode) This call will trigger synchronous activity in the default stream of the GPU, to analyze the data.

Parameters:
  • handle[out] Output handle, which can be use for batch compression or decompression.

  • data[in] Device-visible pointers, to the device-visible data of each batch.

  • batches[in] Number of batches.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompSetStream(bitcompHandle_t handle, cudaStream_t stream)#

Associate a bitcomp handle to a stream. All the subsequent operations will be done in the stream.

Parameters:
  • handle[inout] Bitcomp handle

  • stream[in] Stream to use.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompAccelerateRemoteCompression(bitcompHandle_t handle)#

Turn on compression acceleration when the compressed output is not in the global memory of the device running the compression (e.g. host pinned memory, or another device’s memory) This is optional and only affects the performance. NOTE: This makes the handle become device-specific. A plan that has this acceleration turned on should always be used on the same device.

Parameters:

handle[inout] Bitcomp handle.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCompressLossy_fp16(const bitcompHandle_t handle, const half *input, void *output, half delta)#

Compression for FP16 (half) data, running asynchronously on the device.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the device.

  • output[out] Pointer to the compressed data. Must be accessible from the device and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCompressLossy_fp32(const bitcompHandle_t handle, const float *input, void *output, float delta)#

Compression for 32-bit floating point data, running asynchronously on the device.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the device.

  • output[out] Pointer to the compressed data. Must be accessible from the device and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCompressLossy_fp64(const bitcompHandle_t handle, const double *input, void *output, double delta)#

Compression for 64-bit floating point data, running asynchronously on the device.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the device.

  • output[out] Pointer to the compressed data. Must be accessible from the device and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompCompressLossless(const bitcompHandle_t handle, const void *input, void *output)#
bitcompResult_t bitcompUncompress(const bitcompHandle_t handle, const void *input, void *output)#

Decompression, running asynchronously on the device.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the compressed data. Must be accessible from the device and 64-bit aligned.

  • output[out] Pointer to where the uncompressed data will be written.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompPartialUncompress(const bitcompHandle_t handle, const void *input, void *output, size_t start, size_t length)#

Partial decompression, running asynchronously on the device.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the compressed data. Must be accessible from the device and 64-bit aligned.

  • output[out] Pointer to where the partial uncompressed data will be written.

  • start[in] Offset in bytes relative to the original uncompressed size where to start decompressing.

  • length[in] Length in bytes of the partial decompression.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossless(const bitcompHandle_t handle, const void *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes)#

Lossless compression of batched input data on GPU. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossyScalar_fp16(const bitcompHandle_t handle, const half *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, half delta)#

Lossy compression of batched 32 input data on GPU, with a scalar quantization factor. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factor (scalar).

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossyScalar_fp32(const bitcompHandle_t handle, const float *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, float delta)#

Lossy compression of batched FP32 input data on GPU, with a scalar quantization factor. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factor (scalar).

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossyScalar_fp64(const bitcompHandle_t handle, const double *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, double delta)#

Lossy compression of batched FP64 input data on GPU, with a scalar quantization factor. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factor (scalar).

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossy_fp16(const bitcompHandle_t handle, const half *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, half *delta)#

Lossy compression of batched FP16 input data on GPU, with a per-batch quantization factors. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factors.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossy_fp32(const bitcompHandle_t handle, const float *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, float *delta)#

Lossy compression of batched FP32 input data on GPU, with a per-batch quantization factors. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factors.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchCompressLossy_fp64(const bitcompHandle_t handle, const double *const *inputs, void *const *outputs, const size_t *nbytes, size_t *outputSizes, double *delta)#

Lossy compression of batched FP64 input data on GPU, with a per-batch quantization factors All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • nbytes[in] Number of bytes for each batch.

  • outputSizes[out] Compressed sizes for each batch.

  • delta[in] Quantization factors.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchUncompress(const bitcompHandle_t handle, const void *const *inputs, void *const *outputs)#

Batch decompression on GPU. All arrays must be device-accessible. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error

bitcompResult_t bitcompBatchUncompressCheck(const bitcompHandle_t handle, const void *const *inputs, void *const *outputs, const size_t *output_buffer_sizes, bitcompResult_t *statuses)#

Batch decompression on GPU, with extra checks and individual statuses. Each batch will check if the output buffer is large enough. Some extra checks will also be performed to verify the compressed data is valid. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle set up for batch processing with bitcompCreateBatchPlan().

  • inputs[in] Uncompressed data input pointers for each batch.

  • outputs[out] Compressed data output pointers for each batch.

  • output_buffer_sizes[out] Output buffer sizes for each batch.

  • statuses[in] Status for each batch, will be set to BITCOMP_SUCCESS if everything was OK.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error

bitcompResult_t bitcompHostCompressLossy_fp16(const bitcompHandle_t handle, const half *input, void *output, half delta)#

Lossy compression for FP16 (half) data, running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream. before compressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the host.

  • output[out] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error

bitcompResult_t bitcompHostCompressLossy_fp32(const bitcompHandle_t handle, const float *input, void *output, float delta)#

Lossy compression for 32-bit floats, running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream before compressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the host.

  • output[out] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompHostCompressLossy_fp64(const bitcompHandle_t handle, const double *input, void *output, double delta)#

Lossy compression for 64-bit floats, running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream before compressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the host.

  • output[out] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

  • delta[in] Delta used for the integer quantization of the data. The maximum error between the uncompressed data and the original data should be <= delta.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompHostCompressLossless(const bitcompHandle_t handle, const void *input, void *output)#

Lossless compression (integral datatypes), running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream before compressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the uncompressed data. Must be accessible from the host.

  • output[out] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompHostUncompress(const bitcompHandle_t handle, const void *input, void *output)#

Decompression, running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream before decompressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

  • output[out] Pointer to the uncompressed data. Must be accessible from the host.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompHostPartialUncompress(const bitcompHandle_t handle, const void *input, void *output, size_t start, size_t length)#

Partial decompression, running on the host processor. This call is blocking. If a non-NULL stream was set in the handle, this call will synchronize the stream before decompressing the data. All arrays must be device accessible.

Parameters:
  • handle[in] Bitcomp handle.

  • input[in] Pointer to the compressed data. Must be accessible from the host and 64-bit aligned.

  • output[out] Pointer to where the partial uncompressed data will be written.

  • start[in] Offset in bytes relative to the original uncompressed size where to start decompressing.

  • length[in] Length in bytes of the partial decompression.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error

size_t bitcompMaxBuflen(size_t nbytes)#

Query the maximum size (worst case scenario) that the compression could generate given an input size.

Parameters:

nbytes[in] Size of the uncompressed data, in bytes.

Returns:

Returns the maximum size of the compressed data, in bytes.

bitcompResult_t bitcompGetCompressedSize(const void *compressedData, size_t *size)#

Query the compressed size from a compressed buffer. The pointers don’t have to be device-accessible. This is a blocking call. The compression must have completed before calling this function.

Parameters:
  • compressedData[in] Pointer to the compressed data.

  • size[out] Size of the compressed data, in bytes.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompGetCompressedSizeAsync(const void *compressedData, size_t *size, cudaStream_t stream)#

Query the compressed size from a compressed buffer, asynchronously. Both pointers must be device-accessible.

Parameters:
  • compressedData[in] Pointer to the compressed data.

  • size[out] Size of the compressed data, in bytes.

  • stream[in] Stream for asynchronous operation.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompGetUncompressedSize(const void *compressedData, size_t *size)#

Query the uncompressed size from a compressed buffer.

Parameters:
  • compressedData[in] Pointer to the compressed data buffer, The pointer doesn’t have to be device-accessible.

  • size[out] Size of the uncompressed data, in bytes.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompGetUncompressedSizeFromHandle(const bitcompHandle_t handle, size_t *bytes)#

Query the uncompressed size from a handle.

Parameters:
  • handle[in] handle.

  • bytes[out] Size in bytes of the uncompressed data.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompGetDataTypeFromHandle(const bitcompHandle_t handle, bitcompDataType_t *dataType)#

Query the uncompressed datatype from a handle.

Parameters:
  • handle[in] handle.

  • dataType[out] Data type of the uncompressed data.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompGetCompressedInfo(const void *compressedData, size_t *compressedDataSize, size_t *uncompressedSize, bitcompDataType_t *dataType, bitcompMode_t *mode, bitcompAlgorithm_t *algo)#

: Query compressed data information.

Parameters:
  • compressedData[in] Compressed data pointer. Doesn’t have to be device-accessible.

  • compressedDataSize[inout] Takes size of the compressed buffer. Stores actual size of the compressed data If the size of the compressed buffer is smaller than the actual size of the compressed data, BITCOMP_INVALID_PARAMETER will be returned.

  • uncompressedSize[out] The size of the uncompressed data in bytes.

  • dataType[out] The type of the compressed data.

  • mode[out] Compression mode (lossy or lossless).

  • algo[out] Bitcomp algorithm used (default, or sparse).

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchGetCompressedSizesAsync(const void *const *compressedData, size_t *compressedSizes, size_t batch, cudaStream_t stream)#

: Query compressed sizes for a batch of compressed buffers.

Parameters:
  • compressedData[in] Compressed data pointer. Must be device-accessible.

  • compressedSizes[out] Size of the compressed data, in bytes.

  • batch[in] Batch dimension.

  • stream[out] CUDA stream.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchGetUncompressedSizesAsync(const void *const *compressedData, size_t *uncompressedSizes, size_t batch, cudaStream_t stream)#

: Query uncompressed sizes for a batch of compressed buffers.

Parameters:
  • compressedData[in] Compressed data pointer. Must be device-accessible.

  • uncompressedSizes[out] The size of the uncompressed data, in bytes.

  • batch[in] Batch dimension.

  • stream[out] CUDA stream.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

bitcompResult_t bitcompBatchGetSizesAsync(const void *const *compressedData, size_t *compressedSizes, size_t *uncompressedSizes, size_t batch, cudaStream_t stream)#

: Query compressed and uncompressed sizes for a batch of compressed buffers.

Parameters:
  • compressedData[in] Compressed data pointer. Must be device-accessible.

  • compressedSizes[out] Size of the compressed data, in bytes.

  • uncompressedSizes[out] The size of the uncompressed data, in bytes.

  • batch[in] Batch dimension.

  • stream[out] CUDA stream.

Returns:

Returns BITCOMP_SUCCESS if successful, or an error.

Gdeflate CPU#

namespace gdeflate#

Functions

void decompressCPU(const void *const *in_ptr, const size_t *in_bytes, size_t batch_size, void *const *out_ptr, size_t *out_bytes)#

Perform decompression on the CPU.

Parameters:
  • in_ptr[in] The pointers on the CPU, to the compressed chunks.

  • in_bytes[in] The size of each compressed batch item on the CPU.

  • batch_size[in] The number of batch items.

  • out_ptr[out] The pointers on the CPU, to where to uncompress each chunk (output).

  • out_bytes[out] The pointers on the CPU to store the uncompressed sizes (output).

void compressCPU(const void *const *in_ptr, const size_t *in_bytes, const size_t max_chunk_size, size_t batch_size, void *const *out_ptr, size_t *out_bytes)#

Perform compression on the CPU.

Parameters:
  • in_ptr[in] The pointers on the CPU, to uncompressed batched items.

  • in_bytes[in] The size of each uncompressed batch item on the CPU.

  • max_chunk_size[in] The maximum size of a chunk.

  • batch_size[in] The number of batch items.

  • out_ptr[out] The pointers on the CPU, to the output location for each compressed batch item (output).

  • out_bytes[out] The compressed size of each chunk on the CPU (output).