misc.hh (11308:7d8836fd043d) | misc.hh (11534:7106f550afad) |
---|---|
1/* 2 * Copyright (c) 2011-2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 23 unchanged lines hidden (view full) --- 32 * 33 * Author: Steve Reinhardt 34 */ 35 36#ifndef __MISC_HH__ 37#define __MISC_HH__ 38 39#include <bitset> | 1/* 2 * Copyright (c) 2011-2015 Advanced Micro Devices, Inc. 3 * All rights reserved. 4 * 5 * For use for simulation and test purposes only 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions are met: --- 23 unchanged lines hidden (view full) --- 32 * 33 * Author: Steve Reinhardt 34 */ 35 36#ifndef __MISC_HH__ 37#define __MISC_HH__ 38 39#include <bitset> |
40#include <limits> |
|
40#include <memory> 41 42#include "base/misc.hh" 43 44class GPUDynInst; 45 | 41#include <memory> 42 43#include "base/misc.hh" 44 45class GPUDynInst; 46 |
46// wavefront size of the machine 47static const int VSZ = 64; 48 49/* 50 This check is necessary because std::bitset only provides conversion to 51 unsigned long or unsigned long long via to_ulong() or to_ullong(). there are 52 a few places in the code where to_ullong() is used, however if VSZ is larger 53 than a value the host can support then bitset will throw a runtime exception. 54 55 we should remove all use of to_long() or to_ullong() so we can have VSZ 56 greater than 64b, however until that is done this assert is required. 57 */ 58static_assert(VSZ <= sizeof(unsigned long long) * 8, 59 "VSZ is larger than the host can support"); 60 61typedef std::bitset<VSZ> VectorMask; | 47typedef std::bitset<std::numeric_limits<unsigned long long>::digits> VectorMask; |
62typedef std::shared_ptr<GPUDynInst> GPUDynInstPtr; 63 64class WaitClass 65{ 66 public: 67 WaitClass() : nxtAvail(0), lookAheadAvail(0), tcnt(0) { } 68 void init(uint64_t *_tcnt, uint32_t _numStages=0) 69 { --- 93 unchanged lines hidden --- | 48typedef std::shared_ptr<GPUDynInst> GPUDynInstPtr; 49 50class WaitClass 51{ 52 public: 53 WaitClass() : nxtAvail(0), lookAheadAvail(0), tcnt(0) { } 54 void init(uint64_t *_tcnt, uint32_t _numStages=0) 55 { --- 93 unchanged lines hidden --- |