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
386fef49
authored
Feb 25, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed cpplint warnings
parent
fc85c93b
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
46 additions
and
38 deletions
+46
-38
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
+1
-1
algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h
+1
-1
algorithms_cpp/test/count_test.cc
+2
-2
base_c/include/embb/base/c/internal/platform.h
+1
-1
base_c/test/alloc_test.h
+1
-1
base_c/test/condition_var_test.h
+1
-1
base_c/test/core_set_test.h
+1
-1
base_c/test/counter_test.h
+1
-1
base_c/test/duration_test.h
+1
-1
base_c/test/thread_index_test.h
+1
-1
base_c/test/thread_specific_storage_test.h
+1
-1
base_c/test/thread_test.h
+2
-1
base_c/test/time_test.h
+1
-1
base_cpp/include/embb/base/core_set.h
+1
-1
base_cpp/include/embb/base/duration.h
+1
-1
base_cpp/include/embb/base/exceptions.h
+1
-1
base_cpp/include/embb/base/internal/duration-inl.h
+1
-1
base_cpp/include/embb/base/internal/mutex-inl.h
+1
-1
base_cpp/include/embb/base/internal/thread-inl.h
+1
-1
base_cpp/include/embb/base/internal/thread_closures.h
+1
-1
base_cpp/include/embb/base/internal/thread_specific_storage-inl.h
+1
-1
base_cpp/include/embb/base/thread_specific_storage.h
+7
-5
base_cpp/include/embb/base/time.h
+1
-1
base_cpp/test/thread_specific_storage_test.h
+1
-1
base_cpp/test/thread_test.h
+1
-1
dataflow_cpp/include/embb/dataflow/internal/inputs.h
+11
-6
mtapi_c/test/embb_mtapi_test_queue.cc
+1
-1
mtapi_c/test/embb_mtapi_test_task.cc
+1
-1
No files found.
algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h
View file @
386fef49
...
@@ -171,7 +171,7 @@ void MergeSort(
...
@@ -171,7 +171,7 @@ void MergeSort(
assert
(
distance
>=
0
);
assert
(
distance
>=
0
);
if
(
block_size
==
0
)
{
if
(
block_size
==
0
)
{
block_size
=
(
static_cast
<
size_t
>
(
distance
)
/
node
.
GetCoreCount
());
block_size
=
(
static_cast
<
size_t
>
(
distance
)
/
node
.
GetCoreCount
());
if
(
block_size
==
0
)
if
(
block_size
==
0
)
block_size
=
1
;
block_size
=
1
;
}
}
...
...
algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h
View file @
386fef49
...
@@ -195,7 +195,7 @@ void QuickSort(RAI first, RAI last, ComparisonFunction comparison,
...
@@ -195,7 +195,7 @@ void QuickSort(RAI first, RAI last, ComparisonFunction comparison,
typename
std
::
iterator_traits
<
RAI
>::
difference_type
distance
=
last
-
first
;
typename
std
::
iterator_traits
<
RAI
>::
difference_type
distance
=
last
-
first
;
assert
(
distance
>
0
);
assert
(
distance
>
0
);
if
(
block_size
==
0
)
{
if
(
block_size
==
0
)
{
block_size
=
(
static_cast
<
size_t
>
(
distance
)
/
node
.
GetCoreCount
());
block_size
=
(
static_cast
<
size_t
>
(
distance
)
/
node
.
GetCoreCount
());
if
(
block_size
==
0
)
if
(
block_size
==
0
)
block_size
=
1
;
block_size
=
1
;
}
}
...
...
algorithms_cpp/test/count_test.cc
View file @
386fef49
...
@@ -59,7 +59,7 @@ CountTest::CountTest() {
...
@@ -59,7 +59,7 @@ CountTest::CountTest() {
void
CountTest
::
TestDataStructures
()
{
void
CountTest
::
TestDataStructures
()
{
using
embb
::
algorithms
::
Count
;
using
embb
::
algorithms
::
Count
;
const
int
size
=
10
;
const
int
size
=
10
;
int
array
[]
=
{
10
,
20
,
30
,
30
,
20
,
10
,
10
,
20
,
20
,
20
};
int
array
[]
=
{
10
,
20
,
30
,
30
,
20
,
10
,
10
,
20
,
20
,
20
};
std
::
vector
<
int
>
vector
(
array
,
array
+
size
);
std
::
vector
<
int
>
vector
(
array
,
array
+
size
);
std
::
deque
<
int
>
deque
(
array
,
array
+
size
);
std
::
deque
<
int
>
deque
(
array
,
array
+
size
);
...
@@ -73,7 +73,7 @@ void CountTest::TestDataStructures() {
...
@@ -73,7 +73,7 @@ void CountTest::TestDataStructures() {
void
CountTest
::
TestCountIf
()
{
void
CountTest
::
TestCountIf
()
{
using
embb
::
algorithms
::
CountIf
;
using
embb
::
algorithms
::
CountIf
;
const
int
size
=
10
;
const
int
size
=
10
;
int
array
[]
=
{
10
,
21
,
30
,
31
,
20
,
11
,
10
,
21
,
20
,
20
};
int
array
[]
=
{
10
,
21
,
30
,
31
,
20
,
11
,
10
,
21
,
20
,
20
};
PT_EXPECT_EQ
(
CountIf
(
array
,
array
+
size
,
IsEven
()),
6
);
PT_EXPECT_EQ
(
CountIf
(
array
,
array
+
size
,
IsEven
()),
6
);
PT_EXPECT_EQ
(
CountIf
(
array
,
array
+
size
,
&
IsEvenFunction
),
6
);
PT_EXPECT_EQ
(
CountIf
(
array
,
array
+
size
,
&
IsEvenFunction
),
6
);
...
...
base_c/include/embb/base/c/internal/platform.h
View file @
386fef49
...
@@ -105,4 +105,4 @@ typedef pthread_cond_t embb_condition_t;
...
@@ -105,4 +105,4 @@ typedef pthread_cond_t embb_condition_t;
}
/* Close extern "C" { */
}
/* Close extern "C" { */
#endif
#endif
#endif
/
* EMBB_BASE_C_INTERNAL_PLATFORM_H_ */
#endif /
/ EMBB_BASE_C_INTERNAL_PLATFORM_H_
base_c/test/alloc_test.h
View file @
386fef49
...
@@ -81,4 +81,4 @@ class AllocTest : public partest::TestCase {
...
@@ -81,4 +81,4 @@ class AllocTest : public partest::TestCase {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_ALLOC_TEST_H_ */
#endif /
/ BASE_C_TEST_ALLOC_TEST_H_
base_c/test/condition_var_test.h
View file @
386fef49
...
@@ -65,4 +65,4 @@ class ConditionVarTest : public partest::TestCase {
...
@@ -65,4 +65,4 @@ class ConditionVarTest : public partest::TestCase {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_CONDITION_VAR_TEST_H_ */
#endif /
/ BASE_C_TEST_CONDITION_VAR_TEST_H_
base_c/test/core_set_test.h
View file @
386fef49
...
@@ -51,4 +51,4 @@ class CoreSetTest : public partest::TestCase {
...
@@ -51,4 +51,4 @@ class CoreSetTest : public partest::TestCase {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_CORE_SET_TEST_H_ */
#endif /
/ BASE_C_TEST_CORE_SET_TEST_H_
base_c/test/counter_test.h
View file @
386fef49
...
@@ -97,4 +97,4 @@ class CounterTest : public partest::TestCase {
...
@@ -97,4 +97,4 @@ class CounterTest : public partest::TestCase {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_COUNTER_TEST_H_ */
#endif /
/ BASE_C_TEST_COUNTER_TEST_H_
base_c/test/duration_test.h
View file @
386fef49
...
@@ -73,4 +73,4 @@ class DurationTest : public partest::TestCase {
...
@@ -73,4 +73,4 @@ class DurationTest : public partest::TestCase {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_DURATION_TEST_H_ */
#endif /
/ BASE_C_TEST_DURATION_TEST_H_
base_c/test/thread_index_test.h
View file @
386fef49
...
@@ -78,4 +78,4 @@ int ThreadStart(void* arg);
...
@@ -78,4 +78,4 @@ int ThreadStart(void* arg);
#endif
/
* BASE_C_TEST_THREAD_INDEX_TEST_H_ */
#endif /
/ BASE_C_TEST_THREAD_INDEX_TEST_H_
base_c/test/thread_specific_storage_test.h
View file @
386fef49
...
@@ -61,4 +61,4 @@ class ThreadSpecificStorageTest : public partest::TestCase {
...
@@ -61,4 +61,4 @@ class ThreadSpecificStorageTest : public partest::TestCase {
#endif
/
* BASE_C_TEST_THREAD_SPECIFIC_STORAGE_TEST_H_ */
#endif /
/ BASE_C_TEST_THREAD_SPECIFIC_STORAGE_TEST_H_
base_c/test/thread_test.h
View file @
386fef49
...
@@ -66,4 +66,4 @@ int ThreadStartFunction(void* arg);
...
@@ -66,4 +66,4 @@ int ThreadStartFunction(void* arg);
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* BASE_C_TEST_THREAD_TEST_H_ */
#endif /
/ BASE_C_TEST_THREAD_TEST_H_
\ No newline at end of file
base_c/test/time_test.h
View file @
386fef49
...
@@ -53,4 +53,4 @@ class TimeTest : public partest::TestCase {
...
@@ -53,4 +53,4 @@ class TimeTest : public partest::TestCase {
#endif
/
* BASE_C_TEST_TIME_TEST_H_ */
#endif /
/ BASE_C_TEST_TIME_TEST_H_
base_cpp/include/embb/base/core_set.h
View file @
386fef49
...
@@ -201,4 +201,4 @@ class CoreSet {
...
@@ -201,4 +201,4 @@ class CoreSet {
#endif
/
* EMBB_BASE_CORE_SET_H_ */
#endif /
/ EMBB_BASE_CORE_SET_H_
base_cpp/include/embb/base/duration.h
View file @
386fef49
...
@@ -522,4 +522,4 @@ class Nanoseconds : public Tick {
...
@@ -522,4 +522,4 @@ class Nanoseconds : public Tick {
#include <embb/base/internal/duration-inl.h>
#include <embb/base/internal/duration-inl.h>
#endif
/
* EMBB_BASE_DURATION_H_ */
#endif /
/ EMBB_BASE_DURATION_H_
base_cpp/include/embb/base/exceptions.h
View file @
386fef49
...
@@ -286,4 +286,4 @@ class ErrorException : public Exception {
...
@@ -286,4 +286,4 @@ class ErrorException : public Exception {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_EXCEPTIONS_H_ */
#endif /
/ EMBB_BASE_EXCEPTIONS_H_
base_cpp/include/embb/base/internal/duration-inl.h
View file @
386fef49
...
@@ -112,4 +112,4 @@ Duration<Tick>::Duration(const embb_duration_t& duration) : rep_() {
...
@@ -112,4 +112,4 @@ Duration<Tick>::Duration(const embb_duration_t& duration) : rep_() {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_INTERNAL_DURATION_INL_H_ */
#endif /
/ EMBB_BASE_INTERNAL_DURATION_INL_H_
base_cpp/include/embb/base/internal/mutex-inl.h
View file @
386fef49
...
@@ -116,4 +116,4 @@ bool UniqueLock<Mutex>::OwnsLock() const {
...
@@ -116,4 +116,4 @@ bool UniqueLock<Mutex>::OwnsLock() const {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_INTERNAL_MUTEX_INL_H_ */
#endif /
/ EMBB_BASE_INTERNAL_MUTEX_INL_H_
base_cpp/include/embb/base/internal/thread-inl.h
View file @
386fef49
...
@@ -107,4 +107,4 @@ std::basic_ostream<CharT, Traits>&
...
@@ -107,4 +107,4 @@ std::basic_ostream<CharT, Traits>&
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_INTERNAL_THREAD_INL_H_ */
#endif /
/ EMBB_BASE_INTERNAL_THREAD_INL_H_
base_cpp/include/embb/base/internal/thread_closures.h
View file @
386fef49
...
@@ -103,4 +103,4 @@ struct ThreadClosureArg2 {
...
@@ -103,4 +103,4 @@ struct ThreadClosureArg2 {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_INTERNAL_THREAD_CLOSURES_H_ */
#endif /
/ EMBB_BASE_INTERNAL_THREAD_CLOSURES_H_
base_cpp/include/embb/base/internal/thread_specific_storage-inl.h
View file @
386fef49
...
@@ -149,4 +149,4 @@ void ThreadSpecificStorage<Type>::Prepare() {
...
@@ -149,4 +149,4 @@ void ThreadSpecificStorage<Type>::Prepare() {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_INTERNAL_THREAD_SPECIFIC_STORAGE_INL_H_ */
#endif /
/ EMBB_BASE_INTERNAL_THREAD_SPECIFIC_STORAGE_INL_H_
base_cpp/include/embb/base/thread_specific_storage.h
View file @
386fef49
...
@@ -35,10 +35,12 @@ namespace embb {
...
@@ -35,10 +35,12 @@ namespace embb {
namespace
base
{
namespace
base
{
namespace
test
{
namespace
test
{
/**
* Forward declaration for friending.
/**
*/
* Forward declaration for friending.
class
ThreadSpecificStorageTest
;
*/
class
ThreadSpecificStorageTest
;
}
}
/**
/**
...
@@ -176,4 +178,4 @@ class ThreadSpecificStorage {
...
@@ -176,4 +178,4 @@ class ThreadSpecificStorage {
#include <embb/base/internal/thread_specific_storage-inl.h>
#include <embb/base/internal/thread_specific_storage-inl.h>
#endif
/
* EMBB_BASE_THREAD_SPECIFIC_STORAGE_H_ */
#endif /
/ EMBB_BASE_THREAD_SPECIFIC_STORAGE_H_
base_cpp/include/embb/base/time.h
View file @
386fef49
...
@@ -78,4 +78,4 @@ class Time {
...
@@ -78,4 +78,4 @@ class Time {
}
// namespace base
}
// namespace base
}
// namespace embb
}
// namespace embb
#endif
/
* EMBB_BASE_TIME_H_ */
#endif /
/ EMBB_BASE_TIME_H_
base_cpp/test/thread_specific_storage_test.h
View file @
386fef49
...
@@ -42,7 +42,7 @@ class ThreadSpecificStorageTest : public partest::TestCase {
...
@@ -42,7 +42,7 @@ class ThreadSpecificStorageTest : public partest::TestCase {
/**
/**
* Adds test units.
* Adds test units.
*/
*/
explicit
ThreadSpecificStorageTest
();
ThreadSpecificStorageTest
();
private
:
private
:
/**
/**
...
...
base_cpp/test/thread_test.h
View file @
386fef49
...
@@ -43,7 +43,7 @@ class ThreadTest : public partest::TestCase {
...
@@ -43,7 +43,7 @@ class ThreadTest : public partest::TestCase {
/**
/**
* Adds test methods.
* Adds test methods.
*/
*/
explicit
ThreadTest
();
/**<
ThreadTest
();
/**<
number of threads concurrently running test methods */
number of threads concurrently running test methods */
private
:
private
:
...
...
dataflow_cpp/include/embb/dataflow/internal/inputs.h
View file @
386fef49
...
@@ -87,9 +87,10 @@ class Inputs<Slices, T1, embb::base::internal::Nil, embb::base::internal::Nil,
...
@@ -87,9 +87,10 @@ class Inputs<Slices, T1, embb::base::internal::Nil, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
if
(
count_
[
idx
]
==
0
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
)
"All inputs already fired for this clock."
)
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
1
;
count_
[
idx
]
=
1
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -132,9 +133,10 @@ class Inputs<Slices, T1, T2, embb::base::internal::Nil,
...
@@ -132,9 +133,10 @@ class Inputs<Slices, T1, T2, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
if
(
count_
[
idx
]
==
0
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
)
"All inputs already fired for this clock."
)
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
2
;
count_
[
idx
]
=
2
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -181,10 +183,11 @@ class Inputs<Slices, T1, T2, T3, embb::base::internal::Nil,
...
@@ -181,10 +183,11 @@ class Inputs<Slices, T1, T2, T3, embb::base::internal::Nil,
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
if
(
count_
[
idx
]
==
0
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
)
"All inputs already fired for this clock."
)
if
(
--
count_
[
idx
]
==
0
)
{
}
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
3
;
count_
[
idx
]
=
3
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
}
}
...
@@ -233,9 +236,10 @@ class Inputs<Slices, T1, T2, T3, T4, embb::base::internal::Nil>
...
@@ -233,9 +236,10 @@ class Inputs<Slices, T1, T2, T3, T4, embb::base::internal::Nil>
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
if
(
count_
[
idx
]
==
0
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
)
"All inputs already fired for this clock."
)
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
4
;
count_
[
idx
]
=
4
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
@@ -290,9 +294,10 @@ class Inputs
...
@@ -290,9 +294,10 @@ class Inputs
}
}
virtual
void
OnClock
(
int
clock
)
{
virtual
void
OnClock
(
int
clock
)
{
const
int
idx
=
clock
%
Slices
;
const
int
idx
=
clock
%
Slices
;
if
(
count_
[
idx
]
==
0
)
if
(
count_
[
idx
]
==
0
)
{
EMBB_THROW
(
embb
::
base
::
ErrorException
,
EMBB_THROW
(
embb
::
base
::
ErrorException
,
"All inputs already fired for this clock."
)
"All inputs already fired for this clock."
)
}
if
(
--
count_
[
idx
]
==
0
)
{
if
(
--
count_
[
idx
]
==
0
)
{
count_
[
idx
]
=
5
;
count_
[
idx
]
=
5
;
listener_
->
OnClock
(
clock
);
listener_
->
OnClock
(
clock
);
...
...
mtapi_c/test/embb_mtapi_test_queue.cc
View file @
386fef49
...
@@ -52,7 +52,7 @@ static void testQueueAction(
...
@@ -52,7 +52,7 @@ static void testQueueAction(
}
}
embb_mtapi_log_info
(
"testQueueAction %d called from worker %d...
\n
"
,
embb_mtapi_log_info
(
"testQueueAction %d called from worker %d...
\n
"
,
workload_id
,
core_num
);
workload_id
,
core_num
);
EMBB_UNUSED
_IN_RELEASE
(
workload_id
);
EMBB_UNUSED
(
workload_id
);
}
}
static
void
testDoSomethingElse
()
{
static
void
testDoSomethingElse
()
{
...
...
mtapi_c/test/embb_mtapi_test_task.cc
View file @
386fef49
...
@@ -50,7 +50,7 @@ static void testTaskAction(
...
@@ -50,7 +50,7 @@ static void testTaskAction(
}
}
embb_mtapi_log_info
(
"testTaskAction %d called from worker %d...
\n
"
,
embb_mtapi_log_info
(
"testTaskAction %d called from worker %d...
\n
"
,
*
reinterpret_cast
<
const
int
*>
(
args
),
core_num
);
*
reinterpret_cast
<
const
int
*>
(
args
),
core_num
);
EMBB_UNUSED
_IN_RELEASE
(
args
);
EMBB_UNUSED
(
args
);
}
}
static
void
testDoSomethingElse
()
{
static
void
testDoSomethingElse
()
{
...
...
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