GENIE
genie::compression::DeviceBitPackingCodec Class Reference

#include <DeviceBitPackingCodec.h>

Inheritance diagram for genie::compression::DeviceBitPackingCodec:
genie::compression::DeviceIntegerCODEC

Classes

struct  DeviceIntegratedBlockPacker
 
struct  DeviceNoDeltaBlockPacker
 

Public Member Functions

void encodeArray (uint32_t *in, const size_t length, uint32_t *out, size_t &nvalue)
 
const uint32_t * decodeArray (const uint32_t *in, const size_t, uint32_t *out, size_t &nvalue)
 
__device__ uint32_t * decodeArraySequential (uint32_t *d_in, size_t, uint32_t *d_out, size_t &nvalue)
 
__device__ uint32_t * decodeArrayParallel (uint32_t *d_in, size_t, uint32_t *d_out, size_t &capacity)
 
std::string name () const
 
__device__ __host__ int decodeArrayParallel_maxBlocks ()
 
__device__ __host__ int decodeArrayParallel_minEffectiveLength ()
 
__device__ __host__ int decodeArrayParallel_lengthPerBlock ()
 
__device__ __host__ int decodeArrayParallel_threadsPerBlock ()
 
__device__ __host__ int decodeArrayParallel_threadLoad ()
 
- Public Member Functions inherited from genie::compression::DeviceIntegerCODEC
__device__ __host__ DeviceIntegerCODEC ()
 
__device__ const uint32_t * decodeArraySequential (const uint32_t *d_in, const size_t length, uint32_t *d_out, size_t &nvalue)
 
__device__ const uint32_t * decodeArrayParallel (const uint32_t *d_in, const size_t length, uint32_t *d_out, size_t &nvalue)
 

Static Public Member Functions

__device__ static __host__ bool divisibleby (size_t a, uint32_t x)
 

Static Public Attributes

static const uint32_t MiniBlockSize = 32
 
static const uint32_t HowManyMiniBlocks = 4
 
static const uint32_t BlockSize = MiniBlockSize
 

Detailed Description

This class defines an integer codec for binary packing of blocks of 32 integers. The block bit sizes are stored as 4 values uint8_t at the beginning of each block.

Based on BlockPacker from Daniel Lemire.

By default does not use inegrated delta encoding.

Support decoding from withing a CUDA kernel.

Definition at line 37 of file DeviceBitPackingCodec.h.

Member Function Documentation

◆ decodeArray()

const uint32_t * genie::compression::DeviceBitPackingCodec::decodeArray ( const uint32_t *  in,
const size_t  ,
uint32_t *  out,
size_t &  nvalue 
)
virtual

Implements genie::compression::DeviceIntegerCODEC.

Definition at line 61 of file DeviceBitPackingCodec.cu.

◆ decodeArrayParallel()

__device__ uint32_t * genie::compression::DeviceBitPackingCodec::decodeArrayParallel ( uint32_t *  d_in,
size_t  ,
uint32_t *  d_out,
size_t &  capacity 
)

Definition at line 144 of file DeviceBitPackingCodec.cu.

◆ decodeArrayParallel_lengthPerBlock()

__device__ __host__ int genie::compression::DeviceBitPackingCodec::decodeArrayParallel_lengthPerBlock ( )
inlinevirtual

Maximal uncompressed (or compressed) size of the array the codec is able to process

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 118 of file DeviceBitPackingCodec.h.

◆ decodeArrayParallel_maxBlocks()

__device__ __host__ int genie::compression::DeviceBitPackingCodec::decodeArrayParallel_maxBlocks ( )
inlinevirtual

The amount of CUDA blocks this codec is able to operate on at the same time

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 116 of file DeviceBitPackingCodec.h.

◆ decodeArrayParallel_minEffectiveLength()

__device__ __host__ int genie::compression::DeviceBitPackingCodec::decodeArrayParallel_minEffectiveLength ( )
inlinevirtual

Minimal effective lenth of the compression

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 117 of file DeviceBitPackingCodec.h.

◆ decodeArrayParallel_threadLoad()

__device__ __host__ int genie::compression::DeviceBitPackingCodec::decodeArrayParallel_threadLoad ( )
inlinevirtual

Number of decompressed values extracted by a single thread

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 120 of file DeviceBitPackingCodec.h.

◆ decodeArrayParallel_threadsPerBlock()

__device__ __host__ int genie::compression::DeviceBitPackingCodec::decodeArrayParallel_threadsPerBlock ( )
inlinevirtual

Maximal number of threads per single block

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 119 of file DeviceBitPackingCodec.h.

◆ decodeArraySequential()

__device__ uint32_t * genie::compression::DeviceBitPackingCodec::decodeArraySequential ( uint32_t *  d_in,
size_t  ,
uint32_t *  d_out,
size_t &  nvalue 
)

Definition at line 102 of file DeviceBitPackingCodec.cu.

◆ divisibleby()

__device__ static __host__ bool genie::compression::DeviceBitPackingCodec::divisibleby ( size_t  a,
uint32_t  x 
)
inlinestatic

Definition at line 103 of file DeviceBitPackingCodec.h.

◆ encodeArray()

void genie::compression::DeviceBitPackingCodec::encodeArray ( uint32_t *  in,
const size_t  length,
uint32_t *  out,
size_t &  nvalue 
)
virtual

Implements genie::compression::DeviceIntegerCODEC.

Definition at line 16 of file DeviceBitPackingCodec.cu.

◆ name()

std::string genie::compression::DeviceBitPackingCodec::name ( ) const
inlinevirtual

Reimplemented from genie::compression::DeviceIntegerCODEC.

Definition at line 114 of file DeviceBitPackingCodec.h.

Member Data Documentation

◆ BlockSize

const uint32_t genie::compression::DeviceBitPackingCodec::BlockSize = MiniBlockSize
static

Definition at line 42 of file DeviceBitPackingCodec.h.

◆ HowManyMiniBlocks

const uint32_t genie::compression::DeviceBitPackingCodec::HowManyMiniBlocks = 4
static

Definition at line 41 of file DeviceBitPackingCodec.h.

◆ MiniBlockSize

const uint32_t genie::compression::DeviceBitPackingCodec::MiniBlockSize = 32
static

Definition at line 40 of file DeviceBitPackingCodec.h.


The documentation for this class was generated from the following files: