Allocate::Allocate |
( |
Map & |
map, |
|
|
volatile bool & |
exit_alloc |
|
) |
| |
Allocate - base constructor, really doesn't do too much save for setting the global variables all_kernels and source_kernels from the Map object.
- Parameters
-
map | - Map& |
exit_alloc | - bool used to terminate loop, for monitoring allocations, controlled by map object. |
allocate.cpp -
- Author
- : Jonathan Beard
- Version
- : Tue Sep 16 20:20:06 2014
Copyright 2014 Jonathan Beard
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at:
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
void Allocate::initialize |
( |
PortInfo *const |
src, |
|
|
PortInfo *const |
dst, |
|
|
FIFO *const |
fifo |
|
) |
| |
|
protected |
initialize - internal method to be used within the run method takes care of the initialization using the already allocated FIFO object passed as a param. This function will throw an exception if either port (src or dst) have already been allocated.
- Parameters
-
src | - PortInfo*, nullptr if not to be set |
dst | - PortInfo*, nullptr if not to be set |
fifo | - FIFO* |
- Exceptions
-
NOTE: this list simply speeds up the monitoring if we want it
virtual void Allocate::run |
( |
| ) |
|
|
pure virtual |
run - implement this function to create a new allocator, will be run inside a thread so exits when done but if run-time monitoring is desired then this is the place to do it.
Implemented in stdalloc, and dynalloc.
void Allocate::setReady |
( |
| ) |
|
|
protected |
setReady - call within the implemented run function to signal that the initial allocations have been completed.
void Allocate::waitTillReady |
( |
| ) |
|
waitTillReady - call after initializing the allocate thread, returns when the initial allocation is complete.
std::set< FIFO* > Allocate::allocated_fifo |
|
protected |
keeps a list of all currently allocated FIFO objects, set from within the initialize function.
volatile bool& Allocate::exit_alloc |
|
protected |
exit_alloc - bool whose value is set by the map object, controls when the loop within the alloc thread is exited.
kernelkeeper& Allocate::source_kernels |
|
protected |
both convenience structs, hold exactly what the names say
The documentation for this class was generated from the following files: