21 #ifndef _FGT_GRAPH_TRACE_IMPL_H 22 #define _FGT_GRAPH_TRACE_IMPL_H 24 #include "../tbb_profiling.h" 29 #if TBB_USE_THREADING_TOOLS 38 static inline void fgt_composite (
void *node,
void *graph ) {
42 static inline void fgt_internal_alias_input_port(
void *node,
void *
p,
string_index name_index ) {
47 static inline void fgt_internal_alias_output_port(
void *node,
void *
p,
string_index name_index ) {
52 template<
typename InputType>
55 fgt_internal_alias_input_port( node, port, name_index);
58 template <
typename PortsTuple,
int N >
59 struct fgt_internal_input_alias_helper {
60 static void alias_port(
void *node, PortsTuple &ports ) {
61 alias_input_port( node, &(tbb::flow::get<N-1>(ports)), static_cast<tbb::internal::string_index>(FLOW_INPUT_PORT_0 + N - 1) );
66 template <
typename PortsTuple >
67 struct fgt_internal_input_alias_helper<PortsTuple, 0> {
68 static void alias_port(
void * , PortsTuple & ) { }
71 template<
typename OutputType>
74 fgt_internal_alias_output_port( node, static_cast<void *>(port), name_index);
77 template <
typename PortsTuple,
int N >
78 struct fgt_internal_output_alias_helper {
79 static void alias_port(
void *node, PortsTuple &ports ) {
80 alias_output_port( node, &(tbb::flow::get<N-1>(ports)), static_cast<tbb::internal::string_index>(FLOW_OUTPUT_PORT_0 + N - 1) );
85 template <
typename PortsTuple >
86 struct fgt_internal_output_alias_helper<PortsTuple, 0> {
87 static void alias_port(
void * , PortsTuple & ) {
91 static inline void fgt_internal_create_input_port(
void *node,
void *
p,
string_index name_index ) {
95 static inline void fgt_internal_create_output_port(
void *node,
void *
p,
string_index name_index ) {
99 template<
typename InputType>
105 fgt_internal_create_input_port(node, static_cast<void*>(port), name_index);
108 template <
typename PortsTuple,
int N >
109 struct fgt_internal_input_helper {
110 static void register_port(
void *node, PortsTuple &ports ) {
111 register_input_port( node, &(tbb::flow::get<N-1>(ports)), static_cast<tbb::internal::string_index>(FLOW_INPUT_PORT_0 + N - 1) );
112 fgt_internal_input_helper<PortsTuple, N-1>::register_port( node, ports );
116 template <
typename PortsTuple >
117 struct fgt_internal_input_helper<PortsTuple, 1> {
118 static void register_port(
void *node, PortsTuple &ports ) {
119 register_input_port( node, &(tbb::flow::get<0>(ports)), FLOW_INPUT_PORT_0 );
123 template<
typename OutputType>
126 fgt_internal_create_output_port( node, static_cast<void *>(port), name_index);
129 template <
typename PortsTuple,
int N >
130 struct fgt_internal_output_helper {
131 static void register_port(
void *node, PortsTuple &ports ) {
132 register_output_port( node, &(tbb::flow::get<N-1>(ports)), static_cast<tbb::internal::string_index>(FLOW_OUTPUT_PORT_0 + N - 1) );
133 fgt_internal_output_helper<PortsTuple, N-1>::register_port( node, ports );
137 template <
typename PortsTuple >
138 struct fgt_internal_output_helper<PortsTuple,1> {
139 static void register_port(
void *node, PortsTuple &ports ) {
140 register_output_port( node, &(tbb::flow::get<0>(ports)), FLOW_OUTPUT_PORT_0 );
144 template<
typename NodeType >
150 template<
typename NodeType >
152 void *
addr = const_cast<NodeType *>(node);
156 template<
typename NodeType >
157 static inline void fgt_node_desc(
const NodeType *node,
const char *desc ) {
166 static inline void fgt_body(
void *node,
void *body ) {
170 template<
int N,
typename PortsTuple >
174 fgt_internal_output_helper<PortsTuple, N>::register_port(
input_port, ports );
177 template<
int N,
typename PortsTuple >
181 fgt_internal_output_helper<PortsTuple, N>::register_port(
input_port, ports );
185 template<
int N,
typename PortsTuple >
189 fgt_internal_input_helper<PortsTuple, N>::register_port(
output_port, ports );
221 fgt_internal_create_input_port(
output_port, decrement_port, FLOW_INPUT_PORT_1 );
232 static inline void fgt_graph(
void *g ) {
268 #else // TBB_USE_THREADING_TOOLS 276 template<
typename NodeType >
279 template<
typename NodeType >
286 template<
int N,
typename PortsTuple >
289 template<
int N,
typename PortsTuple >
292 template<
int N,
typename PortsTuple >
317 template<
typename NodeType >
320 template <
typename PortsTuple,
int N >
325 template <
typename PortsTuple,
int N >
330 #endif // TBB_USE_THREADING_TOOLS static void fgt_async_commit(void *, void *)
static void fgt_async_reserve(void *, void *)
static void fgt_make_edge(void *, void *)
void fgt_multiinput_multioutput_node_desc(const NodeType *, const char *)
static void fgt_body(void *, void *)
tbb::flow::tuple_element< N, typename JNT::input_ports_type >::type & input_port(JNT &jn)
templated function to refer to input ports of the join node
static void fgt_begin_body(void *)
static void fgt_async_try_put_end(void *, void *)
static void fgt_composite(void *, void *)
static void fgt_async_try_put_begin(void *, void *)
static void fgt_graph_desc(void *, const char *)
void itt_region_begin(itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
void const char const char int ITT_FORMAT __itt_group_sync p
static void fgt_release_wait(void *)
static void fgt_alias_port(void *, void *, bool)
Pure virtual template class that defines a receiver of messages of type T.
tbb::flow::tuple_element< N, typename MOP::output_ports_type >::type & output_port(MOP &op)
static void alias_port(void *, PortsTuple &)
void itt_task_begin(itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
void itt_make_task_group(itt_domain_enum, void *, unsigned long long, void *, unsigned long long, string_index)
static void fgt_graph(void *)
static void fgt_multiinput_multioutput_node(string_index, void *, void *)
static void fgt_remove_edge(void *, void *)
static void fgt_node_with_body(string_index, void *, void *, void *)
static void fgt_multiinput_node(string_index, void *, PortsTuple &, void *)
static void fgt_end_body(void *)
void itt_task_end(itt_domain_enum)
void itt_metadata_str_add(itt_domain_enum, void *, unsigned long long, string_index, const char *)
void itt_relation_add(itt_domain_enum, void *, unsigned long long, itt_relation, void *, unsigned long long)
static void fgt_multioutput_node(string_index, void *, void *, PortsTuple &)
static void fgt_reserve_wait(void *)
void itt_region_end(itt_domain_enum, void *, unsigned long long)
static void fgt_multioutput_node_desc(const NodeType *, const char *)
static void fgt_node(string_index, void *, void *)
static void fgt_multioutput_node_with_body(string_index, void *, void *, PortsTuple &, void *)
static void alias_port(void *, PortsTuple &)
static void fgt_node_desc(const NodeType *, const char *)
Forward declaration section.