RaftLib  0.3a
C++ Stream Processing Template Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pool_schedule Class Reference
Inheritance diagram for pool_schedule:
[legend]
Collaboration diagram for pool_schedule:
[legend]

Public Member Functions

 pool_schedule (Map &map)
 
virtual ~pool_schedule ()
 
virtual void start ()
 
- Public Member Functions inherited from Schedule
 Schedule (Map &map)
 
virtual ~Schedule ()
 
virtual void init ()
 

Protected Member Functions

virtual bool scheduleKernel (raft::kernel *kernel)
 

Protected Attributes

decltype(std::thread::hardware_concurrency()) const n_threads
 
std::vector< std::thread * > pool
 
std::vector< KernelContainer * > container
 
std::vector< std::uint8_t > status_flags
 
std::vector< raft::kernel * > kernel_map
 
- Protected Attributes inherited from Schedule
SystemSignalHandler handlers
 

Additional Inherited Members

- Static Public Member Functions inherited from Schedule
static bool isActive (raft::kernel const *const kernel)
 
static void inactivate (raft::kernel *const kernel)
 
- Static Protected Member Functions inherited from Schedule
static raft::kstatus checkSystemSignal (raft::kernel *const kernel, void *data, SystemSignalHandler &handlers)
 
static raft::kstatus quitHandler (FIFO &fifo, raft::kernel *kernel, const raft::signal signal, void *data)
 
static void invalidateOutputPorts (raft::kernel *kernel)
 
static bool kernelHasInputData (raft::kernel *kernel)
 
static bool kernelHasNoInputPorts (raft::kernel *kernel)
 
static void kernelRun (raft::kernel *const kernel, volatile bool &finished)
 

Constructor & Destructor Documentation

pool_schedule::pool_schedule ( Map map)

pool_schedule - constructor, takes a map object, calling this will launch threads. scheduler itself is also run as a thread.

Parameters
map- Map&

poolschedule.cpp -

Author
: Jonathan Beard
Version
: Thu Sep 11 15:49:57 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.

pool_schedule::~pool_schedule ( )
virtual

destructor, deletes threads and cleans up container objects.

Member Function Documentation

bool pool_schedule::scheduleKernel ( raft::kernel kernel)
protectedvirtual

scheduleKernel - override base class function in order to add kernels to the right place.

Parameters
kernel- raft::kernel*
Returns
bool - always true

Reimplemented from Schedule.

void pool_schedule::start ( )
virtual

start - call to start executing map, at this point the mapper sould have checked the topology and everything should be set up for running.

must be signed type

add re-partitioning code here

partition using streaming mean and std of queue occupancy

done

Implements Schedule.

Here is the call graph for this function:

Member Data Documentation

std::vector< KernelContainer* > pool_schedule::container
protected

container - holds all the kernels

std::vector< raft::kernel* > pool_schedule::kernel_map
protected

stores all kernels that we're currently executing, might be removed from KernelContainer objects, but they'll still be here. TODO, double check to make sure we're deleting and removing these once everything is done.

decltype( std::thread::hardware_concurrency() ) const pool_schedule::n_threads
protected

total # of hardware supported threads

std::vector< std::thread* > pool_schedule::pool
protected

used as a thread pool

std::vector< std::uint8_t > pool_schedule::status_flags
protected

used std::uint8_t b/c I don't want a bitset from std::vector, status_flags used to tell the sub-schedulers when to quit.


The documentation for this class was generated from the following files: