示例#1
0
SamplerGPUSim::SamplerGPUSim(const char *iname, const char *section, EmulInterface *emu)
  : SamplerBase(iname, section, emu)
  /* SamplerGPUSim constructor {{{1 */
{
  nInstSkip = static_cast<uint64_t>(SescConf->getDouble(section,"nInstSkip"));
  nInstMax  = static_cast<uint64_t>(SescConf->getDouble(section,"nInstMax"));


  if (nInstSkip)
    //startRabbit(emul->getFirstFlow());
    startRabbit(emul->mapLid(0));
  else
    //startTiming(emul->getFirstFlow());
    startRabbit(emul->mapLid(0)); //FIXME

}
示例#2
0
void EmuSampler::setMode(EmuMode mod, FlowID fid)
  /* Stop and start statistics for a given mode  */
{
  //printf("Thread: %u, set to mode: %u\n", fid, mod);
  nSwitches->inc();
  stop();
  switch(mod) {
    case EmuRabbit:
      startRabbit(fid);
      break;
    case EmuWarmup:
      startWarmup(fid);
      break;
    case EmuDetail:
      startDetail(fid);
      break;
    case EmuTiming:
      startTiming(fid);
      break;
    default:
      I(0);
  }
}
示例#3
0
SamplerSMARTS::SamplerSMARTS(const char *iname, const char *section, EmulInterface *emu, FlowID fid)
  : SamplerBase(iname, section, emu, fid)
  /* SamplerSMARTS constructor {{{1 */
{
  finished[fid] = true; // will be set to false in resumeThread
  finished[0] = false;

  nInstForcedDetail = nInstDetail==0? nInstTiming/2:nInstDetail;

  setNextSwitch(nInstSkip);
  if (nInstSkip)
    startRabbit(fid);

  std::cout << "Sampler: TBS, R:" << nInstRabbit
            << ", W:"             << nInstWarmup
            << ", D:"             << nInstDetail
            << ", T:"             << nInstTiming
            << std::endl;

  std::cout << "Sampler: TBS, nInstMax:" << nInstMax
            << ", nInstSkip:"            << nInstSkip
            << ", maxnsTime:"           << maxnsTime
            << std::endl;
}