1/* 2 * Copyright (c) 2003-2005 The Regents of The University of Michigan 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; --- 26 unchanged lines hidden (view full) --- 35 */ 36 37#ifndef __BASE_TYPES_HH__ 38#define __BASE_TYPES_HH__ 39 40#include <inttypes.h> 41 42#include <cassert> |
43#include <ostream> |
44 45/** uint64_t constant */ 46#define ULL(N) ((uint64_t)N##ULL) 47/** int64_t constant */ 48#define LL(N) ((int64_t)N##LL) 49 50/** Statistics counter type. Not much excuse for not using a 64-bit 51 * integer here, but if you're desperate and only run short --- 69 unchanged lines hidden (view full) --- 121 { assert(c >= b.c); return Cycles(c - b.c); } 122 123 const Cycles operator <<(const int32_t shift) 124 { return Cycles(c << shift); } 125 126 const Cycles operator >>(const int32_t shift) 127 { return Cycles(c >> shift); } 128 |
129 friend std::ostream& operator<<(std::ostream &out, const Cycles & cycles); 130 |
131#endif // SWIG not touching operators 132 133}; 134 135/** 136 * Address type 137 * This will probably be moved somewhere else in the near future. 138 * This should be at least as big as the biggest address width in use --- 45 unchanged lines hidden --- |