1
/* Copyright (C) 2000 MySQL AB
3
This program is free software; you can redistribute it and/or modify
4
it under the terms of the GNU General Public License as published by
5
the Free Software Foundation; version 2 of the License.
7
This program is distributed in the hope that it will be useful,
8
but WITHOUT ANY WARRANTY; without even the implied warranty of
9
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
GNU General Public License for more details.
12
You should have received a copy of the GNU General Public License
13
along with this program; if not, write to the Free Software
14
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
16
#ifndef DRIZZLED_SQL_BITMAP_H
17
#define DRIZZLED_SQL_BITMAP_H
20
Implementation of a bitmap type.
21
The idea with this is to be able to handle any constant number of bits but
22
also be able to use 32 or 64 bits bitmaps very efficiently
25
#include <drizzled/definitions.h>
26
#include <drizzled/util/test.h>
27
#include <drizzled/key_map.h>
31
#include <boost/dynamic_bitset.hpp>
36
typedef uint64_t table_map; /* Used for table bits in join */
37
typedef uint32_t nesting_map; /* Used for flags of nesting constructs */
40
static const uint32_t MY_BIT_NONE= UINT32_MAX;
42
bool bitmap_is_subset(const boost::dynamic_bitset<>& map1, const boost::dynamic_bitset<>& map2);
43
bool bitmap_is_overlapping(const boost::dynamic_bitset<>& map1,
44
const boost::dynamic_bitset<>& map2);
45
void bitmap_union(boost::dynamic_bitset<>& map, const boost::dynamic_bitset<>& map2);
46
/* Fast, not thread safe, bitmap functions */
47
/* This one is a define because it gets used in an array decl */
48
#define bitmap_buffer_size(bits) ((bits+31)/32)*4
50
} /* namespace drizzled */
52
#endif /* DRIZZLED_SQL_BITMAP_H */