CMGDK r49-rc2
组合类型 | 宏定义 | 类型定义 | 函数
K:/CMGDKv18/SDK/Source/SQL/MySQL/include/my_bitmap.h文件参考
#include <m_string.h>

浏览该文件的源代码。

组合类型

struct  st_bitmap

宏定义

#define MY_BIT_NONE   (~(uint) 0)
#define bitmap_buffer_size(bits)   (((bits)+31)/32)*4
#define no_bytes_in_map(map)   (((map)->n_bits + 7)/8)
#define no_words_in_map(map)   (((map)->n_bits + 31)/32)
#define bytes_word_aligned(bytes)   (4*((bytes + 3)/4))
#define _bitmap_set_bit(MAP, BIT)
#define _bitmap_flip_bit(MAP, BIT)
#define _bitmap_clear_bit(MAP, BIT)
#define _bitmap_is_set(MAP, BIT)
#define bitmap_clear_all(MAP)   { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); }
#define bitmap_set_all(MAP)   (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
#define bit_is_set(I, B)
#define bit_do_set(I, B)
#define bit_do_clear(I, B)

类型定义

typedef uint32 my_bitmap_map
typedef struct st_bitmap MY_BITMAP

函数

void create_last_word_mask (MY_BITMAP *map)
my_bool bitmap_init (MY_BITMAP *map, my_bitmap_map *buf, uint n_bits, my_bool thread_safe)
my_bool bitmap_is_clear_all (const MY_BITMAP *map)
my_bool bitmap_is_prefix (const MY_BITMAP *map, uint prefix_size)
my_bool bitmap_is_set_all (const MY_BITMAP *map)
my_bool bitmap_is_subset (const MY_BITMAP *map1, const MY_BITMAP *map2)
my_bool bitmap_is_overlapping (const MY_BITMAP *map1, const MY_BITMAP *map2)
my_bool bitmap_test_and_set (MY_BITMAP *map, uint bitmap_bit)
my_bool bitmap_test_and_clear (MY_BITMAP *map, uint bitmap_bit)
my_bool bitmap_fast_test_and_set (MY_BITMAP *map, uint bitmap_bit)
uint bitmap_set_next (MY_BITMAP *map)
uint bitmap_get_first (const MY_BITMAP *map)
uint bitmap_get_first_set (const MY_BITMAP *map)
uint bitmap_bits_set (const MY_BITMAP *map)
void bitmap_free (MY_BITMAP *map)
void bitmap_set_above (MY_BITMAP *map, uint from_byte, uint use_bit)
void bitmap_set_prefix (MY_BITMAP *map, uint prefix_size)
void bitmap_intersect (MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_subtract (MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_union (MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_xor (MY_BITMAP *map, const MY_BITMAP *map2)
void bitmap_invert (MY_BITMAP *map)
void bitmap_copy (MY_BITMAP *map, const MY_BITMAP *map2)
uint bitmap_lock_set_next (MY_BITMAP *map)
void bitmap_lock_clear_bit (MY_BITMAP *map, uint bitmap_bit)

宏定义文档

#define _bitmap_clear_bit (   MAP,
  BIT 
)
值:
(((uchar*)(MAP)->bitmap)[(BIT) / 8] \
                                  &= ~ (1 << ((BIT) & 7)))
#define _bitmap_flip_bit (   MAP,
  BIT 
)
值:
(((uchar*)(MAP)->bitmap)[(BIT) / 8] \
                                  ^= (1 << ((BIT) & 7)))
#define _bitmap_is_set (   MAP,
  BIT 
)
值:
(uint) (((uchar*)(MAP)->bitmap)[(BIT) / 8] \
                                         & (1 << ((BIT) & 7)))
#define _bitmap_set_bit (   MAP,
  BIT 
)
值:
(((uchar*)(MAP)->bitmap)[(BIT) / 8] \
                                  |= (1 << ((BIT) & 7)))
#define bit_do_clear (   I,
 
)
值:
(sizeof(I) * CHAR_BIT > (B) ?         \
                           ((I) &= ~(1ULL << (B)), 0) : -1)
#define bit_do_set (   I,
 
)
值:
(sizeof(I) * CHAR_BIT > (B) ?         \
                           ((I) |= (1ULL << (B)), 1) : -1)
#define bit_is_set (   I,
 
)
值:
(sizeof(I) * CHAR_BIT > (B) ?                 \
                           (((I) & (1ULL << (B))) == 0 ? 0 : 1) : -1)

check, set and clear a bit of interest of an integer. If the bit is out of range

返回值:
-1.Otherwise bit_is_set
返回:
0 or 1 reflecting the bit is set or not; bit_do_set
1 (bit is set 1) bit_do_clear
0 (bit is cleared to 0)
#define bitmap_buffer_size (   bits)    (((bits)+31)/32)*4
#define bitmap_clear_all (   MAP)    { memset((MAP)->bitmap, 0, 4*no_words_in_map((MAP))); }
#define bitmap_set_all (   MAP)    (memset((MAP)->bitmap, 0xFF, 4*no_words_in_map((MAP))))
#define bytes_word_aligned (   bytes)    (4*((bytes + 3)/4))
#define MY_BIT_NONE   (~(uint) 0)
#define no_bytes_in_map (   map)    (((map)->n_bits + 7)/8)
#define no_words_in_map (   map)    (((map)->n_bits + 31)/32)

类型定义文档

typedef struct st_bitmap MY_BITMAP
typedef uint32 my_bitmap_map

函数文档

uint bitmap_bits_set ( const MY_BITMAP map)
void bitmap_copy ( MY_BITMAP map,
const MY_BITMAP map2 
)
my_bool bitmap_fast_test_and_set ( MY_BITMAP map,
uint  bitmap_bit 
)
void bitmap_free ( MY_BITMAP map)
uint bitmap_get_first ( const MY_BITMAP map)
uint bitmap_get_first_set ( const MY_BITMAP map)
my_bool bitmap_init ( MY_BITMAP map,
my_bitmap_map buf,
uint  n_bits,
my_bool  thread_safe 
)
void bitmap_intersect ( MY_BITMAP map,
const MY_BITMAP map2 
)
void bitmap_invert ( MY_BITMAP map)
my_bool bitmap_is_clear_all ( const MY_BITMAP map)
my_bool bitmap_is_overlapping ( const MY_BITMAP map1,
const MY_BITMAP map2 
)
my_bool bitmap_is_prefix ( const MY_BITMAP map,
uint  prefix_size 
)
my_bool bitmap_is_set_all ( const MY_BITMAP map)
my_bool bitmap_is_subset ( const MY_BITMAP map1,
const MY_BITMAP map2 
)
void bitmap_lock_clear_bit ( MY_BITMAP map,
uint  bitmap_bit 
)
uint bitmap_lock_set_next ( MY_BITMAP map)
void bitmap_set_above ( MY_BITMAP map,
uint  from_byte,
uint  use_bit 
)
uint bitmap_set_next ( MY_BITMAP map)
void bitmap_set_prefix ( MY_BITMAP map,
uint  prefix_size 
)
void bitmap_subtract ( MY_BITMAP map,
const MY_BITMAP map2 
)
my_bool bitmap_test_and_clear ( MY_BITMAP map,
uint  bitmap_bit 
)
my_bool bitmap_test_and_set ( MY_BITMAP map,
uint  bitmap_bit 
)
void bitmap_union ( MY_BITMAP map,
const MY_BITMAP map2 
)
void bitmap_xor ( MY_BITMAP map,
const MY_BITMAP map2 
)
void create_last_word_mask ( MY_BITMAP map)
 全部  名字空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义