SMAUG
Simulating Machine Learning Applications on gem5-Aladdin
|
1 #ifndef _OPERATORS_SMV_SMV_ACCELERATOR_POOL_H_
2 #define _OPERATORS_SMV_SMV_ACCELERATOR_POOL_H_
37 void addFinishFlag(
int accelIdx, std::unique_ptr<volatile int> finishFlag);
57 void join(
int accelIdx);
63 std::vector<std::deque<std::unique_ptr<volatile int>>>
finishFlags;
int size
Number of accelerators in the pool.
void addFinishFlag(int accelIdx, std::unique_ptr< volatile int > finishFlag)
Add a finish flag for the specified accelerator.
void joinAll()
Wait until all the finish flags turn complete.
void join(int accelIdx)
Wait until this accelerator's finish flags turn complete.
The smaug namespace is the parent namespace of all C++ code in SMAUG.
Implements a pool of worker accelerators.
std::vector< std::deque< std::unique_ptr< volatile int > > > finishFlags
Active finish flags for all the accelerators in the pool.
int getNextAvailableAccelerator(int currAccelIdx)
Get the next accelerator and wait if it's still busy.