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
e56e6d9b
authored
Nov 03, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dataflow_cpp: testing with and without main thread reuse
parent
7f751d55
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
dataflow_cpp/test/dataflow_cpp_test_simple.cc
+7
-3
dataflow_cpp/test/dataflow_cpp_test_simple.h
+2
-0
No files found.
dataflow_cpp/test/dataflow_cpp_test_simple.cc
View file @
e56e6d9b
...
@@ -150,12 +150,12 @@ SimpleTest::SimpleTest() {
...
@@ -150,12 +150,12 @@ SimpleTest::SimpleTest() {
#define MTAPI_DOMAIN_ID 1
#define MTAPI_DOMAIN_ID 1
#define MTAPI_NODE_ID 1
#define MTAPI_NODE_ID 1
void
SimpleTest
::
T
estBasic
(
)
{
void
SimpleTest
::
T
rySimple
(
bool
reuse_main_thread
)
{
// All available cores
// All available cores
embb
::
base
::
CoreSet
core_set
(
true
);
embb
::
base
::
CoreSet
core_set
(
true
);
embb
::
mtapi
::
NodeAttributes
node_attr
;
embb
::
mtapi
::
NodeAttributes
node_attr
;
node_attr
node_attr
.
SetReuseMainThread
(
MTAPI_TRU
E
)
.
SetReuseMainThread
(
reuse_main_thread
?
MTAPI_TRUE
:
MTAPI_FALS
E
)
.
SetCoreAffinity
(
core_set
)
.
SetCoreAffinity
(
core_set
)
.
SetMaxQueues
(
2
);
.
SetMaxQueues
(
2
);
embb
::
mtapi
::
Node
::
Initialize
(
embb
::
mtapi
::
Node
::
Initialize
(
...
@@ -163,7 +163,7 @@ void SimpleTest::TestBasic() {
...
@@ -163,7 +163,7 @@ void SimpleTest::TestBasic() {
MTAPI_NODE_ID
,
MTAPI_NODE_ID
,
node_attr
);
node_attr
);
for
(
int
ii
=
0
;
ii
<
1000
0
;
ii
++
)
{
for
(
int
ii
=
0
;
ii
<
1000
;
ii
++
)
{
ArraySink
<
TEST_COUNT
>
asink
;
ArraySink
<
TEST_COUNT
>
asink
;
MyNetwork
network
(
NUM_SLICES
);
MyNetwork
network
(
NUM_SLICES
);
MyConstantSource
constant
(
network
,
4
);
MyConstantSource
constant
(
network
,
4
);
...
@@ -226,3 +226,7 @@ void SimpleTest::TestBasic() {
...
@@ -226,3 +226,7 @@ void SimpleTest::TestBasic() {
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
void
SimpleTest
::
TestBasic
()
{
TrySimple
(
false
);
TrySimple
(
true
);
}
dataflow_cpp/test/dataflow_cpp_test_simple.h
View file @
e56e6d9b
...
@@ -35,6 +35,8 @@ class SimpleTest : public partest::TestCase {
...
@@ -35,6 +35,8 @@ class SimpleTest : public partest::TestCase {
private
:
private
:
void
TestBasic
();
void
TestBasic
();
void
TrySimple
(
bool
reuse_main_thread
);
};
};
#endif // DATAFLOW_CPP_TEST_DATAFLOW_CPP_TEST_SIMPLE_H_
#endif // DATAFLOW_CPP_TEST_DATAFLOW_CPP_TEST_SIMPLE_H_
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