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
445fd347
authored
Dec 19, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_network_c: fixed cpplint warnings
parent
9d9184e6
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
17 deletions
+16
-17
mtapi_network_c/src/embb_mtapi_network.c
+0
-1
mtapi_network_c/src/embb_mtapi_network_socket.h
+1
-1
mtapi_network_c/test/embb_mtapi_network_test_task.cc
+15
-15
No files found.
mtapi_network_c/src/embb_mtapi_network.c
View file @
445fd347
...
...
@@ -322,7 +322,6 @@ static int embb_mtapi_network_thread(void * args) {
}
}
}
}
}
}
...
...
mtapi_network_c/src/embb_mtapi_network_socket.h
View file @
445fd347
...
...
@@ -97,4 +97,4 @@ int embb_mtapi_network_socket_recvbuffer_sized(
}
#endif
#endif // MTAPI_C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
#endif // MTAPI_
NETWORK_
C_SRC_EMBB_MTAPI_NETWORK_SOCKET_H_
mtapi_network_c/test/embb_mtapi_network_test_task.cc
View file @
445fd347
...
...
@@ -51,11 +51,11 @@ static void test(
EMBB_UNUSED
(
context
);
EMBB_UNUSED
(
result_buffer_size
);
EMBB_UNUSED
(
node_local_data_size
);
int
elements
=
(
int
)
(
arguments_size
/
sizeof
(
float
)
/
2
);
float
*
a
=
(
float
*
)
arguments
;
float
*
b
=
((
float
*
)
arguments
)
+
elements
;
float
*
c
=
(
float
*
)
result_buffer
;
float
*
d
=
(
float
*
)
node_local_data
;
int
elements
=
static_cast
<
int
>
(
arguments_size
/
sizeof
(
float
)
/
2
);
float
const
*
a
=
reinterpret_cast
<
float
const
*>
(
arguments
)
;
float
const
*
b
=
reinterpret_cast
<
float
const
*>
(
arguments
)
+
elements
;
float
*
c
=
reinterpret_cast
<
float
*>
(
result_buffer
)
;
float
const
*
d
=
reinterpret_cast
<
float
const
*>
(
node_local_data
)
;
for
(
int
ii
=
0
;
ii
<
elements
;
ii
++
)
{
c
[
ii
]
=
a
[
ii
]
+
b
[
ii
]
+
d
[
0
];
}
...
...
@@ -72,13 +72,13 @@ void NetworkTaskTest::TestBasic() {
mtapi_task_hndl_t
task
;
mtapi_action_hndl_t
network_action
,
local_action
;
const
int
e
lements
=
64
;
float
arguments
[
e
lements
*
2
];
float
results
[
e
lements
];
const
int
kE
lements
=
64
;
float
arguments
[
kE
lements
*
2
];
float
results
[
kE
lements
];
for
(
int
ii
=
0
;
ii
<
e
lements
;
ii
++
)
{
arguments
[
ii
]
=
(
float
)
ii
;
arguments
[
ii
+
elements
]
=
(
float
)
ii
;
for
(
int
ii
=
0
;
ii
<
kE
lements
;
ii
++
)
{
arguments
[
ii
]
=
static_cast
<
float
>
(
ii
)
;
arguments
[
ii
+
kElements
]
=
static_cast
<
float
>
(
ii
)
;
}
mtapi_initialize
(
...
...
@@ -90,7 +90,7 @@ void NetworkTaskTest::TestBasic() {
MTAPI_CHECK_STATUS
(
status
);
mtapi_network_plugin_initialize
(
"127.0.0.1"
,
12345
,
5
,
e
lements
*
4
*
3
+
32
,
&
status
);
kE
lements
*
4
*
3
+
32
,
&
status
);
MTAPI_CHECK_STATUS
(
status
);
float
node_remote
=
1.0
f
;
...
...
@@ -117,8 +117,8 @@ void NetworkTaskTest::TestBasic() {
task
=
mtapi_task_start
(
MTAPI_TASK_ID_NONE
,
job
,
arguments
,
e
lements
*
2
*
sizeof
(
float
),
results
,
e
lements
*
sizeof
(
float
),
arguments
,
kE
lements
*
2
*
sizeof
(
float
),
results
,
kE
lements
*
sizeof
(
float
),
MTAPI_DEFAULT_TASK_ATTRIBUTES
,
MTAPI_GROUP_NONE
,
&
status
);
...
...
@@ -127,7 +127,7 @@ void NetworkTaskTest::TestBasic() {
mtapi_task_wait
(
task
,
MTAPI_INFINITE
,
&
status
);
MTAPI_CHECK_STATUS
(
status
);
for
(
int
ii
=
0
;
ii
<
e
lements
;
ii
++
)
{
for
(
int
ii
=
0
;
ii
<
kE
lements
;
ii
++
)
{
PT_EXPECT_EQ
(
results
[
ii
],
ii
*
2
+
1
);
}
...
...
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