bitMap.inline.hpp revision 809
0N/A * Copyright 2005-2006 Sun Microsystems, Inc. All Rights Reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 0N/A * CA 95054 USA or visit www.sun.com if you need additional information or 0N/A * have any questions. 809N/A // Note that [0,0) and [size,size) are both valid ranges. 0N/A return false;
// Someone else beat us to it. 0N/A return true;
// Success. 0N/A return false;
// Someone else beat us to it. 0N/A return true;
// Success. 0N/A // check bits including and to the _left_ of offset's position 0N/A // find the position of the 1-bit 0N/A // skip over all word length 0-bit runs 0N/A // found a 1, return the offset 342N/A // check bits including and to the _left_ of offset's position 342N/A // find the position of the 0-bit 342N/A // skip over all word length 1-bit runs 342N/A // found a 0, return the offset 342N/A // check bits including and to the _left_ of offset's position 342N/A // find the position of the 1-bit 342N/A // skip over all word length 0-bit runs 342N/A // found a 1, return the offset 342N/A// Returns a bit mask for a range of bits [beg, end) within a single word. Each 342N/A// bit in the mask is 0 if the bit is in the range, 1 if not in the range. The 342N/A// returned mask can be used directly to clear the range, or inverted to set the 342N/A// range. Note: end must not be 0. 342N/A "must be a single-word range");
342N/A // Check for integer arithmetic overflow.