Set.hh (10348:c91b23c72d5e) | Set.hh (10808:c1694b4032a6) |
---|---|
1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 48 unchanged lines hidden (view full) --- 57 int m_nArrayLen; // the number of 32-bit words that are 58 // held in the array 59 60 // Changed 5/24/05 for static allocation of array 61 // note that "long" corresponds to 32 bits on a 32-bit machine, 62 // 64 bits if the -m64 parameter is passed to g++, which it is 63 // for an AMD opteron under our configuration 64 | 1/* 2 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 48 unchanged lines hidden (view full) --- 57 int m_nArrayLen; // the number of 32-bit words that are 58 // held in the array 59 60 // Changed 5/24/05 for static allocation of array 61 // note that "long" corresponds to 32 bits on a 32-bit machine, 62 // 64 bits if the -m64 parameter is passed to g++, which it is 63 // for an AMD opteron under our configuration 64 |
65 long *m_p_nArray; // an word array to hold the bits in the set 66 long m_p_nArray_Static[NUMBER_WORDS_PER_SET]; | 65 // an word array to hold the bits in the set 66 unsigned long *m_p_nArray; 67 unsigned long m_p_nArray_Static[NUMBER_WORDS_PER_SET]; |
67 | 68 |
68 static const int LONG_BITS = std::numeric_limits<long>::digits + 1; | 69 static const int LONG_BITS = 70 std::numeric_limits<unsigned long>::digits + 1; |
69 static const int INDEX_SHIFT = LONG_BITS == 64 ? 6 : 5; 70 static const int INDEX_MASK = (1 << INDEX_SHIFT) - 1; 71 72 void clearExcess(); 73 74 public: 75 Set(); 76 Set(int size); --- 90 unchanged lines hidden --- | 71 static const int INDEX_SHIFT = LONG_BITS == 64 ? 6 : 5; 72 static const int INDEX_MASK = (1 << INDEX_SHIFT) - 1; 73 74 void clearExcess(); 75 76 public: 77 Set(); 78 Set(int size); --- 90 unchanged lines hidden --- |