Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::constants Namespace Reference


Classes

class  atlas::constants::Kick
struct  atlas::constants::Kick::Empty
class  atlas::constants::BaseShift< n >
 Computes (in the constant BaseShift<n>::value) the base two logarithm of n. More...
class  atlas::constants::BaseShift< 1ul >
class  atlas::constants::Bool< n >
 Tests whether n is non-zero. More...
class  atlas::constants::Bool<(size_t) 0ul >

Functions

void init ()

Variables

unsigned long bitMask [longBits]
unsigned long twoBitMask [longBits/2]
unsigned char firstbit [1<< charBits]
unsigned char lastbit [1<< charBits]
unsigned long leqMask [longBits]
unsigned long lMask [longBits+1]
const unsigned char ucharMax = std::numeric_limits<unsigned char>::max()
const unsigned long ulongMax = std::numeric_limits<unsigned long>::max()
const unsigned long charBits = std::numeric_limits<unsigned char>::digits
const unsigned long longBits = std::numeric_limits<unsigned long>::digits
const unsigned long sizeBits = std::numeric_limits<size_t>::digits
const unsigned long hiBit = 1ul << (longBits - 1)
const unsigned long firstCharMask = (1ul << charBits) - 1ul
const size_t RANK_MAX = 16ul
const unsigned long posBits = longBits - 1ul
const unsigned long baseBits = ~posBits
const unsigned long baseShift = BaseShift<longBits>::value
 This one tells by how much we have to shift a binary number N to get the base (number of machine words needed for a bitmap of size N).


Function Documentation

void init  )  [static]
 

Definition at line 40 of file constants.cpp.

References bitMask, charBits, firstbit, lastbit, leqMask, lMask, longBits, and twoBitMask.


Variable Documentation

const unsigned long atlas::constants::baseBits = ~posBits
 

Constant used to pick a bit-address apart: this is the logical complement of posBits. It is assumed that the number of bits in an unsigned long is a power of two.

Definition at line 105 of file constants.h.

const unsigned long atlas::constants::baseShift = BaseShift<longBits>::value
 

This one tells by how much we have to shift a binary number N to get the base (number of machine words needed for a bitmap of size N).

It is the base 2 logarithm of longBits. The difficulty is to compute this at compile time! We use a neat (and well-known) template trick for that. The result is correct only when n is a power of two. (Should be 5 on 32 bit machine.)

Definition at line 133 of file constants.h.

Referenced by atlas::bitmap::BitMap::BitMap().

unsigned long atlas::constants::bitMask
 

bitMask[j] == 2^j == 1ul<<j: value with exactly one bit 1, at position j

Definition at line 28 of file constants.cpp.

Referenced by init(), and atlas::bits::permute().

const unsigned long atlas::constants::charBits = std::numeric_limits<unsigned char>::digits
 

Explanation: the constant charBits is in fact 8 everywhere. Fokko's surprise is about getting 7 for <char>, which is apparently signed

Definition at line 36 of file constants.h.

Referenced by init().

unsigned char atlas::constants::firstbit
 

Definition at line 30 of file constants.cpp.

Referenced by atlas::bits::firstBit(), and init().

const unsigned long atlas::constants::firstCharMask = (1ul << charBits) - 1ul
 

bit mask for lower order char of an unsigned long

Definition at line 53 of file constants.h.

const unsigned long atlas::constants::hiBit = 1ul << (longBits - 1)
 

Definition at line 48 of file constants.h.

unsigned char atlas::constants::lastbit
 

Definition at line 31 of file constants.cpp.

Referenced by init(), and atlas::bits::lastBit().

unsigned long atlas::constants::leqMask
 

Definition at line 32 of file constants.cpp.

Referenced by init().

unsigned long atlas::constants::lMask
 

Definition at line 33 of file constants.cpp.

Referenced by init(), atlas::bitmap::BitMap::range(), and atlas::bitmap::BitMap::setRange().

const unsigned long atlas::constants::longBits = std::numeric_limits<unsigned long>::digits
 

32 or 64, depending on the architecture

Definition at line 41 of file constants.h.

Referenced by init().

const unsigned long atlas::constants::posBits = longBits - 1ul
 

Constant used to pick a bit-address apart: serves as flags for the address within a word. It is assumed that the number of bits in an unsigned long is a power of two.

Definition at line 99 of file constants.h.

Referenced by atlas::bitmap::BitMap::BitMap(), and atlas::bitmap::BitMap::set_capacity().

const size_t atlas::constants::RANK_MAX = 16ul
 

RANK_MAX is the largest allowed rank for a reductive group. It should not exceed 128, or the data type for Weyl groups will overflow (in a way requiring fundamental rewriting of bitSet and bitVector). It should always be a power of two. The constant PRIMES_MAX in size.h has to be set in accordance with RANK_MAX, so that Weyl group sizes can be properly stored.

Definition at line 85 of file constants.h.

Referenced by atlas::interactive_lietype::checkLieType(), and atlas::interactive_lietype::printRankMessage().

const unsigned long atlas::constants::sizeBits = std::numeric_limits<size_t>::digits
 

equal to longBits virtually everywhere

Definition at line 46 of file constants.h.

Referenced by atlas::pool::Pool::memoryReport(), atlas::pool::Pool::Pool(), and atlas::pool::Pool::reportDestruction().

unsigned long atlas::constants::twoBitMask
 

twoBitMask[j] == 3*(4^j) == 3ul << 2*j: an unsigned long value with exactly two bits 1, at positions 2j and 2j+1

Definition at line 29 of file constants.cpp.

Referenced by init().

const unsigned char atlas::constants::ucharMax = std::numeric_limits<unsigned char>::max()
 

Definition at line 24 of file constants.h.

const unsigned long atlas::constants::ulongMax = std::numeric_limits<unsigned long>::max()
 

2**32 - 1 on Mac.

Definition at line 28 of file constants.h.


Generated on Wed Mar 26 16:52:24 2008 for atlas by  doxygen 1.3.9.1