Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e1deba5b
authored
Oct 13, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dataflow_cpp: added operator to directly connect output 0 to input 0
parent
fde3ae66
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
75 additions
and
2 deletions
+75
-2
dataflow_cpp/include/embb/dataflow/internal/constant_source.h
+5
-0
dataflow_cpp/include/embb/dataflow/internal/process.h
+5
-0
dataflow_cpp/include/embb/dataflow/internal/select.h
+5
-0
dataflow_cpp/include/embb/dataflow/internal/source.h
+5
-0
dataflow_cpp/include/embb/dataflow/internal/switch.h
+5
-0
dataflow_cpp/include/embb/dataflow/network.h
+48
-0
doc/examples/dataflow/dataflow_connect-snippet.h
+2
-2
No files found.
dataflow_cpp/include/embb/dataflow/internal/constant_source.h
View file @
e1deba5b
...
...
@@ -68,6 +68,11 @@ class ConstantSource
typename
TypeAt
<
typename
OutputsType
::
Types
,
Index
>::
Result
&
GetOutput
()
{
return
outputs_
.
template
Get
<
Index
>
();
}
template
<
typename
T
>
void
operator
>>
(
T
&
target
)
{
GetOutput
<
0
>
()
>>
target
.
GetInput
<
0
>
();
}
};
}
// namespace internal
...
...
dataflow_cpp/include/embb/dataflow/internal/process.h
View file @
e1deba5b
...
...
@@ -98,6 +98,11 @@ class Process< Slices, Serial, Inputs<Slices, I1, I2, I3, I4, I5>,
return
outputs_
.
template
Get
<
Index
>
();
}
template
<
typename
T
>
void
operator
>>
(
T
&
target
)
{
GetOutput
<
0
>
()
>>
target
.
GetInput
<
0
>
();
}
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
if
(
!
inputs_
.
AreAtClock
(
clock
))
...
...
dataflow_cpp/include/embb/dataflow/internal/select.h
View file @
e1deba5b
...
...
@@ -99,6 +99,11 @@ class Select
return
outputs_
.
template
Get
<
Index
>
();
}
template
<
typename
T
>
void
operator
>>
(
T
&
target
)
{
GetOutput
<
0
>
()
>>
target
.
GetInput
<
0
>
();
}
virtual
void
OnClock
(
int
clock
)
{
//const int idx = clock % Slices;
if
(
!
inputs_
.
AreAtClock
(
clock
))
...
...
dataflow_cpp/include/embb/dataflow/internal/source.h
View file @
e1deba5b
...
...
@@ -81,6 +81,11 @@ class Source< Slices, Outputs<Slices, O1, O2, O3, O4, O5> >
return
outputs_
.
template
Get
<
Index
>
();
}
template
<
typename
T
>
void
operator
>>
(
T
&
target
)
{
GetOutput
<
0
>
()
>>
target
.
GetInput
<
0
>
();
}
private
:
OutputsType
outputs_
;
ExecutorType
executor_
;
...
...
dataflow_cpp/include/embb/dataflow/internal/switch.h
View file @
e1deba5b
...
...
@@ -96,6 +96,11 @@ class Switch
return
outputs_
.
template
Get
<
Index
>
();
}
template
<
typename
T
>
void
operator
>>
(
T
&
target
)
{
GetOutput
<
0
>
()
>>
target
.
GetInput
<
0
>
();
}
virtual
void
OnClock
(
int
clock
)
{
//const int idx = clock % Slices;
if
(
!
inputs_
.
AreAtClock
(
clock
))
...
...
dataflow_cpp/include/embb/dataflow/network.h
View file @
e1deba5b
...
...
@@ -235,6 +235,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
@@ -315,6 +323,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
@@ -385,6 +401,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
@@ -455,6 +479,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
@@ -588,6 +620,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
@@ -639,6 +679,14 @@ class Network {
*/
template
<
int
Index
>
typename
OutputsType
::
Types
<
Index
>::
Result
&
GetOutput
();
/**
* Connects output port 0 to input port 0 of \c target.
* \param target Process to connect to.
* \tparam T Type of target process.
*/
template
<
typename
T
>
void
operator
>>
(
T
&
target
);
};
/**
...
...
doc/examples/dataflow/dataflow_connect-snippet.h
View file @
e1deba5b
read
.
GetOutput
<
0
>
()
>>
replace
.
GetInput
<
0
>
()
;
replace
.
GetOutput
<
0
>
()
>>
write
.
GetInput
<
0
>
()
;
read
>>
replace
;
replace
>>
write
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment