1/* 2 * Copyright (c) 2004-2006 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; --- 412 unchanged lines hidden (view full) --- 421} 422 423 424template <class Impl> 425void 426InstructionQueue<Impl>::resetEntries() 427{ 428 if (iqPolicy != Dynamic || numThreads > 1) { |
429 int active_threads = activeThreads->size(); |
430 |
431 std::list<unsigned>::iterator threads = activeThreads->begin(); 432 std::list<unsigned>::iterator end = activeThreads->end(); |
433 |
434 while (threads != end) { 435 unsigned tid = *threads++; 436 |
437 if (iqPolicy == Partitioned) { |
438 maxEntries[tid] = numEntries / active_threads; |
439 } else if(iqPolicy == Threshold && active_threads == 1) { |
440 maxEntries[tid] = numEntries; |
441 } 442 } 443 } 444} 445 446template <class Impl> 447unsigned 448InstructionQueue<Impl>::numFreeEntries() --- 959 unchanged lines hidden --- |