My Project
|
Public Member Functions | |
Map () | |
virtual | ~Map () |
template<class scheduler = simple_schedule, class allocator = dynalloc, class parallelism_monitor = basic_parallel> | |
void | exe () |
![]() | |
MapBase () | |
virtual | ~MapBase () |
template<order::spec t = order::in> | |
kernel_pair_t | link (raft::kernel *a, raft::kernel *b, const std::size_t buffer=0) |
template<order::spec t = order::in> | |
kernel_pair_t | link (raft::kernel *a, const std::string a_port, raft::kernel *b, const std::size_t buffer=0) |
template<order::spec t = order::in> | |
kernel_pair_t | link (raft::kernel *a, raft::kernel *b, const std::string b_port, const std::size_t buffer=0) |
template<order::spec t = order::in> | |
kernel_pair_t | link (raft::kernel *a, const std::string a_port, raft::kernel *b, const std::string b_port, const std::size_t buffer=0) |
Protected Member Functions | |
void | checkEdges (kernelkeeper &source_k) |
void | enableDuplication (kernelkeeper &source, kernelkeeper &all) |
Friends | |
class | basic_parallel |
class | Schedule |
class | Allocate |
Additional Inherited Members | |
![]() | |
static void | join (raft::kernel &a, const std::string name_a, PortInfo &a_info, raft::kernel &b, const std::string name_b, PortInfo &b_info) |
static void | insert (raft::kernel *a, PortInfo &a_out, raft::kernel *b, PortInfo &b_in, raft::kernel *i) |
![]() | |
kernelkeeper | source_kernels |
kernelkeeper | dst_kernels |
kernelkeeper | all_kernels |
std::vector< MapBase * > | sub_maps |
Map::Map | ( | ) |
Map - constructor, really doesn't do too much at the monent and doesn't really need to.
map.cpp -
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.
|
virtual |
default destructor
|
protected |
checkEdges - runs a breadth first search through the graph to look for disconnected edges.
source_k | - std::set< raft::kernel* > |
PortException | - thrown if an unconnected edge is found. |
NOTE: will throw an error that we're not catching here if there are unconnected edges...this is something that a user will have to fix. Otherwise will return with no errors.
|
protected |
enableDuplication - add split / join kernels where needed, for the moment we're going with a simple split/join topology, however that doesn't mean that more complex topologies might not be implemented in the future.
source_k | - std::set< raft::kernel* > with sources |
void insert( raft::kernel &a, PortInfo &a_out, raft::kernel &b, PortInfo &b_in, raft::kernel &i, PortInfo &i_in, PortInfo &i_out );
don't have to do this but it makes it far more apparent where it comes from
need to grab impl of Lengauer and Tarjan dominators, use for SESE
in the interim, restrict to kernels that are simple to duplicate
case of inline kernel
front -> kernel_a goes to front -> split -> kernel_a
now we need the port info from the input port on back
kernel_a -> back goes to kernel_a -> join -> back
finally set the flag to the scheduler so that the parallel map manager can pick it up an use it.
parallalizable source, single output no inputs
parallelizable sink, single input, no outputs
flag as candidate if the connecting kernel only has one input port.
simply flag as a candidate
|
inline |
FIXME, the graph tools need to take more than function, we're wasting time by traversing the graph twice....will take awhile with big graphs.
check types, ensure all are linked
adds in split/join kernels
launch allocator in a thread
launch scheduler in thread
launch parallelism monitor
ref to this
allocator
scheduler
exit parameter
join scheduler first
scheduler done, cleanup alloc
no more need to duplicate kernels
all fifo's deallocated when alloc goes out of scope
|
friend |
TODO, refactor basic_parallel base class to match the all caps base class coding style