add an explicit ID parameter to StaticTuple. Instantiators of StaticTuple need to make sure this is different for each static tuple type that may coexist in the same page file. This allows multiple copies of rose to run at once.

This commit is contained in:
Sears Russell 2008-12-02 21:45:58 +00:00
parent c6564e67c7
commit ff641be5dc
4 changed files with 11 additions and 11 deletions

View file

@ -17,7 +17,7 @@ int main(int argc, char **argv) {
typedef int32_t typ9;
#define COLS 10
typedef rose::StaticTuple<COLS,typ0,typ1,typ2,typ3,typ4,typ5,typ6,typ7,typ8,typ9> tup;
typedef rose::StaticTuple<COLS,1,typ0,typ1,typ2,typ3,typ4,typ5,typ6,typ7,typ8,typ9> tup;
using rose::For;
using rose::Rle;
using rose::Nop;

View file

@ -53,7 +53,7 @@ int main(int argc, char **argv) {
typedef int64_t typ18;
typedef int64_t typ19;
#define COLS 7
typedef rose::StaticTuple<COLS,typ0,typ1,typ2,typ3,typ4,typ5,/*,typ6,typ7 */
typedef rose::StaticTuple<COLS,1,typ0,typ1,typ2,typ3,typ4,typ5,/*,typ6,typ7 */
typ6,typ7,typ8,typ9,typ10,typ11,typ12,typ13,typ14,typ15,typ16,typ17,
typ18,typ19> tup;
using rose::For;

View file

@ -30,7 +30,7 @@ int main(int argc, char **argv) {
typedef int64_t typ19;
#define COLS 11
typedef rose::StaticTuple<COLS,typ0,typ1,typ2,typ3,typ4,typ5,typ6,typ7,typ8,typ9,typ10,typ11,typ12,typ13,typ14,typ15,typ16,typ17,typ18,typ19> tup;
typedef rose::StaticTuple<COLS,1,typ0,typ1,typ2,typ3,typ4,typ5,typ6,typ7,typ8,typ9,typ10,typ11,typ12,typ13,typ14,typ15,typ16,typ17,typ18,typ19> tup;
using rose::For;
using rose::Rle;
using rose::Nop;

View file

@ -2,7 +2,7 @@
#define _ROSE_COMPRESSION_STATICTUPLE_H__
namespace rose {
template<int N, class TYPE0,
template<int N, int ID, class TYPE0,
class TYPE1=bool, class TYPE2=bool, class TYPE3=bool, class TYPE4=bool,
class TYPE5=bool, class TYPE6=bool, class TYPE7=bool, class TYPE8=bool,
class TYPE9=bool, class TYPE10=bool,
@ -13,7 +13,7 @@ namespace rose {
public:
static const char NORMAL = 0;
static const char TOMBSTONE = 1;
static const int TUPLE_ID = 1;
static const int TUPLE_ID = ID;
static const int NN = N;
/** Compatibility for dynamic dispatch stuff */
inline int column_count() const { return NN; }
@ -623,34 +623,34 @@ namespace rose {
};
template<int N, class TYPE0,
template<int N, int ID, class TYPE0,
class TYPE1, class TYPE2, class TYPE3, class TYPE4,
class TYPE5, class TYPE6, class TYPE7, class TYPE8,
class TYPE9, class TYPE10,
class TYPE11, class TYPE12, class TYPE13, class TYPE14,
class TYPE15, class TYPE16, class TYPE17, class TYPE18,
class TYPE19>
short StaticTuple<N,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
short StaticTuple<N,ID,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
TYPE5,TYPE6,TYPE7,TYPE8,TYPE9,TYPE10,TYPE11,TYPE12,TYPE13,TYPE14,
TYPE15,TYPE16,TYPE17,TYPE18,TYPE19>::cols_[N];
template<int N, class TYPE0,
template<int N, int ID, class TYPE0,
class TYPE1, class TYPE2, class TYPE3, class TYPE4,
class TYPE5, class TYPE6, class TYPE7, class TYPE8,
class TYPE9, class TYPE10,
class TYPE11, class TYPE12, class TYPE13, class TYPE14,
class TYPE15, class TYPE16, class TYPE17, class TYPE18,
class TYPE19>
byte_off_t StaticTuple<N,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
byte_off_t StaticTuple<N,ID,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
TYPE5,TYPE6,TYPE7,TYPE8,TYPE9,TYPE10,TYPE11,TYPE12,TYPE13,TYPE14,
TYPE15,TYPE16,TYPE17,TYPE18,TYPE19>::size_[N];
template<int N, class TYPE0,
template<int N, int ID, class TYPE0,
class TYPE1, class TYPE2, class TYPE3, class TYPE4,
class TYPE5, class TYPE6, class TYPE7, class TYPE8,
class TYPE9, class TYPE10,
class TYPE11, class TYPE12, class TYPE13, class TYPE14,
class TYPE15, class TYPE16, class TYPE17, class TYPE18,
class TYPE19>
bool StaticTuple<N,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
bool StaticTuple<N,ID,TYPE0,TYPE1,TYPE2,TYPE3,TYPE4,
TYPE5,TYPE6,TYPE7,TYPE8,TYPE9,TYPE10,TYPE11,TYPE12,TYPE13,TYPE14,
TYPE15,TYPE16,TYPE17,TYPE18,TYPE19>::first_ = true;