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
ca9ffed3
authored
Jun 16, 2015
by
bernhard-gatzhammer
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb460_invoke_remove_onefct' into development
parents
7c313f90
e859073f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
algorithms_cpp/include/embb/algorithms/invoke.h
+10
-19
algorithms_cpp/test/invoke_test.cc
+20
-1
No files found.
algorithms_cpp/include/embb/algorithms/invoke.h
View file @
ca9ffed3
...
...
@@ -49,33 +49,37 @@ typedef embb::base::Function<void> InvokeFunctionType;
#ifdef DOXYGEN
/**
* Spawns
one
to ten function objects at once and runs them in parallel.
* Spawns
two
to ten function objects at once and runs them in parallel.
*
* Blocks until all of them are done.
*
* \ingroup CPP_ALGORITHMS_INVOKE
*/
template
<
typename
Function1
,
...
>
template
<
typename
Function1
,
typename
Function2
,
...
>
void
Invoke
(
Function1
func1
,
/**< [in] First function object to invoke */
Function2
func2
,
/**< [in] Second function object to invoke */
...);
/**
* Spawns
one
to ten function objects at once and runs them in parallel using the
* Spawns
two
to ten function objects at once and runs them in parallel using the
* given embb::mtapi::ExecutionPolicy.
*
* Blocks until all of them are done.
*
* \ingroup CPP_ALGORITHMS_INVOKE
*/
template
<
typename
Function1
,
...
>
template
<
typename
Function1
,
typename
Function2
,
...
>
void
Invoke
(
Function1
func1
,
/**< [in] Function object to invoke */
Function2
func2
,
/**< [in] Second function object to invoke */
...,
const
embb
::
mtapi
::
ExecutionPolicy
&
policy
/**< [in] embb::
mtapi
::ExecutionPolicy to use */
const
embb
::
tasks
::
ExecutionPolicy
&
policy
/**< [in] embb::
tasks
::ExecutionPolicy to use */
);
#else // DOXYGEN
...
...
@@ -118,13 +122,6 @@ class TaskWrapper {
};
}
// namespace internal
template
<
typename
Function1
>
void
Invoke
(
Function1
func1
,
const
embb
::
tasks
::
ExecutionPolicy
&
policy
)
{
internal
::
TaskWrapper
<
Function1
>
wrap1
(
func1
,
policy
);
}
template
<
typename
Function1
,
typename
Function2
>
void
Invoke
(
Function1
func1
,
...
...
@@ -290,12 +287,6 @@ template<typename Function1, typename Function2, typename Function3,
internal
::
TaskWrapper
<
Function10
>
wrap10
(
func10
,
policy
);
}
template
<
typename
Function1
>
void
Invoke
(
Function1
func1
)
{
Invoke
(
func1
,
embb
::
tasks
::
ExecutionPolicy
());
}
template
<
typename
Function1
,
typename
Function2
>
void
Invoke
(
Function1
func1
,
...
...
algorithms_cpp/test/invoke_test.cc
View file @
ca9ffed3
...
...
@@ -44,7 +44,6 @@ static void Invocable10() {}
void
InvokeTest
::
Test
()
{
using
embb
::
algorithms
::
Invoke
;
Invoke
(
&
Invocable1
);
Invoke
(
&
Invocable1
,
&
Invocable2
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
);
...
...
@@ -61,4 +60,24 @@ void InvokeTest::Test() {
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
&
Invocable9
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
&
Invocable9
,
&
Invocable10
);
embb
::
tasks
::
ExecutionPolicy
policy
;
Invoke
(
&
Invocable1
,
&
Invocable2
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
&
Invocable9
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
&
Invocable9
,
policy
);
Invoke
(
&
Invocable1
,
&
Invocable2
,
&
Invocable3
,
&
Invocable4
,
&
Invocable5
,
&
Invocable6
,
&
Invocable7
,
&
Invocable8
,
&
Invocable9
,
&
Invocable10
,
policy
);
}
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