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
d06a82f0
authored
Jan 30, 2016
by
Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dataflow_cpp: removed debug code from Action, changed done sync to atomics
parent
2f7e8112
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
dataflow_cpp/include/embb/dataflow/internal/action.h
+2
-9
dataflow_cpp/include/embb/dataflow/internal/source.h
+3
-1
No files found.
dataflow_cpp/include/embb/dataflow/internal/action.h
View file @
d06a82f0
...
@@ -39,29 +39,22 @@ namespace internal {
...
@@ -39,29 +39,22 @@ namespace internal {
class
Action
{
class
Action
{
public
:
public
:
Action
()
:
node_
(
NULL
),
clock_
(
0
)
,
pending_
(
0
)
{}
Action
()
:
node_
(
NULL
),
clock_
(
0
)
{}
Action
(
Node
*
node
,
int
clock
)
:
node_
(
node
),
clock_
(
clock
)
,
pending_
(
2
)
{}
Action
(
Node
*
node
,
int
clock
)
:
node_
(
node
),
clock_
(
clock
)
{}
void
RunSequential
()
{
void
RunSequential
()
{
pending_
=
1
;
node_
->
Run
(
clock_
);
node_
->
Run
(
clock_
);
pending_
=
0
;
}
}
void
RunMTAPI
(
embb
::
tasks
::
TaskContext
&
/*context*/
)
{
void
RunMTAPI
(
embb
::
tasks
::
TaskContext
&
/*context*/
)
{
pending_
=
1
;
node_
->
Run
(
clock_
);
node_
->
Run
(
clock_
);
pending_
=
0
;
}
}
bool
IsPending
()
const
{
return
pending_
>
0
;
}
int
GetClock
()
const
{
return
clock_
;
}
int
GetClock
()
const
{
return
clock_
;
}
private
:
private
:
Node
*
node_
;
Node
*
node_
;
int
clock_
;
int
clock_
;
volatile
int
pending_
;
};
};
}
// namespace internal
}
// namespace internal
...
...
dataflow_cpp/include/embb/dataflow/internal/source.h
View file @
d06a82f0
...
@@ -27,6 +27,8 @@
...
@@ -27,6 +27,8 @@
#ifndef EMBB_DATAFLOW_INTERNAL_SOURCE_H_
#ifndef EMBB_DATAFLOW_INTERNAL_SOURCE_H_
#define EMBB_DATAFLOW_INTERNAL_SOURCE_H_
#define EMBB_DATAFLOW_INTERNAL_SOURCE_H_
#include <embb/base/atomic.h>
#include <embb/dataflow/internal/node.h>
#include <embb/dataflow/internal/node.h>
#include <embb/dataflow/internal/outputs.h>
#include <embb/dataflow/internal/outputs.h>
#include <embb/dataflow/internal/source_executor.h>
#include <embb/dataflow/internal/source_executor.h>
...
@@ -88,7 +90,7 @@ class Source< Slices, Outputs<Slices, O1, O2, O3, O4, O5> >
...
@@ -88,7 +90,7 @@ class Source< Slices, Outputs<Slices, O1, O2, O3, O4, O5> >
private
:
private
:
OutputsType
outputs_
;
OutputsType
outputs_
;
ExecutorType
executor_
;
ExecutorType
executor_
;
volatile
bool
not_done_
;
embb
::
base
::
Atomic
<
bool
>
not_done_
;
};
};
}
// namespace internal
}
// namespace internal
...
...
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