30 #define _MAPBASE_HPP_ 1
37 #include "portexception.hpp"
38 #include "schedule.hpp"
39 #include "simpleschedule.hpp"
41 #include "port_info.hpp"
42 #include "allocate.hpp"
43 #include "dynalloc.hpp"
44 #include "stdalloc.hpp"
95 enum spec { in, out };
128 template < order::spec t = order::in >
145 std::stringstream ss;
147 "Source port from kernel " <<
148 abi::__cxa_demangle(
typeid( *a ).name(), 0, 0, &status ) <<
149 "has more than a single port.";
160 std::stringstream ss;
161 ss <<
"Destination port from kernel " <<
162 abi::__cxa_demangle(
typeid( *b ).name(), 0, 0, &status ) <<
163 "has more than a single port.";
167 join( *a, port_info_a->my_name, *port_info_a,
168 *b, port_info_b->my_name, *port_info_b );
173 port_info_a->out_of_order =
false;
174 port_info_b->out_of_order =
false;
179 port_info_a->out_of_order =
true;
180 port_info_b->out_of_order =
true;
201 template < order::spec t = order::in >
219 std::stringstream ss;
220 ss <<
"Destination port from kernel " <<
221 abi::__cxa_demangle(
typeid( *b ).name(), 0, 0, &status ) <<
222 "has more than a single port.";
225 join( *a, a_port , port_info_a,
226 *b, port_info_b->my_name, *port_info_b );
231 port_info_a.out_of_order =
false;
232 port_info_b->out_of_order =
false;
237 port_info_a.out_of_order =
true;
238 port_info_b->out_of_order =
true;
260 template < order::spec t = order::in >
275 std::stringstream ss;
277 ss <<
"Source port from kernel " <<
278 abi::__cxa_demangle(
typeid( *a ).name(), 0, 0, &status ) <<
279 "has more than a single port.";
285 join( *a, port_info_a->my_name, *port_info_a,
286 *b, b_port, port_info_b );
291 port_info_a->out_of_order =
false;
292 port_info_b.out_of_order =
false;
297 port_info_a->out_of_order =
true;
298 port_info_b.out_of_order =
true;
317 template < order::spec t = order::in >
330 join( *a, a_port, port_info_a,
331 *b, b_port, port_info_b );
336 port_info_a.out_of_order =
false;
337 port_info_b.out_of_order =
false;
342 port_info_a.out_of_order =
true;
343 port_info_b.out_of_order =
true;
void join(raft::kernel &a, const std::string name_a, PortInfo &a_info, raft::kernel &b, const std::string name_b, PortInfo &b_info)
Definition: mapbase.cpp:47
Port input
Definition: kernel.hpp:100
std::set< raft::kernel * > all_kernels
Definition: mapbase.hpp:377
PortInfo & getPortInfoFor(const std::string port_name)
Definition: port.cpp:104
kernel_pair_t link(raft::kernel *a, const std::string a_port, raft::kernel *b, const std::string b_port)
Definition: mapbase.hpp:318
PortInfo & getPortInfo()
Definition: port.cpp:117
Definition: mapbase.hpp:98
kernel_pair_t link(raft::kernel *a, raft::kernel *b, const std::string b_port)
Definition: mapbase.hpp:261
std::set< raft::kernel * > source_kernels
Definition: mapbase.hpp:374
kernel_pair_t link(raft::kernel *a, const std::string a_port, raft::kernel *b)
Definition: mapbase.hpp:202
virtual bool hasPorts()
Definition: port.cpp:80
MapBase()
Definition: mapbase.cpp:35
kernel_pair_t link(raft::kernel *a, raft::kernel *b)
Definition: mapbase.hpp:129
Definition: mapbase.hpp:93
Definition: portexception.hpp:39
Definition: mapbase.hpp:51
Definition: port_info.hpp:39
Definition: kernel.hpp:48
Definition: portexception.hpp:57
virtual ~MapBase()
Definition: mapbase.cpp:40