From 9bcc7d15d54218f7c6cb87e13af92c350bb1121e Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 19 Apr 2016 08:56:12 +0200 Subject: [PATCH] examples: fixed mtapi_cpp example --- doc/examples/mtapi/mtapi_cpp-fragmented.cc | 2 +- doc/examples/mtapi/mtapi_cpp_register_action-snippet.h | 4 ++-- doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/examples/mtapi/mtapi_cpp-fragmented.cc b/doc/examples/mtapi/mtapi_cpp-fragmented.cc index 427039e..8754087 100644 --- a/doc/examples/mtapi/mtapi_cpp-fragmented.cc +++ b/doc/examples/mtapi/mtapi_cpp-fragmented.cc @@ -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 */ diff --git a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h index beeea5a..b1bb615 100644 --- a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h @@ -1,9 +1,9 @@ /* 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); diff --git a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h index 9f1f9d7..c4f35a5 100644 --- a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h @@ -1,4 +1,4 @@ - 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); -- libgit2 0.26.0