ROFL-pipeline  v0.6.0dev
Data Structures | Typedefs | Functions
bitmap.h File Reference

Defines common bitmap operations, specially for large types. More...

#include <inttypes.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  bitmap128_t
 

Typedefs

typedef uint32_t bitmap32_t
 
typedef uint64_t bitmap64_t
 

Functions

static void bitmap128_clean (bitmap128_t *bitmap)
 Set bitmap to 0. More...
 
static void bitmap128_set_all (bitmap128_t *bitmap)
 Set bitmap to 1. More...
 
static bool bitmap128_is_bit_set (const bitmap128_t *bitmap, unsigned int pos)
 Check if bit is set in the 128bit bitmap. More...
 
static void bitmap128_set (bitmap128_t *bitmap, unsigned int pos)
 Set a bit in the 128bit bitmap. More...
 
static void bitmap128_unset (bitmap128_t *bitmap, unsigned int pos)
 Unset(zero) a bit in the 128bit bitmap. More...
 
static bool bitmap128_is_empty (bitmap128_t *bitmap)
 Is bitmap empty. More...
 
static bitmap128_t bitmap128_and (bitmap128_t *bitmap1, bitmap128_t *bitmap2)
 Make a logical and over to bitmaps. More...
 
static bool bitmap128_check_mask (bitmap128_t *bitmap, bitmap128_t *mask)
 Check whether a bitmap is within a certain mask (bitmap&mask == bitmap) More...
 

Detailed Description

Defines common bitmap operations, specially for large types.

Author
Marc Sune<marc.sune (at) bisdn.de>

Definition in file bitmap.h.

Function Documentation

static bitmap128_t bitmap128_and ( bitmap128_t bitmap1,
bitmap128_t bitmap2 
)
inlinestatic

Make a logical and over to bitmaps.

Definition at line 86 of file bitmap.h.

static bool bitmap128_check_mask ( bitmap128_t bitmap,
bitmap128_t mask 
)
inlinestatic

Check whether a bitmap is within a certain mask (bitmap&mask == bitmap)

Definition at line 99 of file bitmap.h.

static void bitmap128_clean ( bitmap128_t bitmap)
inlinestatic

Set bitmap to 0.

Definition at line 29 of file bitmap.h.

static bool bitmap128_is_bit_set ( const bitmap128_t bitmap,
unsigned int  pos 
)
inlinestatic

Check if bit is set in the 128bit bitmap.

Definition at line 45 of file bitmap.h.

static bool bitmap128_is_empty ( bitmap128_t bitmap)
inlinestatic

Is bitmap empty.

Definition at line 75 of file bitmap.h.

static void bitmap128_set ( bitmap128_t bitmap,
unsigned int  pos 
)
inlinestatic

Set a bit in the 128bit bitmap.

Definition at line 55 of file bitmap.h.

static void bitmap128_set_all ( bitmap128_t bitmap)
inlinestatic

Set bitmap to 1.

Definition at line 37 of file bitmap.h.

static void bitmap128_unset ( bitmap128_t bitmap,
unsigned int  pos 
)
inlinestatic

Unset(zero) a bit in the 128bit bitmap.

Definition at line 65 of file bitmap.h.