Commit 9bcc7d15 by Marcus Winter

examples: fixed mtapi_cpp example

parent a90d311a
......@@ -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 */
......
/* 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.GetJob(FIBONACCI_JOB, THIS_DOMAIN_ID);
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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment