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
c5f8174b
authored
Feb 02, 2015
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed cpplint warnings
parent
49c254b4
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
18 additions
and
12 deletions
+18
-12
algorithms_cpp/include/embb/algorithms/invoke.h
+2
-1
base_c/include/embb/base/c/internal/platform.h
+1
-1
base_c/src/thread.c
+2
-1
base_cpp/include/embb/base/internal/platform.h
+1
-1
base_cpp/test/memory_allocation_test.cc
+6
-3
containers_cpp/test/main.cc
+0
-0
containers_cpp/test/queue_test-inl.h
+2
-1
containers_cpp/test/queue_test.h
+1
-0
mtapi_cpp/src/continuation.cc
+1
-3
mtapi_cpp/src/node.cc
+2
-1
No files found.
algorithms_cpp/include/embb/algorithms/invoke.h
View file @
c5f8174b
...
...
@@ -74,7 +74,8 @@ void Invoke(
Function1
func1
,
/**< [in] Function to invoke */
...,
const
embb
::
mtapi
::
ExecutionPolicy
&
policy
/**< [in] ExecutionPolicy to use */
const
embb
::
mtapi
::
ExecutionPolicy
&
policy
/**< [in] ExecutionPolicy to use */
);
#else // DOXYGEN
...
...
base_c/include/embb/base/c/internal/platform.h
View file @
c5f8174b
...
...
@@ -71,7 +71,7 @@ typedef CONDITION_VARIABLE embb_condition_t;
#define EMBB_THREAD_SPECIFIC static __declspec(thread)
#elif defined EMBB_PLATFORM_THREADING_POSIXTHREADS
/* EMBB_PLATFORM_THREADING_WINTHREADS */
#elif defined EMBB_PLATFORM_THREADING_POSIXTHREADS
#include <pthread.h>
#include <errno.h>
...
...
base_c/src/thread.c
View file @
c5f8174b
...
...
@@ -207,7 +207,8 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set,
int
status
=
pthread_attr_init
(
&
attr
);
if
(
status
!=
0
)
return
EMBB_ERROR
;
if
(
core_set
!=
NULL
)
{
#if defined(EMBB_PLATFORM_HAS_GLIB_CPU) || defined(EMBB_PLATFORM_HAS_HEADER_CPUSET)
#if defined(EMBB_PLATFORM_HAS_GLIB_CPU) || \
defined(EMBB_PLATFORM_HAS_HEADER_CPUSET)
assert
(
embb_core_count_available
()
<
CPU_SETSIZE
&&
"Core sets are only supported up to CPU_SETSIZE processors!"
);
#ifdef EMBB_PLATFORM_HAS_GLIB_CPU
...
...
base_cpp/include/embb/base/internal/platform.h
View file @
c5f8174b
...
...
@@ -49,7 +49,7 @@ typedef embb_condition_t ConditionVariableType;
}
// namespace base
}
// namespace embb
#elif defined EMBB_PLATFORM_THREADING_POSIXTHREADS
// EMBB_PLATFORM_THREADING_WINTHREADS
#elif defined EMBB_PLATFORM_THREADING_POSIXTHREADS
namespace
embb
{
namespace
base
{
...
...
base_cpp/test/memory_allocation_test.cc
View file @
c5f8174b
...
...
@@ -85,7 +85,8 @@ void MemoryAllocationTest::ClassAllocationTest() {
#ifdef EMBB_DEBUG
size_t
n
=
(
sizeof
(
DummyClassForAlignedAllocation
)
+
(
EMBB_PLATFORM_CACHE_LINE_SIZE
-
1
))
/
EMBB_PLATFORM_CACHE_LINE_SIZE
;
expected
+=
(
n
+
1
)
*
EMBB_PLATFORM_CACHE_LINE_SIZE
+
(
sizeof
(
size_t
)
*
3
-
1
);
expected
+=
(
n
+
1
)
*
EMBB_PLATFORM_CACHE_LINE_SIZE
+
(
sizeof
(
size_t
)
*
3
-
1
);
#endif // else EMBB_DEBUG
//check that the memory is aligned!
...
...
@@ -136,14 +137,16 @@ void MemoryAllocationTest::ClassAllocationTest() {
#ifdef EMBB_DEBUG
size_t
n
=
(
sizeof
(
DummyClassForAlignedAllocation
)
*
alloc_iterations
+
(
EMBB_PLATFORM_CACHE_LINE_SIZE
-
1
))
/
EMBB_PLATFORM_CACHE_LINE_SIZE
;
expected
+=
(
n
+
1
)
*
EMBB_PLATFORM_CACHE_LINE_SIZE
+
(
sizeof
(
size_t
)
*
3
-
1
);
expected
+=
(
n
+
1
)
*
EMBB_PLATFORM_CACHE_LINE_SIZE
+
(
sizeof
(
size_t
)
*
3
-
1
);
#endif // else EMBB_DEBUG
// This assert does _not_ hold, but is left for documentation.
// It is not guaranteed that the pointer to the array is aligned.
// See the documentation of the overloaded new[] operator in
// class MemoryAllocation.
// PT_ASSERT_EQ((uintptr_t)aligned_allocated % EMBB_PLATFORM_CACHE_LINE_SIZE, 0);
// PT_ASSERT_EQ((uintptr_t)aligned_allocated %
// EMBB_PLATFORM_CACHE_LINE_SIZE, 0);
//delete!
expected
=
0
;
...
...
containers_cpp/test/main.cc
View file @
c5f8174b
containers_cpp/test/queue_test-inl.h
View file @
c5f8174b
...
...
@@ -108,7 +108,8 @@ QueueTestOrderMPMC_Post() {
// Tally for all elements enqueued by all producers,
// initialized with all 0:
::
std
::
vector
<
unsigned
char
>
total_tally
;
size_t
n_elements_total
=
static_cast
<
size_t
>
(
n_producers
*
n_producer_elements
);
size_t
n_elements_total
=
static_cast
<
size_t
>
(
n_producers
*
n_producer_elements
);
for
(
size_t
i
=
0
;
i
<
n_elements_total
/
8
;
++
i
)
{
total_tally
.
push_back
(
0
);
}
...
...
containers_cpp/test/queue_test.h
View file @
c5f8174b
...
...
@@ -41,6 +41,7 @@ template<typename Queue_t,
class
QueueTest
:
public
partest
::
TestCase
{
public
:
typedef
::
std
::
pair
<
size_t
,
int
>
element_t
;
private
:
/// Minimum number of elements enqueued by every producer
/// in MP/MC unit test. Must be a multiple of 8.
...
...
mtapi_cpp/src/continuation.cc
View file @
c5f8174b
...
...
@@ -87,9 +87,7 @@ Task Continuation::Spawn(ExecutionPolicy execution_policy) {
return
node
.
Spawn
(
Action
(
embb
::
base
::
MakeFunction
(
*
this
,
&
Continuation
::
ExecuteContinuation
),
ExecutionPolicy
(
execution_policy
)
)
);
ExecutionPolicy
(
execution_policy
)));
}
}
// namespace mtapi
...
...
mtapi_cpp/src/node.cc
View file @
c5f8174b
...
...
@@ -152,7 +152,8 @@ void Node::Initialize(
assert
(
MTAPI_SUCCESS
==
status
);
embb_core_set_t
cs
;
embb_core_set_init
(
&
cs
,
0
);
for
(
unsigned
int
ii
=
0
;
embb_core_set_count
(
&
cs
)
<
core_set
.
Count
();
ii
++
)
{
for
(
unsigned
int
ii
=
0
;
embb_core_set_count
(
&
cs
)
<
core_set
.
Count
();
ii
++
)
{
if
(
core_set
.
IsContained
(
ii
))
{
embb_core_set_add
(
&
cs
,
ii
);
}
...
...
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