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
9bcc7d15
authored
Apr 19, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
examples: fixed mtapi_cpp example
parent
a90d311a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
doc/examples/mtapi/mtapi_cpp-fragmented.cc
+1
-1
doc/examples/mtapi/mtapi_cpp_register_action-snippet.h
+2
-2
doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h
+1
-1
No files found.
doc/examples/mtapi/mtapi_cpp-fragmented.cc
View file @
9bcc7d15
...
...
@@ -51,8 +51,8 @@ static
static
int
fibonacci
(
int
n
)
{
#include "mtapi/mtapi_cpp_initialize-snippet.h"
#include "mtapi/mtapi_cpp_register_action-snippet.h"
#include "mtapi/mtapi_cpp_get_node-snippet.h"
#include "mtapi/mtapi_cpp_register_action-snippet.h"
/* start calculation */
#include "mtapi/mtapi_cpp_start_task-snippet.h"
/* wait for task completion */
...
...
doc/examples/mtapi/mtapi_cpp_register_action-snippet.h
View file @
9bcc7d15
/* create action */
embb
::
mtapi
::
Action
fibonacciAction
(
embb
::
mtapi
::
Action
fibonacciAction
=
node
.
CreateAction
(
FIBONACCI_JOB
,
/* action ID, defined by the
application */
(
fibonacciActionFunction
)
/* action function */
);
/* get job */
fibonacciJob
=
embb
::
mtapi
::
Job
(
FIBONACCI_JOB
,
THIS_DOMAIN_ID
);
fibonacciJob
=
node
.
Get
Job
(
FIBONACCI_JOB
,
THIS_DOMAIN_ID
);
doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h
View file @
9bcc7d15
mtapi_status_t
status
=
task
.
Wait
(
MTAPI_INFINITE
);
status
=
task
.
Wait
(
MTAPI_INFINITE
);
if
(
status
!=
MTAPI_SUCCESS
)
{
printf
(
"task failed with error: %d
\n\n
"
,
status
);
exit
(
status
);
...
...
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