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) {
...
@@ -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(
...
@@ -97,4 +97,4 @@ int embb_mtapi_network_socket_recvbuffer_sized(
}
}
#endif
#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(
...
@@ -51,11 +51,11 @@ static void test(
EMBB_UNUSED
(
context
);
EMBB_UNUSED
(
context
);
EMBB_UNUSED
(
result_buffer_size
);
EMBB_UNUSED
(
result_buffer_size
);
EMBB_UNUSED
(
node_local_data_size
);
EMBB_UNUSED
(
node_local_data_size
);
int
elements
=
(
int
)
(
arguments_size
/
sizeof
(
float
)
/
2
);
int
elements
=
static_cast
<
int
>
(
arguments_size
/
sizeof
(
float
)
/
2
);
float
*
a
=
(
float
*
)
arguments
;
float
const
*
a
=
reinterpret_cast
<
float
const
*>
(
arguments
)
;
float
*
b
=
((
float
*
)
arguments
)
+
elements
;
float
const
*
b
=
reinterpret_cast
<
float
const
*>
(
arguments
)
+
elements
;
float
*
c
=
(
float
*
)
result_buffer
;
float
*
c
=
reinterpret_cast
<
float
*>
(
result_buffer
)
;
float
*
d
=
(
float
*
)
node_local_data
;
float
const
*
d
=
reinterpret_cast
<
float
const
*>
(
node_local_data
)
;
for
(
int
ii
=
0
;
ii
<
elements
;
ii
++
)
{
for
(
int
ii
=
0
;
ii
<
elements
;
ii
++
)
{
c
[
ii
]
=
a
[
ii
]
+
b
[
ii
]
+
d
[
0
];
c
[
ii
]
=
a
[
ii
]
+
b
[
ii
]
+
d
[
0
];
}
}
...
@@ -72,13 +72,13 @@ void NetworkTaskTest::TestBasic() {
...
@@ -72,13 +72,13 @@ void NetworkTaskTest::TestBasic() {
mtapi_task_hndl_t
task
;
mtapi_task_hndl_t
task
;
mtapi_action_hndl_t
network_action
,
local_action
;
mtapi_action_hndl_t
network_action
,
local_action
;
const
int
e
lements
=
64
;
const
int
kE
lements
=
64
;
float
arguments
[
e
lements
*
2
];
float
arguments
[
kE
lements
*
2
];
float
results
[
e
lements
];
float
results
[
kE
lements
];
for
(
int
ii
=
0
;
ii
<
e
lements
;
ii
++
)
{
for
(
int
ii
=
0
;
ii
<
kE
lements
;
ii
++
)
{
arguments
[
ii
]
=
(
float
)
ii
;
arguments
[
ii
]
=
static_cast
<
float
>
(
ii
)
;
arguments
[
ii
+
elements
]
=
(
float
)
ii
;
arguments
[
ii
+
kElements
]
=
static_cast
<
float
>
(
ii
)
;
}
}
mtapi_initialize
(
mtapi_initialize
(
...
@@ -90,7 +90,7 @@ void NetworkTaskTest::TestBasic() {
...
@@ -90,7 +90,7 @@ void NetworkTaskTest::TestBasic() {
MTAPI_CHECK_STATUS
(
status
);
MTAPI_CHECK_STATUS
(
status
);
mtapi_network_plugin_initialize
(
"127.0.0.1"
,
12345
,
5
,
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
);
MTAPI_CHECK_STATUS
(
status
);
float
node_remote
=
1.0
f
;
float
node_remote
=
1.0
f
;
...
@@ -117,8 +117,8 @@ void NetworkTaskTest::TestBasic() {
...
@@ -117,8 +117,8 @@ void NetworkTaskTest::TestBasic() {
task
=
mtapi_task_start
(
task
=
mtapi_task_start
(
MTAPI_TASK_ID_NONE
,
MTAPI_TASK_ID_NONE
,
job
,
job
,
arguments
,
e
lements
*
2
*
sizeof
(
float
),
arguments
,
kE
lements
*
2
*
sizeof
(
float
),
results
,
e
lements
*
sizeof
(
float
),
results
,
kE
lements
*
sizeof
(
float
),
MTAPI_DEFAULT_TASK_ATTRIBUTES
,
MTAPI_DEFAULT_TASK_ATTRIBUTES
,
MTAPI_GROUP_NONE
,
MTAPI_GROUP_NONE
,
&
status
);
&
status
);
...
@@ -127,7 +127,7 @@ void NetworkTaskTest::TestBasic() {
...
@@ -127,7 +127,7 @@ void NetworkTaskTest::TestBasic() {
mtapi_task_wait
(
task
,
MTAPI_INFINITE
,
&
status
);
mtapi_task_wait
(
task
,
MTAPI_INFINITE
,
&
status
);
MTAPI_CHECK_STATUS
(
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
);
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