BitUtil: delta, zigzag, bitsnum,...
This commit is contained in:
21
bitutil.h
21
bitutil.h
@ -96,25 +96,30 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// get maximum bit length of the elements in the integer array
|
// get maximum bit length of the elements in the integer array
|
||||||
unsigned bit32( unsigned *in, unsigned n);
|
unsigned bit32( unsigned *in, unsigned n);
|
||||||
|
|
||||||
// transform sorted integer array to delta array. inc = increment
|
// transform sorted integer array to delta array. inc = increment
|
||||||
unsigned bitdelta32(unsigned *in, unsigned n, unsigned *out, unsigned start, unsigned inc);
|
unsigned bitdelta32(unsigned *in, unsigned n, unsigned *out, unsigned start, unsigned inc);
|
||||||
unsigned bitdelta64(uint64_t *in, unsigned n, uint64_t *out, uint64_t start, unsigned inc);
|
unsigned bitdelta64(uint64_t *in, unsigned n, uint64_t *out, uint64_t start, unsigned inc);
|
||||||
|
|
||||||
// get delta maximum bit length of the non decreasing integer array
|
// get delta maximum bit length of the non decreasing integer array
|
||||||
unsigned bitd32( unsigned *in, unsigned n, unsigned start);
|
unsigned bitd32( unsigned *in, unsigned n, unsigned start);
|
||||||
|
|
||||||
// get delta maximum bit length of the non strictly decreasing integer array
|
// get delta maximum bit length of the non strictly decreasing integer array
|
||||||
unsigned bitd132(unsigned *in, unsigned n, unsigned start);
|
unsigned bitd132( unsigned *in, unsigned n, unsigned start);
|
||||||
|
|
||||||
void bitund32( unsigned *p, unsigned n, unsigned x);
|
void bitund32( unsigned *p, unsigned n, unsigned x);
|
||||||
void bitund64( uint64_t *p, unsigned n, uint64_t x);
|
void bitund64( uint64_t *p, unsigned n, uint64_t x);
|
||||||
|
|
||||||
void bitundx32(unsigned *p, unsigned n, unsigned x, unsigned inc);
|
void bitundx32( unsigned *p, unsigned n, unsigned x, unsigned inc);
|
||||||
void bitundx64(uint64_t *p, unsigned n, uint64_t x, unsigned inc);
|
void bitundx64( uint64_t *p, unsigned n, uint64_t x, unsigned inc);
|
||||||
|
|
||||||
void bitund132(unsigned *p, unsigned n, unsigned x);
|
void bitund132( unsigned *p, unsigned n, unsigned x);
|
||||||
|
|
||||||
|
// for
|
||||||
|
unsigned bitf32( unsigned *in, unsigned n, unsigned start);
|
||||||
|
unsigned bitf132( unsigned *in, unsigned n, unsigned start);
|
||||||
|
unsigned bitfm32( unsigned *in, unsigned n, unsigned *pmin);
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user