inst_queue_impl.hh (3125:febd811bccc6) | inst_queue_impl.hh (3867:807483cfab77) |
---|---|
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) { | 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(); | 429 int active_threads = activeThreads->size(); |
430 | 430 |
431 std::list<unsigned>::iterator threads = (*activeThreads).begin(); 432 std::list<unsigned>::iterator list_end = (*activeThreads).end(); | 431 std::list<unsigned>::iterator threads = activeThreads->begin(); 432 std::list<unsigned>::iterator end = activeThreads->end(); |
433 | 433 |
434 while (threads != list_end) { | 434 while (threads != end) { 435 unsigned tid = *threads++; 436 |
435 if (iqPolicy == Partitioned) { | 437 if (iqPolicy == Partitioned) { |
436 maxEntries[*threads++] = numEntries / active_threads; | 438 maxEntries[tid] = numEntries / active_threads; |
437 } else if(iqPolicy == Threshold && active_threads == 1) { | 439 } else if(iqPolicy == Threshold && active_threads == 1) { |
438 maxEntries[*threads++] = numEntries; | 440 maxEntries[tid] = numEntries; |
439 } 440 } 441 } 442} 443 444template <class Impl> 445unsigned 446InstructionQueue<Impl>::numFreeEntries() --- 959 unchanged lines hidden --- | 441 } 442 } 443 } 444} 445 446template <class Impl> 447unsigned 448InstructionQueue<Impl>::numFreeEntries() --- 959 unchanged lines hidden --- |