From 68d2ce69b82123d07f1b7c4b74ad5982b2668aa3 Mon Sep 17 00:00:00 2001 From: Winter Date: Sat, 30 Jan 2016 13:23:36 +0100 Subject: [PATCH 01/79] mtapi_c: added missing fields in mtapi_info_t structure --- mtapi_c/include/embb/mtapi/c/mtapi.h | 18 ++++++++++++++++-- mtapi_c/src/embb_mtapi_node_t.c | 5 +++++ 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/mtapi_c/include/embb/mtapi/c/mtapi.h b/mtapi_c/include/embb/mtapi/c/mtapi.h index 65379b8..a146def 100644 --- a/mtapi_c/include/embb/mtapi/c/mtapi.h +++ b/mtapi_c/include/embb/mtapi/c/mtapi.h @@ -307,8 +307,22 @@ typedef mtapi_uint_t mtapi_size_t; * \ingroup RUNTIME_INIT_SHUTDOWN */ struct mtapi_info_struct { - unsigned int hardware_concurrency; /**< number of CPU cores */ - unsigned int used_memory; /**< bytes of memory used by MTAPI */ + mtapi_uint_t mtapi_version; /**< The three last (rightmost) hex + digits are the minor number, and + those left of the minor number are + the major number. */ + mtapi_uint_t organization_id; /**< Implementation vendor or + organization ID. */ + mtapi_uint_t implementation_version; /**< The three last (rightmost) hex + digits are the minor number, and + those left of the minor number are + the major number.*/ + mtapi_uint_t number_of_domains; /**< Number of domains allowed by the + implementation.*/ + mtapi_uint_t number_of_nodes; /**< Number of nodes allowed by the + implementation.*/ + mtapi_uint_t hardware_concurrency; /**< Number of CPU cores available. */ + mtapi_uint_t used_memory; /**< Bytes of memory used by MTAPI. */ }; /** diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index 9f60cd8..7e6e23c 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -120,6 +120,11 @@ void mtapi_initialize( node->scheduler = embb_mtapi_scheduler_new(); if (MTAPI_NULL != node->scheduler) { /* fill information structure */ + node->info.mtapi_version = 0x1000; // mtapi version 1.0 + node->info.organization_id = 0x4711; // TODO(marcus): change to real id + node->info.implementation_version = 0x0003; // implementation version 0.3 + node->info.number_of_domains = 1; + node->info.number_of_nodes = 1; node->info.hardware_concurrency = embb_core_count_available(); node->info.used_memory = embb_mtapi_alloc_get_bytes_allocated(); if (MTAPI_NULL != mtapi_info) { From a2cee7e6ad1efcbeaa44e4dbe4874dc27c533293 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 10 Feb 2016 08:45:06 +0100 Subject: [PATCH 02/79] mtapi_c: changed organization_id to 'LYH ' --- mtapi_c/src/embb_mtapi_node_t.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index 7e6e23c..c9ea83d 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -121,7 +121,7 @@ void mtapi_initialize( if (MTAPI_NULL != node->scheduler) { /* fill information structure */ node->info.mtapi_version = 0x1000; // mtapi version 1.0 - node->info.organization_id = 0x4711; // TODO(marcus): change to real id + node->info.organization_id = 'LYH '; // siemens fcc prefix node->info.implementation_version = 0x0003; // implementation version 0.3 node->info.number_of_domains = 1; node->info.number_of_nodes = 1; From 334a11e8c15030a3bf4eaf4c26b08d67b561685b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 09:01:06 +0100 Subject: [PATCH 03/79] containers_cpp: added missing PT_ASSERT calls in hazard_pointer_test --- containers_cpp/test/hazard_pointer_test.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/containers_cpp/test/hazard_pointer_test.cc b/containers_cpp/test/hazard_pointer_test.cc index 71f1d2e..c98a57d 100644 --- a/containers_cpp/test/hazard_pointer_test.cc +++ b/containers_cpp/test/hazard_pointer_test.cc @@ -211,7 +211,8 @@ void HazardPointerTest2::DeletePointerCallback(int* to_delete) { bool HazardPointerTest2::SetRelativeGuards() { unsigned int thread_index; - embb_internal_thread_index(&thread_index); + int result = embb_internal_thread_index(&thread_index); + PT_ASSERT(EMBB_SUCCESS == result); unsigned int my_begin = guards_per_phread_count_*thread_index; int guard_number = 0; @@ -451,7 +452,8 @@ void HazardPointerTest2::HazardPointerTest2Post() { void HazardPointerTest2::HazardPointerTest2ThreadMethod() { for (;;) { unsigned int thread_index; - embb_internal_thread_index(&thread_index); + int result = embb_internal_thread_index(&thread_index); + PT_ASSERT(EMBB_SUCCESS == result); if (thread_index == current_master_) { HazardPointerTest2Master(); From 001a3f78335ba4b10d89fe3dd75865f50bbed885 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 09:17:29 +0100 Subject: [PATCH 04/79] base_c: fixed memory leak in ThreadSpecificStorageTest --- base_c/test/thread_specific_storage_test.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/base_c/test/thread_specific_storage_test.cc b/base_c/test/thread_specific_storage_test.cc index 50e7b0c..ccd0819 100644 --- a/base_c/test/thread_specific_storage_test.cc +++ b/base_c/test/thread_specific_storage_test.cc @@ -50,7 +50,11 @@ void ThreadSpecificStorageTest::Test() { size_t rank = partest::TestSuite::GetCurrentThreadID(); void* value = embb_tss_get(&tss_); if (value == NULL) { - int status = embb_tss_set(&tss_, new size_t(rank)); + size_t * prank = new size_t(rank); + int status = embb_tss_set(&tss_, prank); + if (EMBB_SUCCESS != status) { + delete prank; + } PT_EXPECT_EQ(status, EMBB_SUCCESS); } else { size_t stored_rank = *static_cast(value); From 55a04f154525aff2b720e61b59d5d27548b3af60 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 09:25:03 +0100 Subject: [PATCH 05/79] mtapi_c: set result to MTAPI_NULL on error in mtapi_group_wait_any --- mtapi_c/src/embb_mtapi_group_t.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_group_t.c b/mtapi_c/src/embb_mtapi_group_t.c index 9e3b0a5..1a7e064 100644 --- a/mtapi_c/src/embb_mtapi_group_t.c +++ b/mtapi_c/src/embb_mtapi_group_t.c @@ -279,6 +279,7 @@ void mtapi_group_wait_any( MTAPI_IN mtapi_timeout_t timeout, MTAPI_OUT mtapi_status_t* status) { mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; + void* local_result = MTAPI_NULL; embb_mtapi_log_trace("mtapi_group_wait_any() called\n"); @@ -335,10 +336,7 @@ void mtapi_group_wait_any( } /* was there a timeout, or is there a result? */ if (MTAPI_NULL != local_task) { - /* store result */ - if (MTAPI_NULL != result) { - *result = local_task->result_buffer; - } + local_result = local_task->result_buffer; /* return error code set by the task */ local_status = local_task->error_code; @@ -356,6 +354,11 @@ void mtapi_group_wait_any( local_status = MTAPI_ERR_NODE_NOTINIT; } + /* store result */ + if (MTAPI_NULL != result) { + *result = local_result; + } + mtapi_status_set(status, local_status); embb_mtapi_log_trace("mtapi_group_wait_any() returns\n"); } From df7ba78142677bde559d5ee48fea86e58c2020ce Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 10:07:38 +0100 Subject: [PATCH 06/79] mtapi_network_c: buffer pop operations set values to zero on failure --- mtapi_network_c/src/embb_mtapi_network_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mtapi_network_c/src/embb_mtapi_network_buffer.c b/mtapi_network_c/src/embb_mtapi_network_buffer.c index 399a530..76ef1b0 100644 --- a/mtapi_network_c/src/embb_mtapi_network_buffer.c +++ b/mtapi_network_c/src/embb_mtapi_network_buffer.c @@ -107,6 +107,7 @@ int embb_mtapi_network_buffer_pop_front_int8( embb_mtapi_network_buffer_t * that, int8_t * value) { if (that->position + 1 > that->size) { + *value = 0; return 0; } memcpy(value, that->data + that->position, 1); @@ -118,6 +119,7 @@ int embb_mtapi_network_buffer_pop_front_int16( embb_mtapi_network_buffer_t * that, int16_t * value) { if (that->position + 2 > that->size) { + *value = 0; return 0; } memcpy(value, that->data + that->position, 2); @@ -129,6 +131,7 @@ int embb_mtapi_network_buffer_pop_front_int32( embb_mtapi_network_buffer_t * that, int32_t * value) { if (that->position + 4 > that->size) { + *value = 0; return 0; } memcpy(value, that->data + that->position, 4); @@ -141,6 +144,7 @@ int embb_mtapi_network_buffer_pop_front_rawdata( int32_t size, void * rawdata) { if (that->position + size > that->size) { + memset(rawdata, 0, (size_t)size); return 0; } memcpy(rawdata, that->data + that->position, (size_t)size); From 1d16981751aa695ec357a0c0464293dc3573ba10 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 10:34:25 +0100 Subject: [PATCH 07/79] mtapi_c: fixed potential null ptr dereference --- mtapi_c/src/embb_mtapi_job_t.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_job_t.c b/mtapi_c/src/embb_mtapi_job_t.c index 227666e..1a399c2 100644 --- a/mtapi_c/src/embb_mtapi_job_t.c +++ b/mtapi_c/src/embb_mtapi_job_t.c @@ -41,6 +41,9 @@ mtapi_boolean_t embb_mtapi_job_initialize_list(embb_mtapi_node_t * node) { node->job_list = (embb_mtapi_job_t*)embb_mtapi_alloc_allocate( sizeof(embb_mtapi_job_t)*(node->attributes.max_jobs + 1)); + if (NULL == node->job_list) { + return MTAPI_FALSE; + } mtapi_uint_t ii; for (ii = 0; ii <= node->attributes.max_jobs; ii++) { embb_mtapi_job_initialize( @@ -112,11 +115,15 @@ void embb_mtapi_job_initialize( that->domain_id = 0; that->node_id = 0; that->num_actions = 0; - that->max_actions = max_actions; that->actions = (mtapi_action_hndl_t*) embb_mtapi_alloc_allocate(sizeof(mtapi_action_hndl_t)*max_actions); - for (ii = 0; ii < max_actions; ii++) { - that->actions[ii].id = EMBB_MTAPI_IDPOOL_INVALID_ID; + if (NULL != that->actions) { + that->max_actions = max_actions; + for (ii = 0; ii < max_actions; ii++) { + that->actions[ii].id = EMBB_MTAPI_IDPOOL_INVALID_ID; + } + } else { + that->max_actions = 0; } } From 158b7148ef7e23a48a0e7a797b93dc3b24dce1d3 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 10:37:47 +0100 Subject: [PATCH 08/79] mtapi_c: fixed null potential null ptr dereference in id pool --- mtapi_c/src/embb_mtapi_id_pool_t.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_id_pool_t.c b/mtapi_c/src/embb_mtapi_id_pool_t.c index 0f10d96..986d7a3 100644 --- a/mtapi_c/src/embb_mtapi_id_pool_t.c +++ b/mtapi_c/src/embb_mtapi_id_pool_t.c @@ -36,14 +36,19 @@ void embb_mtapi_id_pool_initialize( mtapi_uint_t capacity) { mtapi_uint_t ii; - that->capacity = capacity; that->id_buffer = (mtapi_uint_t*) embb_mtapi_alloc_allocate(sizeof(mtapi_uint_t)*(capacity + 1)); - that->id_buffer[0] = EMBB_MTAPI_IDPOOL_INVALID_ID; - for (ii = 1; ii <= capacity; ii++) { - that->id_buffer[ii] = ii; + if (NULL != that->id_buffer) { + that->capacity = capacity; + that->id_buffer[0] = EMBB_MTAPI_IDPOOL_INVALID_ID; + for (ii = 1; ii <= capacity; ii++) { + that->id_buffer[ii] = ii; + } + that->ids_available = capacity; + } else { + that->capacity = 0; + that->ids_available = 0; } - that->ids_available = capacity; that->put_id_position = 0; that->get_id_position = 1; embb_spin_init(&that->lock); From c0ae08cffd5a107efc316977a10198c7c322d7a3 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 11 Feb 2016 10:45:32 +0100 Subject: [PATCH 09/79] mtapi_c: fixed potential null ptr dereference in pool template --- mtapi_c/src/embb_mtapi_pool_template-inl.h | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_pool_template-inl.h b/mtapi_c/src/embb_mtapi_pool_template-inl.h index 5366972..3f0711f 100644 --- a/mtapi_c/src/embb_mtapi_pool_template-inl.h +++ b/mtapi_c/src/embb_mtapi_pool_template-inl.h @@ -61,13 +61,18 @@ mtapi_boolean_t embb_mtapi_##TYPE##_pool_initialize( \ embb_mtapi_id_pool_initialize(&that->id_pool, capacity); \ that->storage = (embb_mtapi_##TYPE##_t*)embb_mtapi_alloc_allocate( \ sizeof(embb_mtapi_##TYPE##_t)*(capacity + 1)); \ - for (ii = 0; ii <= capacity; ii++) { \ - that->storage[ii].handle.id = EMBB_MTAPI_IDPOOL_INVALID_ID; \ - that->storage[ii].handle.tag = 0; \ + if (NULL != that->storage) { \ + for (ii = 0; ii <= capacity; ii++) { \ + that->storage[ii].handle.id = EMBB_MTAPI_IDPOOL_INVALID_ID; \ + that->storage[ii].handle.tag = 0; \ + } \ + /* use entry 0 as invalid */ \ + embb_mtapi_##TYPE##_initialize(that->storage); \ + return MTAPI_TRUE; \ + } else { \ + that->id_pool.ids_available = 0; \ + return MTAPI_FALSE; \ } \ - /* use entry 0 as invalid */ \ - embb_mtapi_##TYPE##_initialize(that->storage); \ - return MTAPI_TRUE; \ } \ \ void embb_mtapi_##TYPE##_pool_finalize(embb_mtapi_##TYPE##_pool_t * that) { \ From 76afcbb3b452e766a1ba738b324b7676b6669ab2 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 15 Feb 2016 18:03:13 +0100 Subject: [PATCH 10/79] dataflow_cpp: number of slices can now be set at runtime --- .../embb/dataflow/internal/clock_listener.h | 1 + .../embb/dataflow/internal/constant_source.h | 4 +- .../include/embb/dataflow/internal/in.h | 28 +++-- .../include/embb/dataflow/internal/inputs.h | 107 +++++++++++------ .../include/embb/dataflow/internal/out.h | 4 +- .../include/embb/dataflow/internal/outputs.h | 37 +++--- .../include/embb/dataflow/internal/process.h | 32 +++-- .../embb/dataflow/internal/process_executor.h | 100 ++++++++-------- .../embb/dataflow/internal/scheduler_mtapi.h | 21 ++-- .../include/embb/dataflow/internal/select.h | 11 +- .../include/embb/dataflow/internal/sink.h | 21 ++-- .../embb/dataflow/internal/sink_executor.h | 30 ++--- .../include/embb/dataflow/internal/source.h | 7 +- .../embb/dataflow/internal/source_executor.h | 40 +++---- .../include/embb/dataflow/internal/switch.h | 9 +- dataflow_cpp/include/embb/dataflow/network.h | 112 ++++++++++-------- dataflow_cpp/test/dataflow_cpp_test_simple.cc | 4 +- 17 files changed, 322 insertions(+), 246 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h index 5234740..e01e8ee 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h +++ b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h @@ -35,6 +35,7 @@ class Scheduler; class ClockListener; struct InitData { + int slices; Scheduler * sched; ClockListener * sink_listener; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h index 4ec14af..4838960 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h @@ -35,11 +35,11 @@ namespace embb { namespace dataflow { namespace internal { -template +template class ConstantSource : public Node { public: - typedef Outputs OutputsType; + typedef Outputs OutputsType; private: OutputsType outputs_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index 60b4024..8324026 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -41,18 +41,18 @@ namespace internal { class Scheduler; -template +template class Out; -template +template class In { public: typedef Signal SignalType; - In() : connected_(false) {} + In() : values_(NULL), connected_(false), slices_(0) {} SignalType const & GetSignal(int clock) const { - return values_[clock % Slices]; + return values_[clock % slices_]; } Type GetValue(int clock) const { @@ -66,26 +66,37 @@ class In { bool IsConnected() const { return connected_; } void SetConnected() { connected_ = true; } + void SetSlices(int slices) { + slices_ = slices; + values_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(SignalType)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + values_[ii] = SignalType(); + } + } + void SetListener(ClockListener * listener) { listener_ = listener; } void Clear(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; values_[idx].Clear(); } - friend class Out; + friend class Out; private: - SignalType values_[Slices]; + SignalType * values_; ClockListener * listener_; bool connected_; + int slices_; #if EMBB_DATAFLOW_TRACE_SIGNAL_HISTORY embb::base::Spinlock lock_; std::vector history_; #endif void Receive(SignalType const & value) { - const int idx = value.GetClock() % Slices; + const int idx = value.GetClock() % slices_; if (values_[idx].GetClock() >= value.GetClock()) EMBB_THROW(embb::base::ErrorException, "Received signal does not increase clock."); @@ -99,6 +110,7 @@ class In { } void ReceiveInit(InitData * init_data) { + SetSlices(init_data->slices); listener_->OnInit(init_data); } }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 7fc87b6..00c3190 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -36,7 +36,6 @@ namespace dataflow { namespace internal { template < - int, typename = embb::base::internal::Nil, typename = embb::base::internal::Nil, typename = embb::base::internal::Nil, @@ -44,8 +43,8 @@ template < typename = embb::base::internal::Nil> class Inputs; -template -class Inputs +class Inputs : public Tuple -class Inputs +class Inputs - : public Tuple, embb::base::internal::Nil, + : public Tuple, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil> , public ClockListener { public: Inputs() { - for (int ii = 0; ii < Slices; ii++) - count_[ii] = 1; test_count_ = 1; } void SetListener(ClockListener * listener) { @@ -89,7 +86,7 @@ class Inputstemplate Get<0>().Clear(clock); } virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; if (count_[idx] == 0) { EMBB_THROW(embb::base::ErrorException, "All inputs already fired for this clock."); @@ -101,25 +98,31 @@ class Inputsslices; + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 1; + } listener_->OnInit(init_data); } } private: - embb::base::Atomic count_[Slices]; + embb::base::Atomic * count_; int test_count_; ClockListener * listener_; + int slices_; }; -template -class Inputs +class Inputs - : public Tuple, In, embb::base::internal::Nil, + : public Tuple, In, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil> , public ClockListener { public: Inputs() { - for (int ii = 0; ii < Slices; ii++) - count_[ii] = 2; test_count_ = 2; } void SetListener(ClockListener * listener) { @@ -142,7 +145,7 @@ class Inputstemplate Get<1>().Clear(clock); } virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; if (count_[idx] == 0) { EMBB_THROW(embb::base::ErrorException, "All inputs already fired for this clock."); @@ -154,25 +157,31 @@ class Inputsslices; + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 2; + } listener_->OnInit(init_data); } } private: - embb::base::Atomic count_[Slices]; + embb::base::Atomic * count_; int test_count_; ClockListener * listener_; + int slices_; }; -template -class Inputs +class Inputs - : public Tuple, In, In, + : public Tuple, In, In, embb::base::internal::Nil, embb::base::internal::Nil> , public ClockListener { public: Inputs() { - for (int ii = 0; ii < Slices; ii++) - count_[ii] = 3; test_count_ = 3; } void SetListener(ClockListener * listener) { @@ -199,7 +208,7 @@ class Inputstemplate Get<2>().Clear(clock); } virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; if (count_[idx] == 0) { EMBB_THROW(embb::base::ErrorException, "All inputs already fired for this clock."); @@ -211,24 +220,30 @@ class Inputsslices; + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 3; + } listener_->OnInit(init_data); } } private: - embb::base::Atomic count_[Slices]; + embb::base::Atomic * count_; int test_count_; ClockListener * listener_; + int slices_; }; -template -class Inputs - : public Tuple, In, In, - In, embb::base::internal::Nil> +template +class Inputs + : public Tuple, In, In, + In, embb::base::internal::Nil> , public ClockListener { public: Inputs() { - for (int ii = 0; ii < Slices; ii++) - count_[ii] = 4; test_count_ = 4; } void SetListener(ClockListener * listener) { @@ -259,7 +274,7 @@ class Inputs this->template Get<3>().Clear(clock); } virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; if (count_[idx] == 0) { EMBB_THROW(embb::base::ErrorException, "All inputs already fired for this clock."); @@ -271,25 +286,31 @@ class Inputs } virtual void OnInit(InitData * init_data) { if (--test_count_ == 0) { + slices_ = init_data->slices; + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 4; + } listener_->OnInit(init_data); } } private: - embb::base::Atomic count_[Slices]; + embb::base::Atomic * count_; int test_count_; ClockListener * listener_; + int slices_; }; -template class Inputs - : public Tuple, In, In, - In, In > + : public Tuple, In, In, + In, In > , public ClockListener { public: Inputs() { - for (int ii = 0; ii < Slices; ii++) - count_[ii] = 5; test_count_ = 5; } void SetListener(ClockListener * listener) { @@ -324,7 +345,7 @@ class Inputs this->template Get<4>().Clear(clock); } virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; if (count_[idx] == 0) { EMBB_THROW(embb::base::ErrorException, "All inputs already fired for this clock."); @@ -336,13 +357,21 @@ class Inputs } virtual void OnInit(InitData * init_data) { if (--test_count_ == 0) { + slices_ = init_data->slices; + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 5; + } listener_->OnInit(init_data); } } private: - embb::base::Atomic count_[Slices]; + embb::base::Atomic * count_; int test_count_; ClockListener * listener_; + int slices_; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/out.h b/dataflow_cpp/include/embb/dataflow/internal/out.h index 9c2f1a1..7227737 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/out.h +++ b/dataflow_cpp/include/embb/dataflow/internal/out.h @@ -37,11 +37,11 @@ namespace internal { class Scheduler; -template +template class Out { public: typedef Signal SignalType; - typedef In InType; + typedef In InType; Out() { } diff --git a/dataflow_cpp/include/embb/dataflow/internal/outputs.h b/dataflow_cpp/include/embb/dataflow/internal/outputs.h index cf926b0..725a8c9 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/outputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/outputs.h @@ -35,7 +35,6 @@ namespace dataflow { namespace internal { template < - int, typename = embb::base::internal::Nil, typename = embb::base::internal::Nil, typename = embb::base::internal::Nil, @@ -43,8 +42,8 @@ template < typename = embb::base::internal::Nil > class Outputs; -template -class Outputs +class Outputs : public Tuple -class Outputs +class Outputs - : public Tuple, embb::base::internal::Nil, + : public Tuple, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil> { public: }; -template -class Outputs +class Outputs - : public Tuple, Out, embb::base::internal::Nil, + : public Tuple, Out, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil> { public: }; -template -class Outputs +class Outputs - : public Tuple, Out, Out, + : public Tuple, Out, Out, embb::base::internal::Nil, embb::base::internal::Nil> { public: }; -template -class Outputs - : public Tuple, Out, Out, - Out, embb::base::internal::Nil>{ +template +class Outputs + : public Tuple, Out, Out, + Out, embb::base::internal::Nil>{ public: }; -template class Outputs - : public Tuple, Out, Out, - Out, Out > { + : public Tuple, Out, Out, + Out, Out > { public: }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 4f5bc3f..0d3c578 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -37,24 +37,25 @@ namespace embb { namespace dataflow { namespace internal { -template class Process; +template class Process; template < - int Slices, bool Serial, + bool Serial, typename I1, typename I2, typename I3, typename I4, typename I5, typename O1, typename O2, typename O3, typename O4, typename O5> -class Process< Slices, Serial, Inputs, - Outputs > +class Process< Serial, Inputs, + Outputs > : public Node , public ClockListener { public: - typedef Inputs InputsType; - typedef Outputs OutputsType; + typedef Inputs InputsType; + typedef Outputs OutputsType; typedef ProcessExecutor< InputsType, OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; explicit Process(FunctionType function) - : executor_(function) { + : executor_(function) + , slices_(0) { next_clock_ = 0; queued_clock_ = 0; bool ordered = Serial; @@ -79,6 +80,14 @@ class Process< Slices, Serial, Inputs, } virtual void Init(InitData * init_data) { + slices_ = init_data->slices; + //inputs_.SetSlices(init_data->slices); + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } SetScheduler(init_data->sched); executor_.Init(init_data, outputs_); } @@ -117,7 +126,7 @@ class Process< Slices, Serial, Inputs, bool retry = true; while (retry) { int clk = next_clock_; - int clk_end = clk + Slices; + int clk_end = clk + slices_; int clk_res = clk; for (int ii = clk; ii < clk_end; ii++) { if (!inputs_.AreAtClock(ii)) { @@ -129,7 +138,7 @@ class Process< Slices, Serial, Inputs, if (next_clock_.CompareAndSwap(clk, clk_res)) { while (queued_clock_.Load() < clk) continue; for (int ii = clk; ii < clk_res; ii++) { - const int idx = ii % Slices; + const int idx = ii % slices_; action_[idx] = Action(this, ii); sched_->Enqueue(queue_id_, action_[idx]); } @@ -141,7 +150,7 @@ class Process< Slices, Serial, Inputs, } } } else { - const int idx = clock % Slices; + const int idx = clock % slices_; action_[idx] = Action(this, clock); sched_->Spawn(action_[idx]); } @@ -155,10 +164,11 @@ class Process< Slices, Serial, Inputs, InputsType inputs_; OutputsType outputs_; ExecutorType executor_; - Action action_[Slices]; + Action * action_; embb::base::Atomic next_clock_; embb::base::Atomic queued_clock_; int queue_id_; + int slices_; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h index 4219cea..9027508 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h @@ -40,8 +40,8 @@ namespace internal { template class ProcessExecutor; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -49,8 +49,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; function_( @@ -62,7 +62,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); } @@ -70,8 +70,8 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -79,8 +79,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -95,7 +95,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); } @@ -104,8 +104,8 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -114,8 +114,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -133,7 +133,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); @@ -143,9 +143,9 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -154,8 +154,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -176,7 +176,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); @@ -187,8 +187,8 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -197,8 +197,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; function_( @@ -211,7 +211,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); } @@ -219,8 +219,8 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -229,8 +229,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -246,7 +246,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); } @@ -255,9 +255,9 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -266,8 +266,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -286,7 +286,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); @@ -296,8 +296,8 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +template +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -306,8 +306,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; function_( @@ -321,7 +321,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); } @@ -329,9 +329,9 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -340,8 +340,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; O2 o2; @@ -358,7 +358,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); } @@ -367,9 +367,9 @@ class ProcessExecutor< Inputs, Outputs > { FunctionType function_; }; -template -class ProcessExecutor< Inputs, Outputs > { +class ProcessExecutor< Inputs, Outputs > { public: typedef embb::base::Function FunctionType; @@ -378,8 +378,8 @@ class ProcessExecutor< Inputs, Outputs > { void Execute( int clock, - Inputs & inputs, - Outputs & outputs) { + Inputs & inputs, + Outputs & outputs) { if (inputs.AreNoneBlank(clock)) { O1 o1; function_( @@ -394,7 +394,7 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); } diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 8f1271e..c2ca76d 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -36,12 +36,17 @@ namespace embb { namespace dataflow { namespace internal { -template class SchedulerMTAPI : public Scheduler { public: - SchedulerMTAPI() { + SchedulerMTAPI(int slices) + : slices_(slices) { embb::tasks::Node & node = embb::tasks::Node::GetInstance(); - for (int ii = 0; ii < Slices; ii++) { + + group_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(embb::tasks::Group*)*slices_)); + + for (int ii = 0; ii < slices_; ii++) { embb::tasks::Group & group = node.CreateGroup(); group_[ii] = &group; } @@ -58,21 +63,22 @@ class SchedulerMTAPI : public Scheduler { } virtual ~SchedulerMTAPI() { embb::tasks::Node & node = embb::tasks::Node::GetInstance(); - for (int ii = 0; ii < Slices; ii++) { + for (int ii = 0; ii < slices_; ii++) { group_[ii]->WaitAll(MTAPI_INFINITE); node.DestroyGroup(*group_[ii]); } + embb::base::Allocation::Free(group_); for (int ii = 0; ii < queue_count_; ii++) { node.DestroyQueue(*queue_[ii]); } embb::base::Allocation::Free(queue_); } virtual void Spawn(Action & action) { - const int idx = action.GetClock() % Slices; + const int idx = action.GetClock() % slices_; group_[idx]->Spawn(embb::base::MakeFunction(action, &Action::RunMTAPI)); } virtual void Enqueue(int process_id, Action & action) { - const int idx = action.GetClock() % Slices; + const int idx = action.GetClock() % slices_; const int queue_id = process_id % queue_count_; queue_[queue_id]->Spawn(group_[idx], embb::base::MakeFunction(action, &Action::RunMTAPI)); @@ -82,9 +88,10 @@ class SchedulerMTAPI : public Scheduler { } private: - embb::tasks::Group * group_[Slices]; + embb::tasks::Group ** group_; embb::tasks::Queue ** queue_; int queue_count_; + int slices_; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index f3a499f..da2384b 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -27,7 +27,6 @@ #ifndef EMBB_DATAFLOW_INTERNAL_SELECT_H_ #define EMBB_DATAFLOW_INTERNAL_SELECT_H_ -#include #include #include #include @@ -37,13 +36,13 @@ namespace embb { namespace dataflow { namespace internal { -template +template class Select : public Node , public ClockListener { public: - typedef Inputs InputsType; - typedef Outputs OutputsType; + typedef Inputs InputsType; + typedef Outputs OutputsType; Select() { inputs_.SetListener(this); @@ -82,6 +81,8 @@ class Select } virtual void Init(InitData * init_data) { + slices_ = init_data->slices; + //inputs_.SetSlices(slices_); SetScheduler(init_data->sched); GetOutput<0>().SendInit(init_data); } @@ -124,7 +125,7 @@ class Select private: InputsType inputs_; OutputsType outputs_; - Action action_[Slices]; + int slices_; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index 2c835ed..e23544c 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -36,16 +36,15 @@ namespace embb { namespace dataflow { namespace internal { -template class Sink; +template class Sink; template < - int Slices, typename I1, typename I2, typename I3, typename I4, typename I5> -class Sink< Slices, Inputs > +class Sink< Inputs > : public Node , public ClockListener { public: - typedef Inputs InputsType; + typedef Inputs InputsType; typedef SinkExecutor< InputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; @@ -73,6 +72,13 @@ class Sink< Slices, Inputs > } virtual void Init(InitData * init_data) { + slices_ = init_data->slices; + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } SetListener(init_data->sink_listener); SetScheduler(init_data->sched); listener_->OnInit(init_data); @@ -96,7 +102,7 @@ class Sink< Slices, Inputs > bool retry = true; while (retry) { int clk = next_clock_; - int clk_end = clk + Slices; + int clk_end = clk + slices_; int clk_res = clk; for (int ii = clk; ii < clk_end; ii++) { if (!inputs_.AreAtClock(ii)) { @@ -108,7 +114,7 @@ class Sink< Slices, Inputs > if (next_clock_.CompareAndSwap(clk, clk_res)) { while (queued_clock_.Load() < clk) continue; for (int ii = clk; ii < clk_res; ii++) { - const int idx = ii % Slices; + const int idx = ii % slices_; action_[idx] = Action(this, ii); sched_->Enqueue(queue_id_, action_[idx]); } @@ -128,11 +134,12 @@ class Sink< Slices, Inputs > private: InputsType inputs_; ExecutorType executor_; - Action action_[Slices]; + Action * action_; ClockListener * listener_; embb::base::Atomic next_clock_; embb::base::Atomic queued_clock_; int queue_id_; + int slices_; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h b/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h index 447602d..b7623d8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h @@ -38,8 +38,8 @@ namespace internal { template class SinkExecutor; -template -class SinkExecutor< Inputs > { +template +class SinkExecutor< Inputs > { public: typedef embb::base::Function FunctionType; @@ -47,7 +47,7 @@ class SinkExecutor< Inputs > { void Execute( int clock, - Inputs & inputs) { + Inputs & inputs) { function_( inputs.template Get<0>().GetValue(clock)); } @@ -56,8 +56,8 @@ class SinkExecutor< Inputs > { FunctionType function_; }; -template -class SinkExecutor< Inputs > { +template +class SinkExecutor< Inputs > { public: typedef embb::base::Function FunctionType; @@ -65,7 +65,7 @@ class SinkExecutor< Inputs > { void Execute( int clock, - Inputs & inputs) { + Inputs & inputs) { function_( inputs.template Get<0>().GetValue(clock), inputs.template Get<1>().GetValue(clock)); @@ -75,8 +75,8 @@ class SinkExecutor< Inputs > { FunctionType function_; }; -template -class SinkExecutor< Inputs > { +template +class SinkExecutor< Inputs > { public: typedef embb::base::Function FunctionType; @@ -85,7 +85,7 @@ class SinkExecutor< Inputs > { void Execute( int clock, - Inputs & inputs) { + Inputs & inputs) { function_( inputs.template Get<0>().GetValue(clock), inputs.template Get<1>().GetValue(clock), @@ -96,8 +96,8 @@ class SinkExecutor< Inputs > { FunctionType function_; }; -template -class SinkExecutor< Inputs > { +template +class SinkExecutor< Inputs > { public: typedef embb::base::Function FunctionType; @@ -106,7 +106,7 @@ class SinkExecutor< Inputs > { void Execute( int clock, - Inputs & inputs) { + Inputs & inputs) { function_( inputs.template Get<0>().GetValue(clock), inputs.template Get<1>().GetValue(clock), @@ -118,9 +118,9 @@ class SinkExecutor< Inputs > { FunctionType function_; }; -template -class SinkExecutor< Inputs > { +class SinkExecutor< Inputs > { public: typedef embb::base::Function FunctionType; @@ -129,7 +129,7 @@ class SinkExecutor< Inputs > { void Execute( int clock, - Inputs & inputs) { + Inputs & inputs) { function_( inputs.template Get<0>().GetValue(clock), inputs.template Get<1>().GetValue(clock), diff --git a/dataflow_cpp/include/embb/dataflow/internal/source.h b/dataflow_cpp/include/embb/dataflow/internal/source.h index 72f198b..3d7c0d4 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source.h @@ -35,15 +35,14 @@ namespace embb { namespace dataflow { namespace internal { -template class Source; +template class Source; template < - int Slices, typename O1, typename O2, typename O3, typename O4, typename O5> -class Source< Slices, Outputs > +class Source< Outputs > : public Node { public: - typedef Outputs OutputsType; + typedef Outputs OutputsType; typedef SourceExecutor< OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; diff --git a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h index 1461285..01cb471 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h @@ -41,8 +41,8 @@ class Scheduler; template class SourceExecutor; -template -class SourceExecutor< Outputs > { +template +class SourceExecutor< Outputs > { public: typedef embb::base::Function FunctionType; @@ -50,14 +50,14 @@ class SourceExecutor< Outputs > { bool Execute( int clock, - Outputs & outputs) { + Outputs & outputs) { O1 o1; bool result = function_(o1); outputs.template Get<0>().Send(Signal(clock, o1)); return result; } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); } @@ -65,8 +65,8 @@ class SourceExecutor< Outputs > { FunctionType function_; }; -template -class SourceExecutor< Outputs > { +template +class SourceExecutor< Outputs > { public: typedef embb::base::Function FunctionType; @@ -74,7 +74,7 @@ class SourceExecutor< Outputs > { bool Execute( int clock, - Outputs & outputs) { + Outputs & outputs) { O1 o1; O2 o2; bool result = function_(o1, o2); @@ -83,7 +83,7 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); } @@ -92,8 +92,8 @@ class SourceExecutor< Outputs > { FunctionType function_; }; -template -class SourceExecutor< Outputs > { +template +class SourceExecutor< Outputs > { public: typedef embb::base::Function FunctionType; @@ -101,7 +101,7 @@ class SourceExecutor< Outputs > { bool Execute( int clock, - Outputs & outputs) { + Outputs & outputs) { O1 o1; O2 o2; O3 o3; @@ -112,7 +112,7 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); @@ -122,8 +122,8 @@ class SourceExecutor< Outputs > { FunctionType function_; }; -template -class SourceExecutor< Outputs > { +template +class SourceExecutor< Outputs > { public: typedef embb::base::Function FunctionType; @@ -131,7 +131,7 @@ class SourceExecutor< Outputs > { bool Execute( int clock, - Outputs & outputs) { + Outputs & outputs) { O1 o1; O2 o2; O3 o3; @@ -144,7 +144,7 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { + void Init(InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); @@ -155,9 +155,9 @@ class SourceExecutor< Outputs > { FunctionType function_; }; -template -class SourceExecutor< Outputs > { +class SourceExecutor< Outputs > { public: typedef embb::base::Function FunctionType; @@ -165,7 +165,7 @@ class SourceExecutor< Outputs > { bool Execute( int clock, - Outputs & outputs) { + Outputs & outputs) { O1 o1; O2 o2; O3 o3; @@ -181,7 +181,7 @@ class SourceExecutor< Outputs > { } void Init( - InitData * init_data, Outputs & outputs) { + InitData * init_data, Outputs & outputs) { outputs.template Get<0>().SendInit(init_data); outputs.template Get<1>().SendInit(init_data); outputs.template Get<2>().SendInit(init_data); diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 3bf36ee..2ae3124 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -27,7 +27,6 @@ #ifndef EMBB_DATAFLOW_INTERNAL_SWITCH_H_ #define EMBB_DATAFLOW_INTERNAL_SWITCH_H_ -#include #include #include #include @@ -37,13 +36,13 @@ namespace embb { namespace dataflow { namespace internal { -template +template class Switch : public Node , public ClockListener { public: - typedef Inputs InputsType; - typedef Outputs OutputsType; + typedef Inputs InputsType; + typedef Outputs OutputsType; Switch() { inputs_.SetListener(this); @@ -79,6 +78,7 @@ class Switch } virtual void Init(InitData * init_data) { + //inputs_.SetSlices(init_data->slices); SetScheduler(init_data->sched); GetOutput<0>().SendInit(init_data); GetOutput<1>().SendInit(init_data); @@ -122,7 +122,6 @@ class Switch private: InputsType inputs_; OutputsType outputs_; - Action action_[Slices]; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 33dbaff..2a517db 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -669,7 +669,6 @@ class Network { #else -template class Network : public internal::ClockListener { public: Network() {} @@ -679,7 +678,7 @@ class Network : public internal::ClockListener { typename T4 = embb::base::internal::Nil, typename T5 = embb::base::internal::Nil> struct Inputs { - typedef internal::Inputs Type; + typedef internal::Inputs Type; }; template struct Outputs { - typedef internal::Outputs Type; + typedef internal::Outputs Type; }; template class SerialProcess; @@ -695,20 +694,20 @@ class Network : public internal::ClockListener { template < typename I1, typename I2, typename I3, typename I4, typename I5, typename O1, typename O2, typename O3, typename O4, typename O5> - class SerialProcess< internal::Inputs, - internal::Outputs > - : public internal::Process< Slices, true, - internal::Inputs, - internal::Outputs > { + class SerialProcess< internal::Inputs, + internal::Outputs > + : public internal::Process< true, + internal::Inputs, + internal::Outputs > { public: - typedef typename internal::Process< Slices, true, - internal::Inputs, - internal::Outputs >::FunctionType + typedef typename internal::Process< true, + internal::Inputs, + internal::Outputs >::FunctionType FunctionType; explicit SerialProcess(FunctionType function) - : internal::Process< Slices, true, - internal::Inputs, - internal::Outputs >(function) { + : internal::Process< true, + internal::Inputs, + internal::Outputs >(function) { //empty } }; @@ -718,31 +717,31 @@ class Network : public internal::ClockListener { template < typename I1, typename I2, typename I3, typename I4, typename I5, typename O1, typename O2, typename O3, typename O4, typename O5> - class ParallelProcess< internal::Inputs, - internal::Outputs > - : public internal::Process< Slices, false, - internal::Inputs, - internal::Outputs >{ + class ParallelProcess< internal::Inputs, + internal::Outputs > + : public internal::Process< false, + internal::Inputs, + internal::Outputs >{ public: - typedef typename internal::Process< Slices, false, - internal::Inputs, - internal::Outputs >::FunctionType + typedef typename internal::Process< false, + internal::Inputs, + internal::Outputs >::FunctionType FunctionType; explicit ParallelProcess(FunctionType function) - : internal::Process< Slices, false, - internal::Inputs, - internal::Outputs >(function) { + : internal::Process< false, + internal::Inputs, + internal::Outputs >(function) { //empty } }; template - class Switch : public internal::Switch { + class Switch : public internal::Switch { public: }; template - class Select : public internal::Select { + class Select : public internal::Select { public: }; @@ -750,15 +749,15 @@ class Network : public internal::ClockListener { typename I3 = embb::base::internal::Nil, typename I4 = embb::base::internal::Nil, typename I5 = embb::base::internal::Nil> - class Sink : public internal::Sink > { + class Sink : public internal::Sink< + internal::Inputs > { public: - typedef typename internal::Sink >::FunctionType FunctionType; + typedef typename internal::Sink< + internal::Inputs >::FunctionType FunctionType; explicit Sink(FunctionType function) - : internal::Sink >(function) { + : internal::Sink< + internal::Inputs >(function) { //empty } }; @@ -767,16 +766,16 @@ class Network : public internal::ClockListener { typename O3 = embb::base::internal::Nil, typename O4 = embb::base::internal::Nil, typename O5 = embb::base::internal::Nil> - class Source : public internal::Source > { + class Source : public internal::Source< + internal::Outputs > { public: - typedef typename internal::Source >::FunctionType + typedef typename internal::Source< + internal::Outputs >::FunctionType FunctionType; explicit Source(FunctionType function) - : internal::Source >(function) { + : internal::Source< + internal::Outputs >(function) { //empty } }; @@ -787,10 +786,10 @@ class Network : public internal::ClockListener { } template - class ConstantSource : public internal::ConstantSource { + class ConstantSource : public internal::ConstantSource { public: explicit ConstantSource(Type value) - : internal::ConstantSource(value) { + : internal::ConstantSource(value) { //empty } }; @@ -800,24 +799,36 @@ class Network : public internal::ClockListener { sources_.push_back(&source); } - void operator () () { + void operator () (int slices) { + slices_ = slices; + internal::SchedulerSequential sched_seq; - internal::SchedulerMTAPI sched_mtapi; + internal::SchedulerMTAPI sched_mtapi(slices_); internal::Scheduler * sched = &sched_mtapi; internal::InitData init_data; + init_data.slices = slices_; init_data.sched = sched; init_data.sink_listener = this; + sink_counter_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + sink_counter_[ii] = 0; + } + sink_count_ = 0; for (size_t it = 0; it < sources_.size(); it++) sources_[it]->Init(&init_data); - for (int ii = 0; ii < Slices; ii++) sink_counter_[ii] = 0; + for (int ii = 0; ii < slices_; ii++) { + sink_counter_[ii] = 0; + } int clock = 0; while (clock >= 0) { - const int idx = clock % Slices; + const int idx = clock % slices_; while (sink_counter_[idx] > 0) embb::base::Thread::CurrentYield(); sched->WaitForSlice(idx); if (!SpawnClock(clock)) @@ -825,10 +836,10 @@ class Network : public internal::ClockListener { clock++; } - int ii = clock - Slices + 1; + int ii = clock - slices_ + 1; if (ii < 0) ii = 0; for (; ii < clock; ii++) { - const int idx = ii % Slices; + const int idx = ii % slices_; while (sink_counter_[idx] > 0) embb::base::Thread::CurrentYield(); sched->WaitForSlice(idx); } @@ -841,7 +852,7 @@ class Network : public internal::ClockListener { * corresponding slot, thus allowing a new token to be emitted. */ virtual void OnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; const int cnt = --sink_counter_[idx]; if (cnt < 0) EMBB_THROW(embb::base::ErrorException, @@ -861,15 +872,16 @@ class Network : public internal::ClockListener { std::vector processes_; std::vector sources_; std::vector sinks_; - embb::base::Atomic sink_counter_[Slices]; + embb::base::Atomic * sink_counter_; int sink_count_; + int slices_; #if EMBB_DATAFLOW_TRACE_SIGNAL_HISTORY std::vector spawn_history_[Slices]; #endif bool SpawnClock(int clock) { - const int idx = clock % Slices; + const int idx = clock % slices_; bool result = true; #if EMBB_DATAFLOW_TRACE_SIGNAL_HISTORY spawn_history_[idx].push_back(clock); diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index b434625..810ad01 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -39,7 +39,7 @@ #define NUM_SLICES 8 #define TEST_COUNT 12 -typedef embb::dataflow::Network MyNetwork; +typedef embb::dataflow::Network MyNetwork; typedef MyNetwork::ConstantSource< int > MyConstantSource; typedef MyNetwork::Source< int > MySource; typedef MyNetwork::SerialProcess< MyNetwork::Inputs::Type, @@ -206,7 +206,7 @@ void SimpleTest::TestBasic() { network.AddSource(source); try { - network(); + network(NUM_SLICES); } catch (embb::base::ErrorException & e) { PT_ASSERT_MSG(false, e.What()); } From 8997116e1e458335e62fdb44465f7c80ed53aa50 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:05:40 +0100 Subject: [PATCH 11/79] base_c: fixed uninitialized variables in failure cases --- base_c/src/duration.c | 18 ++++++++++++++++++ base_c/src/thread.c | 5 ++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/base_c/src/duration.c b/base_c/src/duration.c index 8db8c7c..4f6c4e2 100644 --- a/base_c/src/duration.c +++ b/base_c/src/duration.c @@ -49,10 +49,14 @@ int embb_duration_set_nanoseconds(embb_duration_t* duration, assert(duration != NULL); if (nanoseconds > 0) { if (embb_duration_min()->nanoseconds > nanoseconds) { + duration->seconds = 0; + duration->nanoseconds = 0; return EMBB_UNDERFLOW; } const embb_duration_t* max = embb_duration_max(); if (max->seconds * 1000000000 + max->nanoseconds < nanoseconds) { + duration->seconds = max->seconds; + duration->nanoseconds = max->nanoseconds; return EMBB_OVERFLOW; } } @@ -66,10 +70,14 @@ int embb_duration_set_microseconds(embb_duration_t* duration, assert(duration != NULL); if (microseconds > 0) { if (embb_duration_min()->nanoseconds > microseconds*1000) { + duration->seconds = 0; + duration->nanoseconds = 0; return EMBB_UNDERFLOW; } const embb_duration_t* max = embb_duration_max(); if (max->seconds * 1000000 + max->nanoseconds / 1000 < microseconds) { + duration->seconds = max->seconds; + duration->nanoseconds = max->nanoseconds; return EMBB_OVERFLOW; } } @@ -83,10 +91,14 @@ int embb_duration_set_milliseconds(embb_duration_t* duration, assert(duration != NULL); if (milliseconds > 0) { if (embb_duration_min()->nanoseconds > milliseconds*1000000) { + duration->seconds = 0; + duration->nanoseconds = 0; return EMBB_UNDERFLOW; } const embb_duration_t* max = embb_duration_max(); if (max->seconds * 1000 + max->nanoseconds / 1000000 < milliseconds) { + duration->seconds = max->seconds; + duration->nanoseconds = max->nanoseconds; return EMBB_OVERFLOW; } } @@ -100,10 +112,14 @@ int embb_duration_set_seconds(embb_duration_t* duration, assert(duration != NULL); if (seconds > 0) { if (embb_duration_min()->nanoseconds > seconds*1000000000) { + duration->seconds = 0; + duration->nanoseconds = 0; return EMBB_UNDERFLOW; } const embb_duration_t* max = embb_duration_max(); if (max->seconds + max->nanoseconds / 1000000000 < seconds) { + duration->seconds = max->seconds; + duration->nanoseconds = max->nanoseconds; return EMBB_OVERFLOW; } } @@ -117,6 +133,8 @@ int embb_duration_add(embb_duration_t* lhs, const embb_duration_t* rhs) { assert(rhs != NULL); int carry = (int)((lhs->nanoseconds + rhs->nanoseconds) / 1000000000); if (lhs->seconds + rhs->seconds + carry > EMBB_DURATION_MAX_SECONDS) { + lhs->seconds = 0; + lhs->nanoseconds = 0; return EMBB_OVERFLOW; } lhs->nanoseconds = (lhs->nanoseconds + rhs->nanoseconds) % 1000000000; diff --git a/base_c/src/thread.c b/base_c/src/thread.c index e7abb40..a3963aa 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -83,7 +83,10 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, assert(thread != NULL); thread->embb_internal_arg = (embb_internal_thread_arg_t*) embb_alloc(sizeof(embb_internal_thread_arg_t)); - if (thread->embb_internal_arg == NULL) return EMBB_NOMEM; + if (thread->embb_internal_arg == NULL) { + thread->embb_internal_handle = NULL; + return EMBB_NOMEM; + } thread->embb_internal_arg->func = func; thread->embb_internal_arg->arg = arg; From 92c3859b879401dad8c18a08d0bfec1d18e31a1f Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:06:06 +0100 Subject: [PATCH 12/79] containers_cpp: fixed uninitialized variables in test --- containers_cpp/test/hazard_pointer_test.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers_cpp/test/hazard_pointer_test.cc b/containers_cpp/test/hazard_pointer_test.cc index 9047348..c005149 100644 --- a/containers_cpp/test/hazard_pointer_test.cc +++ b/containers_cpp/test/hazard_pointer_test.cc @@ -210,7 +210,7 @@ void HazardPointerTest2::DeletePointerCallback(int* to_delete) { } bool HazardPointerTest2::SetRelativeGuards() { - unsigned int thread_index; + unsigned int thread_index = 0; int result = embb_internal_thread_index(&thread_index); PT_ASSERT(EMBB_SUCCESS == result); @@ -451,7 +451,7 @@ void HazardPointerTest2::HazardPointerTest2Post() { void HazardPointerTest2::HazardPointerTest2ThreadMethod() { for (;;) { - unsigned int thread_index; + unsigned int thread_index = 0; int result = embb_internal_thread_index(&thread_index); PT_ASSERT(EMBB_SUCCESS == result); From e7734ca3ecfac211f5d73699dd79e668d836303a Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:06:33 +0100 Subject: [PATCH 13/79] matpi_network_c: disabled adress reuse for listening socket --- .../mtapi_network_c/src/embb_mtapi_network_socket.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c index bd9960c..82b4cbf 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c @@ -73,8 +73,7 @@ int embb_mtapi_network_socket_bind_and_listen( struct sockaddr_in in_addr; int reuseaddr_on = 1; - // addr reuse - if (SOCKET_ERROR == setsockopt(that->handle, SOL_SOCKET, SO_REUSEADDR, + if (SOCKET_ERROR == setsockopt(that->handle, SOL_SOCKET, 0, (const char *)&reuseaddr_on, sizeof(reuseaddr_on))) { return 0; } From dfd73be6143188d4eb28c3dbcfb1d944c44d71f8 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:37:09 +0100 Subject: [PATCH 14/79] mtapi_c: fixed codesonar warnings --- mtapi_c/src/embb_mtapi_job_t.c | 2 +- mtapi_c/src/embb_mtapi_queue_t.c | 2 +- mtapi_c/src/embb_mtapi_scheduler_t.c | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_job_t.c b/mtapi_c/src/embb_mtapi_job_t.c index 1a399c2..ddc14c8 100644 --- a/mtapi_c/src/embb_mtapi_job_t.c +++ b/mtapi_c/src/embb_mtapi_job_t.c @@ -166,7 +166,7 @@ void embb_mtapi_job_remove_action( embb_mtapi_action_t * action) { assert(MTAPI_NULL != that); assert(MTAPI_NULL != action); - mtapi_uint_t ii = 0; + mtapi_uint_t ii; for (ii = 0; ii + 1 < that->num_actions; ii++) { if (that->actions[ii].id == action->handle.id && diff --git a/mtapi_c/src/embb_mtapi_queue_t.c b/mtapi_c/src/embb_mtapi_queue_t.c index 8288dab..67a81f4 100644 --- a/mtapi_c/src/embb_mtapi_queue_t.c +++ b/mtapi_c/src/embb_mtapi_queue_t.c @@ -325,7 +325,7 @@ mtapi_queue_hndl_t mtapi_queue_get( if (embb_mtapi_node_is_initialized()) { embb_mtapi_node_t* node = embb_mtapi_node_get_instance(); - mtapi_uint_t ii = 0; + mtapi_uint_t ii; local_status = MTAPI_ERR_QUEUE_INVALID; for (ii = 0; ii < node->attributes.max_queues; ii++) { diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.c b/mtapi_c/src/embb_mtapi_scheduler_t.c index 2cdef50..a232748 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.c +++ b/mtapi_c/src/embb_mtapi_scheduler_t.c @@ -78,8 +78,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_vhpf( embb_mtapi_node_t * node, embb_mtapi_thread_context_t * thread_context) { embb_mtapi_task_t * task = MTAPI_NULL; - mtapi_uint_t ii = 0; - mtapi_uint_t kk = 0; + mtapi_uint_t ii; assert(MTAPI_NULL != that); assert(MTAPI_NULL != node); @@ -102,6 +101,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_vhpf( */ mtapi_uint_t context_index = (thread_context->worker_index + 1) % that->worker_count; + mtapi_uint_t kk; for (kk = 0; kk < that->worker_count - 1 && MTAPI_NULL == task; kk++) { @@ -121,8 +121,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_lf( embb_mtapi_node_t * node, embb_mtapi_thread_context_t * thread_context) { embb_mtapi_task_t * task = MTAPI_NULL; - mtapi_uint_t prio = 0; - mtapi_uint_t kk = 0; + mtapi_uint_t prio; assert(MTAPI_NULL != that); assert(MTAPI_NULL != node); @@ -153,6 +152,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task_lf( prio++) { mtapi_uint_t context_index = (thread_context->worker_index + 1) % that->worker_count; + mtapi_uint_t kk; for (kk = 0; kk < that->worker_count - 1 && MTAPI_NULL == task; kk++) { @@ -195,7 +195,7 @@ embb_mtapi_task_t * embb_mtapi_scheduler_get_next_task( embb_mtapi_thread_context_t * embb_mtapi_scheduler_get_current_thread_context( embb_mtapi_scheduler_t * that) { - mtapi_uint_t ii = 0; + mtapi_uint_t ii; embb_mtapi_thread_context_t * context = NULL; assert(MTAPI_NULL != that); @@ -433,7 +433,7 @@ mtapi_boolean_t embb_mtapi_scheduler_initialize_with_mode( embb_mtapi_scheduler_t * that, embb_mtapi_scheduler_mode_t mode) { embb_mtapi_node_t* node = embb_mtapi_node_get_instance(); - mtapi_uint_t ii = 0; + mtapi_uint_t ii; embb_mtapi_log_trace("embb_mtapi_scheduler_initialize() called\n"); @@ -480,7 +480,7 @@ mtapi_boolean_t embb_mtapi_scheduler_initialize_with_mode( } void embb_mtapi_scheduler_finalize(embb_mtapi_scheduler_t * that) { - mtapi_uint_t ii = 0; + mtapi_uint_t ii; embb_mtapi_log_trace("embb_mtapi_scheduler_finalize() called\n"); assert(MTAPI_NULL != that); From 9e87c4ae5776c0a68695071920da91ba66cc4eac Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:37:27 +0100 Subject: [PATCH 15/79] base_c: removed redundant assignments --- base_c/src/log.c | 1 - 1 file changed, 1 deletion(-) diff --git a/base_c/src/log.c b/base_c/src/log.c index b5b1696..bb7889f 100644 --- a/base_c/src/log.c +++ b/base_c/src/log.c @@ -90,7 +90,6 @@ void embb_log_write_internal( case EMBB_LOG_LEVEL_NONE: default: - log_level_str = " "; break; } #if defined(EMBB_PLATFORM_COMPILER_MSVC) From 9f9e4d68fe6659241cba595c0a4093b033bcca7d Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 18 Feb 2016 10:37:40 +0100 Subject: [PATCH 16/79] tasks_cpp: removed redundant assignment --- tasks_cpp/src/node.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index 379b759..9faaabe 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -125,7 +125,7 @@ void Node::Initialize( mtapi_nodeattr_set(&attr, MTAPI_NODE_MAX_ACTIONS, &tmp, sizeof(tmp), &status); assert(MTAPI_SUCCESS == status); - tmp = 4; + // tmp = 4; mtapi_nodeattr_set(&attr, MTAPI_NODE_MAX_JOBS, &tmp, sizeof(tmp), &status); assert(MTAPI_SUCCESS == status); From 0e87c03452e370e7caa138bca6d59fd364aa05cb Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 22 Feb 2016 16:03:08 +0100 Subject: [PATCH 17/79] dataflow_cpp: fixed memory leaks --- .../include/embb/dataflow/internal/in.h | 6 +++ .../include/embb/dataflow/internal/inputs.h | 35 +++++++++++++--- .../include/embb/dataflow/internal/process.h | 7 ++++ .../include/embb/dataflow/internal/sink.h | 9 +++- dataflow_cpp/include/embb/dataflow/network.h | 41 +++++++++++++------ dataflow_cpp/test/dataflow_cpp_test_simple.cc | 4 +- 6 files changed, 83 insertions(+), 19 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index 8324026..da1cada 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -51,6 +51,12 @@ class In { In() : values_(NULL), connected_(false), slices_(0) {} + ~In() { + if (NULL != values_) { + embb::base::Allocation::Free(values_); + } + } + SignalType const & GetSignal(int clock) const { return values_[clock % slices_]; } diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 00c3190..12ec06d 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -67,9 +67,14 @@ class Inputs , public ClockListener { public: - Inputs() { + Inputs() : count_(NULL) { test_count_ = 1; } + ~Inputs() { + if (NULL != count_) { + embb::base::Allocation::Free(count_); + } + } void SetListener(ClockListener * listener) { listener_ = listener; this->template Get<0>().SetListener(this); @@ -122,9 +127,14 @@ class Inputs , public ClockListener { public: - Inputs() { + Inputs() : count_(NULL) { test_count_ = 2; } + ~Inputs() { + if (NULL != count_) { + embb::base::Allocation::Free(count_); + } + } void SetListener(ClockListener * listener) { listener_ = listener; this->template Get<0>().SetListener(this); @@ -181,9 +191,14 @@ class Inputs , public ClockListener { public: - Inputs() { + Inputs() : count_(NULL) { test_count_ = 3; } + ~Inputs() { + if (NULL != count_) { + embb::base::Allocation::Free(count_); + } + } void SetListener(ClockListener * listener) { listener_ = listener; this->template Get<0>().SetListener(this); @@ -243,9 +258,14 @@ class Inputs In, embb::base::internal::Nil> , public ClockListener { public: - Inputs() { + Inputs() : count_(NULL) { test_count_ = 4; } + ~Inputs() { + if (NULL != count_) { + embb::base::Allocation::Free(count_); + } + } void SetListener(ClockListener * listener) { listener_ = listener; this->template Get<0>().SetListener(this); @@ -310,9 +330,14 @@ class Inputs In, In > , public ClockListener { public: - Inputs() { + Inputs() : count_(NULL) { test_count_ = 5; } + ~Inputs() { + if (NULL != count_) { + embb::base::Allocation::Free(count_); + } + } void SetListener(ClockListener * listener) { listener_ = listener; this->template Get<0>().SetListener(this); diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 372d36d..fda3971 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -55,6 +55,7 @@ class Process< Serial, Inputs, explicit Process(FunctionType function) : executor_(function) + , action_(NULL) , slices_(0) { next_clock_ = 0; queued_clock_ = 0; @@ -67,6 +68,12 @@ class Process< Serial, Inputs, inputs_.SetListener(this); } + ~Process() { + if (NULL != action_) { + embb::base::Allocation::Free(action_); + } + } + virtual bool HasInputs() const { return inputs_.Size() > 0; } diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index e23544c..152c602 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -49,13 +49,20 @@ class Sink< Inputs > typedef typename ExecutorType::FunctionType FunctionType; explicit Sink(FunctionType function) - : executor_(function) { + : executor_(function) + , action_(NULL) { next_clock_ = 0; queued_clock_ = 0; queue_id_ = GetNextProcessID(); inputs_.SetListener(this); } + ~Sink() { + if (NULL != action_) { + embb::base::Allocation::Free(action_); + } + } + void SetListener(ClockListener * listener) { listener_ = listener; } diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 2a517db..8f6405a 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -52,10 +52,8 @@ namespace dataflow { /** * Represents a set of processes, that are connected by communication channels. * - * \tparam Slices Number of concurrently processed tokens. * \ingroup CPP_DATAFLOW */ -template class Network { public: /** @@ -661,6 +659,14 @@ class Network { template void AddSource(ConstantSource & source); + /** + * Builds the network for usage with \c slices concurrent tokens. This + * function needs to be called after adding all sources and before + * executing the network. + * \param slices Number of concurrent tokens allowed in the network. + */ + void Make(int slices); + /** * Executes the network until one of the the sources returns \c false. */ @@ -671,7 +677,14 @@ class Network { class Network : public internal::ClockListener { public: - Network() {} + Network() : sched_(NULL) {} + + ~Network() { + if (NULL != sched_) { + embb::base::Allocation::Delete(sched_); + embb::base::Allocation::Free(sink_counter_); + } + } template (slices_); internal::InitData init_data; init_data.slices = slices_; - init_data.sched = sched; + init_data.sched = sched_; init_data.sink_listener = this; sink_counter_ = reinterpret_cast*>( embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); + sizeof(embb::base::Atomic)*slices_)); for (int ii = 0; ii < slices_; ii++) { sink_counter_[ii] = 0; } @@ -825,12 +835,18 @@ class Network : public internal::ClockListener { for (int ii = 0; ii < slices_; ii++) { sink_counter_[ii] = 0; } + } + + void operator () () { + if (NULL == sched_) { + throw embb::base::ErrorException("Network was not properly prepared"); + } int clock = 0; while (clock >= 0) { const int idx = clock % slices_; while (sink_counter_[idx] > 0) embb::base::Thread::CurrentYield(); - sched->WaitForSlice(idx); + sched_->WaitForSlice(idx); if (!SpawnClock(clock)) break; clock++; @@ -841,7 +857,7 @@ class Network : public internal::ClockListener { for (; ii < clock; ii++) { const int idx = ii % slices_; while (sink_counter_[idx] > 0) embb::base::Thread::CurrentYield(); - sched->WaitForSlice(idx); + sched_->WaitForSlice(idx); } } @@ -875,6 +891,7 @@ class Network : public internal::ClockListener { embb::base::Atomic * sink_counter_; int sink_count_; int slices_; + internal::Scheduler * sched_; #if EMBB_DATAFLOW_TRACE_SIGNAL_HISTORY std::vector spawn_history_[Slices]; diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index 01a364e..ec54562 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -211,8 +211,10 @@ void SimpleTest::TestBasic() { network.AddSource(constant); network.AddSource(source); + network.Make(NUM_SLICES); + try { - network(NUM_SLICES); + network(); } catch (embb::base::ErrorException & e) { PT_ASSERT_MSG(false, e.What()); } From e471ca130991ae85b83d68d042f12ef0b525760f Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 22 Feb 2016 16:03:46 +0100 Subject: [PATCH 18/79] examples: changed dataflow example to show usage of Network::Make --- doc/examples/dataflow/dataflow_linear-fragmented.cc | 1 + doc/examples/dataflow/dataflow_make-snippet.h | 1 + doc/examples/dataflow/dataflow_network-snippet.h | 2 +- doc/examples/dataflow/dataflow_nonlinear-fragmented.cc | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 doc/examples/dataflow/dataflow_make-snippet.h diff --git a/doc/examples/dataflow/dataflow_linear-fragmented.cc b/doc/examples/dataflow/dataflow_linear-fragmented.cc index 25bdacd..2ce8b93 100644 --- a/doc/examples/dataflow/dataflow_linear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_linear-fragmented.cc @@ -57,5 +57,6 @@ void RunDataflowLinear() { #include "dataflow/dataflow_declare_sink-snippet.h" #include "dataflow/dataflow_connect-snippet.h" #include "dataflow/dataflow_add-snippet.h" +#include "dataflow/dataflow_make-snippet.h" #include "dataflow/dataflow_run-snippet.h" } diff --git a/doc/examples/dataflow/dataflow_make-snippet.h b/doc/examples/dataflow/dataflow_make-snippet.h new file mode 100644 index 0000000..c132ce0 --- /dev/null +++ b/doc/examples/dataflow/dataflow_make-snippet.h @@ -0,0 +1 @@ + nw.Make(2); diff --git a/doc/examples/dataflow/dataflow_network-snippet.h b/doc/examples/dataflow/dataflow_network-snippet.h index c13ebeb..3e36693 100644 --- a/doc/examples/dataflow/dataflow_network-snippet.h +++ b/doc/examples/dataflow/dataflow_network-snippet.h @@ -1,2 +1,2 @@ -typedef embb::dataflow::Network<2> Network; +typedef embb::dataflow::Network Network; static Network nw; diff --git a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc index e7f419d..206c54e 100644 --- a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc @@ -83,5 +83,6 @@ void RunDataflowNonLinear() { process5.GetOutput<1>() >> sink1.GetInput<2>(); process4.GetOutput<1>() >> sink1.GetInput<3>(); + nw.Make(2); nw(); } From 398b9b5971354b801011bc55a778ff05bffb641e Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 22 Feb 2016 16:32:15 +0100 Subject: [PATCH 19/79] dataflow_cpp: fixed initalization of input --- dataflow_cpp/include/embb/dataflow/internal/in.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index da1cada..c9a0910 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -53,6 +53,9 @@ class In { ~In() { if (NULL != values_) { + for (int ii = 0; ii < slices_; ii++) { + values_[ii].~SignalType(); + } embb::base::Allocation::Free(values_); } } @@ -78,7 +81,7 @@ class In { embb::base::Allocation::Allocate( sizeof(SignalType)*slices_)); for (int ii = 0; ii < slices_; ii++) { - values_[ii] = SignalType(); + new (&values_[ii]) SignalType(); } } From 84b41395a853d43427494bd4d646690a7f5bdc17 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 22 Feb 2016 16:32:52 +0100 Subject: [PATCH 20/79] examples, tutorial: adapted for new behavior of dataflow --- doc/examples/dataflow/dataflow_make-snippet.h | 2 +- doc/examples/dataflow/dataflow_nonlinear-fragmented.cc | 2 +- doc/tutorial/content/dataflow.tex | 9 ++++++--- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/examples/dataflow/dataflow_make-snippet.h b/doc/examples/dataflow/dataflow_make-snippet.h index c132ce0..19f9aab 100644 --- a/doc/examples/dataflow/dataflow_make-snippet.h +++ b/doc/examples/dataflow/dataflow_make-snippet.h @@ -1 +1 @@ - nw.Make(2); + nw.Make(4); diff --git a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc index 206c54e..4b67009 100644 --- a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc @@ -83,6 +83,6 @@ void RunDataflowNonLinear() { process5.GetOutput<1>() >> sink1.GetInput<2>(); process4.GetOutput<1>() >> sink1.GetInput<3>(); - nw.Make(2); + nw.Make(4); nw(); } diff --git a/doc/tutorial/content/dataflow.tex b/doc/tutorial/content/dataflow.tex index e7a07a1..6aba46d 100644 --- a/doc/tutorial/content/dataflow.tex +++ b/doc/tutorial/content/dataflow.tex @@ -104,7 +104,7 @@ \section{Linear Pipelines} % Then, we have to construct a \emph{network}. A network consists of a set of processes that are connected by communication channels. %\footnote{Pipelines belong to the most simple networks, where the processes are connected in string-like (linear) fashion.} -\embb provides a class template \lstinline|Network| that can be customized to your needs. For the moment, we are using 2 as a template argument: +\embb provides a class \lstinline|Network| that handles data routing and scheduling of your processes: % \\\inputlisting{../examples/dataflow/dataflow_network-snippet.h} % @@ -151,11 +151,14 @@ \section{Linear Pipelines} % \\\inputlisting{../examples/dataflow/dataflow_connect-snippet.h} % -Once all connections have been established, we can start the network: +Once all connections have been established, we need to prepare the network for the desired maximum number of elements that can be in the network at a time. The number of elements is limited to avoid that the network is flooded with new elements before the previous elements have been processed. In a linear pipeline, for example, this may happen if the source is faster than the sink. In our example, at most four elements may be processed simultaneously: one in the source, one in the sink, and two in the middle stage (see above). Finding an optimal value depends on the application and usually requires some experimentation. In general, large values boost the throughput but also increase the latency. Conversely, small values reduce the latency but may lead to a drop of performance in terms of throughput: +% +\\\inputlisting{../examples/dataflow/dataflow_make-snippet.h} +% +Then we can start the network: % \\\inputlisting{../examples/dataflow/dataflow_run-snippet.h} % -The integer given as a template parameter to the network specifies the maximum number of elements that can be in the network at a time. The number of elements is limited to avoid that the network is flooded with new elements before the previous elements have been processed. In a linear pipeline, for example, this may happen if the source is faster than the sink. In our example, at most four elements may be processed simultaneously: one in the source, one in the sink, and two in the middle stage (see above). Finding an optimal value depends on the application and usually requires some experimentation. In general, large values boost the throughput but also increase the latency. Conversely, small values reduce the latency but may lead to a drop of performance in terms of throughput. Note that you will probably not observe a speedup when you run this program on a multicore processor. One reason for this is that input$/$output operations like reading a file from the hard disk and writing the output to the screen are typically a bottleneck. Moreover, the amount of work done in the middle stage of the pipeline (\textbf{replace}) is rather low. To outweigh the overhead for parallel execution, the amount of work must be much higher. In image processing, for example, a single pipeline stage may process a complete image. To sum up, we haven chosen this example for its simplicity, not for its efficiency. From 1e2d0138a9a1e6357bc527196aea5e2406ddad38 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 10:20:07 +0100 Subject: [PATCH 21/79] dataflow_cpp: fixed bug with global network instances in mtapi scheduler --- .../embb/dataflow/internal/scheduler_mtapi.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 8f4e0d8..7823abd 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -66,15 +66,18 @@ class SchedulerMTAPI : public Scheduler { } } virtual ~SchedulerMTAPI() { - embb::tasks::Node & node = embb::tasks::Node::GetInstance(); - for (int ii = 0; ii < slices_; ii++) { - group_[ii]->WaitAll(MTAPI_INFINITE); - node.DestroyGroup(*group_[ii]); + if (embb::tasks::Node::IsInitialized()) { + // only destroy groups and queues if there still is an instance + embb::tasks::Node & node = embb::tasks::Node::GetInstance(); + for (int ii = 0; ii < slices_; ii++) { + group_[ii]->WaitAll(MTAPI_INFINITE); + node.DestroyGroup(*group_[ii]); + } + for (int ii = 0; ii < queue_count_; ii++) { + node.DestroyQueue(*queue_[ii]); + } } embb::base::Allocation::Free(group_); - for (int ii = 0; ii < queue_count_; ii++) { - node.DestroyQueue(*queue_[ii]); - } embb::base::Allocation::Free(queue_); } virtual void Spawn(Action & action) { From b802d8879494c4e9514dce0814423e9c3b6cf58f Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 10:52:31 +0100 Subject: [PATCH 22/79] updated license headers --- .../include/embb/algorithms/algorithms.h | 2 +- .../include/embb/algorithms/count.h | 2 +- .../include/embb/algorithms/for_each.h | 2 +- .../include/embb/algorithms/identity.h | 2 +- .../embb/algorithms/internal/count-inl.h | 2 +- .../embb/algorithms/internal/for_each-inl.h | 2 +- .../embb/algorithms/internal/merge_sort-inl.h | 2 +- .../embb/algorithms/internal/partition-inl.h | 2 +- .../embb/algorithms/internal/partition.h | 2 +- .../embb/algorithms/internal/quick_sort-inl.h | 2 +- .../embb/algorithms/internal/reduce-inl.h | 2 +- .../embb/algorithms/internal/scan-inl.h | 2 +- .../include/embb/algorithms/invoke.h | 2 +- .../include/embb/algorithms/merge_sort.h | 2 +- .../include/embb/algorithms/quick_sort.h | 2 +- .../include/embb/algorithms/reduce.h | 2 +- algorithms_cpp/include/embb/algorithms/scan.h | 2 +- .../include/embb/algorithms/zip_iterator.h | 2 +- algorithms_cpp/src/dummy.cc | 2 +- algorithms_cpp/test/count_test.cc | 2 +- algorithms_cpp/test/count_test.h | 2 +- algorithms_cpp/test/for_each_test.cc | 2 +- algorithms_cpp/test/for_each_test.h | 2 +- algorithms_cpp/test/invoke_test.cc | 2 +- algorithms_cpp/test/invoke_test.h | 2 +- algorithms_cpp/test/main.cc | 2 +- algorithms_cpp/test/merge_sort_test.cc | 2 +- algorithms_cpp/test/merge_sort_test.h | 2 +- algorithms_cpp/test/partitioner_test.cc | 2 +- algorithms_cpp/test/partitioner_test.h | 2 +- algorithms_cpp/test/quick_sort_test.cc | 2 +- algorithms_cpp/test/quick_sort_test.h | 2 +- algorithms_cpp/test/reduce_test.cc | 2 +- algorithms_cpp/test/reduce_test.h | 2 +- algorithms_cpp/test/scan_test.cc | 2 +- algorithms_cpp/test/scan_test.h | 2 +- algorithms_cpp/test/zip_iterator_test.cc | 2 +- algorithms_cpp/test/zip_iterator_test.h | 2 +- base_c/include/embb/base/c/atomic.h | 2 +- base_c/include/embb/base/c/base.h | 2 +- .../include/embb/base/c/condition_variable.h | 2 +- base_c/include/embb/base/c/core_set.h | 2 +- base_c/include/embb/base/c/counter.h | 2 +- base_c/include/embb/base/c/duration.h | 2 +- base_c/include/embb/base/c/errors.h | 2 +- .../embb/base/c/internal/atomic/and_assign.h | 2 +- .../base/c/internal/atomic/atomic_sizes.h.in | 2 +- .../base/c/internal/atomic/atomic_variables.h | 2 +- .../base/c/internal/atomic/compare_and_swap.h | 2 +- .../base/c/internal/atomic/fetch_and_add.h | 2 +- .../generate_atomic_implementation_template.h | 2 +- .../embb/base/c/internal/atomic/load.h | 2 +- .../base/c/internal/atomic/memory_barrier.h | 2 +- .../embb/base/c/internal/atomic/or_assign.h | 2 +- .../embb/base/c/internal/atomic/store.h | 2 +- .../embb/base/c/internal/atomic/swap.h | 2 +- .../embb/base/c/internal/atomic/xor_assign.h | 2 +- base_c/include/embb/base/c/internal/bitset.h | 2 +- .../embb/base/c/internal/cmake_config.h.in | 2 +- base_c/include/embb/base/c/internal/config.h | 2 +- .../embb/base/c/internal/macro_helper.h | 2 +- .../include/embb/base/c/internal/platform.h | 2 +- .../embb/base/c/internal/thread_index.h | 2 +- base_c/include/embb/base/c/internal/unused.h | 2 +- base_c/include/embb/base/c/log.h | 2 +- .../include/embb/base/c/memory_allocation.h | 2 +- base_c/include/embb/base/c/mutex.h | 2 +- base_c/include/embb/base/c/thread.h | 2 +- .../embb/base/c/thread_specific_storage.h | 2 +- base_c/include/embb/base/c/time.h | 2 +- base_c/src/atomic.c | 2 +- base_c/src/condition_variable.c | 2 +- base_c/src/core_set.c | 2 +- base_c/src/counter.c | 2 +- base_c/src/duration.c | 2 +- base_c/src/internal/thread_index.c | 2 +- base_c/src/log.c | 2 +- base_c/src/memory_allocation.c | 2 +- base_c/src/mutex.c | 2 +- base_c/src/thread.c | 2 +- base_c/src/thread_specific_storage.c | 2 +- base_c/src/time.c | 2 +- base_c/test/alloc_test.cc | 2 +- base_c/test/alloc_test.h | 2 +- base_c/test/condition_var_test.cc | 2 +- base_c/test/condition_var_test.h | 2 +- base_c/test/core_set_test.cc | 2 +- base_c/test/core_set_test.h | 2 +- base_c/test/counter_test.cc | 2 +- base_c/test/counter_test.h | 2 +- base_c/test/duration_test.cc | 2 +- base_c/test/duration_test.h | 2 +- base_c/test/main.cc | 2 +- base_c/test/mutex_test.cc | 2 +- base_c/test/mutex_test.h | 2 +- base_c/test/thread_index_test.cc | 2 +- base_c/test/thread_index_test.h | 2 +- base_c/test/thread_specific_storage_test.cc | 2 +- base_c/test/thread_specific_storage_test.h | 2 +- base_c/test/thread_test.cc | 2 +- base_c/test/thread_test.h | 2 +- base_c/test/time_test.cc | 2 +- base_c/test/time_test.h | 2 +- base_cpp/include/embb/base/atomic.h | 2 +- base_cpp/include/embb/base/base.h | 2 +- .../include/embb/base/condition_variable.h | 2 +- base_cpp/include/embb/base/core_set.h | 2 +- base_cpp/include/embb/base/duration.h | 2 +- base_cpp/include/embb/base/exceptions.h | 2 +- base_cpp/include/embb/base/function.h | 2 +- .../base/internal/atomic/atomic_arithmetic.h | 2 +- .../embb/base/internal/atomic/atomic_base.h | 2 +- .../internal/atomic/atomic_implementation.h | 2 +- .../base/internal/atomic/atomic_integer.h | 2 +- .../base/internal/atomic/atomic_pointer.h | 2 +- .../base/internal/atomic/atomic_utility.h | 2 +- .../embb/base/internal/cmake_config.h.in | 2 +- .../base/internal/condition_variable-inl.h | 2 +- base_cpp/include/embb/base/internal/config.h | 2 +- .../include/embb/base/internal/duration-inl.h | 2 +- .../include/embb/base/internal/function0.h | 2 +- .../include/embb/base/internal/function1.h | 2 +- .../include/embb/base/internal/function2.h | 2 +- .../include/embb/base/internal/function3.h | 2 +- .../include/embb/base/internal/function4.h | 2 +- .../include/embb/base/internal/function5.h | 2 +- .../include/embb/base/internal/functionT.h | 2 +- .../base/internal/memory_allocation-inl.h | 2 +- .../include/embb/base/internal/mutex-inl.h | 2 +- base_cpp/include/embb/base/internal/nil.h | 2 +- .../include/embb/base/internal/platform.h | 2 +- .../include/embb/base/internal/thread-inl.h | 2 +- .../embb/base/internal/thread_closures.h | 2 +- .../internal/thread_specific_storage-inl.h | 2 +- base_cpp/include/embb/base/log.h | 2 +- .../include/embb/base/memory_allocation.h | 2 +- base_cpp/include/embb/base/mutex.h | 2 +- base_cpp/include/embb/base/thread.h | 2 +- .../embb/base/thread_specific_storage.h | 2 +- base_cpp/include/embb/base/time.h | 2 +- base_cpp/src/condition_variable.cc | 2 +- base_cpp/src/core_set.cc | 2 +- base_cpp/src/duration.cc | 2 +- base_cpp/src/function.cc | 2 +- base_cpp/src/log.cc | 2 +- base_cpp/src/memory_allocation.cc | 2 +- base_cpp/src/mutex.cc | 2 +- base_cpp/src/thread.cc | 2 +- base_cpp/src/time.cc | 2 +- base_cpp/test/atomic_test.cc | 2 +- base_cpp/test/atomic_test.h | 2 +- base_cpp/test/condition_var_test.cc | 2 +- base_cpp/test/condition_var_test.h | 2 +- base_cpp/test/core_set_test.cc | 2 +- base_cpp/test/core_set_test.h | 2 +- base_cpp/test/duration_test.cc | 2 +- base_cpp/test/duration_test.h | 2 +- base_cpp/test/log_test.cc | 2 +- base_cpp/test/log_test.h | 2 +- base_cpp/test/main.cc | 2 +- base_cpp/test/memory_allocation_test.cc | 2 +- base_cpp/test/memory_allocation_test.h | 2 +- base_cpp/test/mutex_test.cc | 2 +- base_cpp/test/mutex_test.h | 2 +- base_cpp/test/thread_specific_storage_test.cc | 2 +- base_cpp/test/thread_specific_storage_test.h | 2 +- base_cpp/test/thread_test.cc | 2 +- base_cpp/test/thread_test.h | 2 +- base_cpp/test/time_test.h | 2 +- .../include/embb/containers/containers.h | 2 +- .../containers/internal/hazard_pointer-inl.h | 2 +- .../embb/containers/internal/hazard_pointer.h | 2 +- .../internal/lock_free_mpmc_queue-inl.h | 2 +- .../containers/internal/lock_free_stack-inl.h | 2 +- .../internal/lock_free_tree_value_pool-inl.h | 2 +- .../containers/internal/object_pool-inl.h | 2 +- .../internal/wait_free_array_value_pool-inl.h | 2 +- .../internal/wait_free_spsc_queue-inl.h | 2 +- .../embb/containers/lock_free_mpmc_queue.h | 2 +- .../include/embb/containers/lock_free_stack.h | 2 +- .../containers/lock_free_tree_value_pool.h | 2 +- .../include/embb/containers/object_pool.h | 2 +- .../containers/wait_free_array_value_pool.h | 2 +- .../embb/containers/wait_free_spsc_queue.h | 2 +- containers_cpp/src/dummy.cc | 2 +- containers_cpp/test/hazard_pointer_test.cc | 2 +- containers_cpp/test/hazard_pointer_test.h | 2 +- containers_cpp/test/main.cc | 2 +- containers_cpp/test/object_pool_test-inl.h | 2 +- containers_cpp/test/object_pool_test.cc | 2 +- containers_cpp/test/object_pool_test.h | 2 +- containers_cpp/test/pool_test-inl.h | 2 +- containers_cpp/test/pool_test.h | 2 +- containers_cpp/test/queue_test-inl.h | 2 +- containers_cpp/test/queue_test.h | 2 +- containers_cpp/test/stack_test-inl.h | 2 +- dataflow_cpp/include/embb/dataflow/dataflow.h | 2 +- .../include/embb/dataflow/internal/action.h | 2 +- .../embb/dataflow/internal/clock_listener.h | 2 +- .../embb/dataflow/internal/constant_source.h | 2 +- .../include/embb/dataflow/internal/in.h | 2 +- .../include/embb/dataflow/internal/inputs.h | 2 +- .../include/embb/dataflow/internal/node.h | 2 +- .../include/embb/dataflow/internal/out.h | 2 +- .../include/embb/dataflow/internal/outputs.h | 2 +- .../include/embb/dataflow/internal/process.h | 2 +- .../embb/dataflow/internal/process_executor.h | 2 +- .../embb/dataflow/internal/scheduler.h | 2 +- .../embb/dataflow/internal/scheduler_mtapi.h | 2 +- .../dataflow/internal/scheduler_sequential.h | 2 +- .../include/embb/dataflow/internal/select.h | 2 +- .../include/embb/dataflow/internal/signal.h | 2 +- .../include/embb/dataflow/internal/sink.h | 2 +- .../embb/dataflow/internal/sink_executor.h | 2 +- .../include/embb/dataflow/internal/source.h | 2 +- .../embb/dataflow/internal/source_executor.h | 2 +- .../include/embb/dataflow/internal/switch.h | 2 +- .../include/embb/dataflow/internal/tuple.h | 2 +- .../include/embb/dataflow/internal/typelist.h | 2 +- dataflow_cpp/include/embb/dataflow/network.h | 2 +- dataflow_cpp/src/node.cc | 2 +- dataflow_cpp/test/dataflow_cpp_test_simple.cc | 2 +- dataflow_cpp/test/dataflow_cpp_test_simple.h | 2 +- dataflow_cpp/test/dataflow_cpp_test_tuple.cc | 2 +- dataflow_cpp/test/dataflow_cpp_test_tuple.h | 2 +- dataflow_cpp/test/main.cc | 2 +- .../algorithms/counting/count-snippet.h | 26 +++++++++++++++++++ .../algorithms/counting/count_if-snippet.h | 26 +++++++++++++++++++ .../counting/counting-fragmented.cc | 2 +- .../algorithms/counting/setup-snippet.h | 26 +++++++++++++++++++ .../algorithms/for_each/doubling-snippet.h | 26 +++++++++++++++++++ .../for_each/doubling_zip-snippet.h | 26 +++++++++++++++++++ .../for_each/for_each-fragmented.cc | 2 +- .../algorithms/for_each/setup_zip-snippet.h | 26 +++++++++++++++++++ .../algorithms/invoke/invocation-snippet.h | 26 +++++++++++++++++++ .../algorithms/invoke/invoke-fragmented.cc | 2 +- .../algorithms/invoke/packages-snippet.h | 26 +++++++++++++++++++ .../invoke/parallel_quick_sort-snippet.h | 26 +++++++++++++++++++ .../algorithms/invoke/quick_sort-snippet.h | 26 +++++++++++++++++++ .../algorithms/reduce/dot_product-snippet.h | 26 +++++++++++++++++++ .../algorithms/reduce/parallel-snippet.h | 26 +++++++++++++++++++ .../algorithms/reduce/range_init-snippet.h | 26 +++++++++++++++++++ .../algorithms/reduce/reduce-fragmented.cc | 2 +- .../reduce/second_range_init-snippet.h | 26 +++++++++++++++++++ .../algorithms/reduce/sequential-snippet.h | 26 +++++++++++++++++++ .../algorithms/scan/prefix_sum-snippet.h | 26 +++++++++++++++++++ .../algorithms/scan/scan-fragmented.cc | 2 +- .../scan/sequential_prefix_sum-snippet.h | 26 +++++++++++++++++++ doc/examples/algorithms/scan/setup-snippet.h | 26 +++++++++++++++++++ .../sorting/merge_sort_preallocated-snippet.h | 26 +++++++++++++++++++ .../algorithms/sorting/quick_sort-snippet.h | 26 +++++++++++++++++++ .../quick_sort_custom_compare-snippet.h | 26 +++++++++++++++++++ .../algorithms/sorting/range_define-snippet.h | 26 +++++++++++++++++++ .../algorithms/sorting/sorting-fragmented.cc | 2 +- .../containers/object_pool-fragmented.cc | 2 +- doc/examples/containers/object_pool-snippet.h | 26 +++++++++++++++++++ .../containers/object_pool_2-snippet.h | 26 +++++++++++++++++++ doc/examples/containers/queues-fragmented.cc | 2 +- doc/examples/containers/queues-snippet.h | 26 +++++++++++++++++++ doc/examples/containers/stack-fragmented.cc | 2 +- doc/examples/containers/stack-snippet.h | 26 +++++++++++++++++++ doc/examples/dataflow/dataflow_add-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_comparator-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_connect-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_consumer-snippet.h | 26 +++++++++++++++++++ .../dataflow_declare_add_sources-snippet.h | 26 +++++++++++++++++++ .../dataflow_declare_replace-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_declare_sink-snippet.h | 26 +++++++++++++++++++ .../dataflow_declare_source-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_include-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_linear-fragmented.cc | 2 +- .../dataflow/dataflow_network-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_nonlinear-fragmented.cc | 2 +- .../dataflow/dataflow_producer-snippet.h | 26 +++++++++++++++++++ .../dataflow_replace_function-snippet.h | 26 +++++++++++++++++++ doc/examples/dataflow/dataflow_run-snippet.h | 26 +++++++++++++++++++ .../dataflow/dataflow_sink_function-snippet.h | 26 +++++++++++++++++++ .../dataflow_source_function-snippet.h | 26 +++++++++++++++++++ doc/examples/main.cc | 2 +- doc/examples/mtapi/mtapi_c-fragmented.cc | 2 +- .../mtapi/mtapi_c_action_signature-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_calc_direct-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_calc_task-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_domain_node_id-snippet.h | 26 +++++++++++++++++++ doc/examples/mtapi/mtapi_c_finalize-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_initialize-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_network-fragmented.cc | 2 +- .../mtapi/mtapi_c_opencl-fragmented.cc | 2 +- .../mtapi/mtapi_c_plugin-fragmented.cc | 2 +- .../mtapi_c_plugin_action_create-snippet.h | 26 +++++++++++++++++++ ...tapi_c_plugin_action_finalize_cb-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_plugin_get_job-snippet.h | 26 +++++++++++++++++++ .../mtapi_c_plugin_task_cancel_cb-snippet.h | 26 +++++++++++++++++++ .../mtapi_c_plugin_task_schedule-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_plugin_task_start-snippet.h | 26 +++++++++++++++++++ .../mtapi_c_plugin_task_start_cb-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_register_action-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_start_task-snippet.h | 26 +++++++++++++++++++ .../mtapi_c_validate_arguments-snippet.h | 26 +++++++++++++++++++ .../mtapi_c_validate_result_buffer-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_c_wait_task-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_check_status-snippet.h | 26 +++++++++++++++++++ doc/examples/mtapi/mtapi_cpp-fragmented.cc | 2 +- .../mtapi/mtapi_cpp_calc_task-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_domain_node_id-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_finalize-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_get_node-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_initialize-snippet.h | 26 +++++++++++++++++++ doc/examples/mtapi/mtapi_cpp_main-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_register_action-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_start_task-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_cpp_wait_task-snippet.h | 26 +++++++++++++++++++ .../mtapi_network_c_action_function-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_network_c_header-snippet.h | 26 +++++++++++++++++++ ...pi_network_c_local_action_create-snippet.h | 26 +++++++++++++++++++ .../mtapi_network_c_plugin_finalize-snippet.h | 26 +++++++++++++++++++ ...tapi_network_c_plugin_initialize-snippet.h | 26 +++++++++++++++++++ ...i_network_c_remote_action_create-snippet.h | 26 +++++++++++++++++++ .../mtapi_opencl_c_action_create-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_opencl_c_header-snippet.h | 26 +++++++++++++++++++ .../mtapi/mtapi_opencl_c_kernel-snippet.h | 26 +++++++++++++++++++ .../mtapi_opencl_c_plugin_finalize-snippet.h | 26 +++++++++++++++++++ ...mtapi_opencl_c_plugin_initialize-snippet.h | 26 +++++++++++++++++++ .../mtapi_terminating_condition-snippet.h | 26 +++++++++++++++++++ doc/examples/mtapi/mtapi_write_back-snippet.h | 26 +++++++++++++++++++ doc/examples/stl_for_each/function-snippet.h | 26 +++++++++++++++++++ .../stl_for_each/function_define-snippet.h | 26 +++++++++++++++++++ doc/examples/stl_for_each/functor-snippet.h | 26 +++++++++++++++++++ .../stl_for_each/functor_define-snippet.h | 26 +++++++++++++++++++ doc/examples/stl_for_each/lambda-snippet.h | 26 +++++++++++++++++++ doc/examples/stl_for_each/manual-snippet.h | 26 +++++++++++++++++++ doc/examples/stl_for_each/setup-snippet.h | 26 +++++++++++++++++++ .../stl_for_each/stl_for_each-fragmented.cc | 2 +- doc/examples/tasks/tasks_cpp-fragmented.cc | 2 +- .../tasks_cpp_action_signature-snippet.h | 26 +++++++++++++++++++ .../tasks/tasks_cpp_calc_direct-snippet.h | 26 +++++++++++++++++++ .../tasks/tasks_cpp_calc_task-snippet.h | 26 +++++++++++++++++++ .../tasks/tasks_cpp_get_node-snippet.h | 26 +++++++++++++++++++ .../tasks/tasks_cpp_start_task-snippet.h | 26 +++++++++++++++++++ .../tasks/tasks_cpp_wait_task-snippet.h | 26 +++++++++++++++++++ mtapi_c/include/mtapi.h | 2 +- mtapi_c/src/embb_mtapi_action_t.c | 2 +- mtapi_c/src/embb_mtapi_action_t.h | 2 +- mtapi_c/src/embb_mtapi_action_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_alloc.c | 2 +- mtapi_c/src/embb_mtapi_alloc.h | 2 +- mtapi_c/src/embb_mtapi_attr.c | 2 +- mtapi_c/src/embb_mtapi_attr.h | 2 +- mtapi_c/src/embb_mtapi_group_t.c | 2 +- mtapi_c/src/embb_mtapi_group_t.h | 2 +- mtapi_c/src/embb_mtapi_group_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_id_pool_t.c | 2 +- mtapi_c/src/embb_mtapi_id_pool_t.h | 2 +- mtapi_c/src/embb_mtapi_job_t.c | 2 +- mtapi_c/src/embb_mtapi_job_t.h | 2 +- mtapi_c/src/embb_mtapi_job_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_log.h | 2 +- mtapi_c/src/embb_mtapi_node_t.c | 2 +- mtapi_c/src/embb_mtapi_node_t.h | 2 +- mtapi_c/src/embb_mtapi_node_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_pool_template-inl.h | 2 +- mtapi_c/src/embb_mtapi_pool_template.h | 2 +- mtapi_c/src/embb_mtapi_queue_t.c | 2 +- mtapi_c/src/embb_mtapi_queue_t.h | 2 +- mtapi_c/src/embb_mtapi_queue_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_scheduler_t.c | 2 +- mtapi_c/src/embb_mtapi_scheduler_t.h | 2 +- mtapi_c/src/embb_mtapi_scheduler_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_task_context_t.c | 2 +- mtapi_c/src/embb_mtapi_task_context_t.h | 2 +- mtapi_c/src/embb_mtapi_task_context_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_task_queue_t.c | 2 +- mtapi_c/src/embb_mtapi_task_queue_t.h | 2 +- mtapi_c/src/embb_mtapi_task_queue_t_fwd.h | 2 +- mtapi_c/src/embb_mtapi_task_t.c | 2 +- mtapi_c/src/embb_mtapi_task_t.h | 2 +- mtapi_c/src/embb_mtapi_task_t_fwd.h | 2 +- .../src/embb_mtapi_task_visitor_function_t.h | 2 +- mtapi_c/src/embb_mtapi_thread_context_t.c | 2 +- mtapi_c/src/embb_mtapi_thread_context_t.h | 2 +- mtapi_c/src/embb_mtapi_thread_context_t_fwd.h | 2 +- mtapi_c/src/mtapi_action_attributes_t.c | 2 +- mtapi_c/src/mtapi_affinity_t.c | 2 +- mtapi_c/src/mtapi_group_attributes_t.c | 2 +- mtapi_c/src/mtapi_node_attributes_t.c | 2 +- mtapi_c/src/mtapi_queue_attributes_t.c | 2 +- mtapi_c/src/mtapi_status_t.h | 2 +- mtapi_c/src/mtapi_task_attributes_t.c | 2 +- mtapi_c/test/embb_mtapi_test_config.h | 2 +- mtapi_c/test/embb_mtapi_test_error.cc | 2 +- mtapi_c/test/embb_mtapi_test_error.h | 2 +- mtapi_c/test/embb_mtapi_test_group.cc | 2 +- mtapi_c/test/embb_mtapi_test_group.h | 2 +- mtapi_c/test/embb_mtapi_test_id_pool.cc | 2 +- mtapi_c/test/embb_mtapi_test_id_pool.h | 2 +- mtapi_c/test/embb_mtapi_test_init_finalize.cc | 2 +- mtapi_c/test/embb_mtapi_test_init_finalize.h | 2 +- mtapi_c/test/embb_mtapi_test_queue.cc | 2 +- mtapi_c/test/embb_mtapi_test_queue.h | 2 +- mtapi_c/test/embb_mtapi_test_task.cc | 2 +- mtapi_c/test/embb_mtapi_test_task.h | 2 +- mtapi_c/test/main.cc | 2 +- mtapi_cpp/include/embb/mtapi/action.h | 2 +- .../include/embb/mtapi/action_attributes.h | 2 +- mtapi_cpp/include/embb/mtapi/affinity.h | 2 +- mtapi_cpp/include/embb/mtapi/group.h | 2 +- .../include/embb/mtapi/group_attributes.h | 2 +- .../embb/mtapi/internal/check_status.h | 2 +- mtapi_cpp/include/embb/mtapi/job.h | 2 +- mtapi_cpp/include/embb/mtapi/mtapi.h | 2 +- mtapi_cpp/include/embb/mtapi/node.h | 2 +- .../include/embb/mtapi/node_attributes.h | 2 +- mtapi_cpp/include/embb/mtapi/queue.h | 2 +- .../include/embb/mtapi/queue_attributes.h | 2 +- .../include/embb/mtapi/status_exception.h | 2 +- mtapi_cpp/include/embb/mtapi/task.h | 2 +- .../include/embb/mtapi/task_attributes.h | 2 +- mtapi_cpp/include/embb/mtapi/task_context.h | 2 +- mtapi_cpp/src/check_status.cc | 2 +- mtapi_cpp/src/node.cc | 2 +- mtapi_cpp/test/main.cc | 2 +- mtapi_cpp/test/mtapi_cpp_test_config.h | 2 +- mtapi_cpp/test/mtapi_cpp_test_group.cc | 2 +- mtapi_cpp/test/mtapi_cpp_test_group.h | 2 +- mtapi_cpp/test/mtapi_cpp_test_queue.cc | 2 +- mtapi_cpp/test/mtapi_cpp_test_queue.h | 2 +- mtapi_cpp/test/mtapi_cpp_test_task.cc | 2 +- mtapi_cpp/test/mtapi_cpp_test_task.h | 2 +- scripts/license.txt | 2 +- tasks_cpp/include/embb/tasks/action.h | 2 +- tasks_cpp/include/embb/tasks/continuation.h | 2 +- .../include/embb/tasks/execution_policy.h | 2 +- tasks_cpp/include/embb/tasks/group.h | 2 +- .../embb/tasks/internal/cmake_config.h.in | 2 +- tasks_cpp/include/embb/tasks/node.h | 2 +- tasks_cpp/include/embb/tasks/queue.h | 2 +- tasks_cpp/include/embb/tasks/task.h | 2 +- tasks_cpp/include/embb/tasks/task_context.h | 2 +- tasks_cpp/include/embb/tasks/tasks.h | 2 +- tasks_cpp/src/continuation.cc | 2 +- tasks_cpp/src/continuationstage.h | 2 +- tasks_cpp/src/execution_policy.cc | 2 +- tasks_cpp/src/group.cc | 2 +- tasks_cpp/src/node.cc | 2 +- tasks_cpp/src/queue.cc | 2 +- tasks_cpp/src/task.cc | 2 +- tasks_cpp/src/task_context.cc | 2 +- tasks_cpp/test/main.cc | 2 +- tasks_cpp/test/tasks_cpp_test_config.h | 2 +- tasks_cpp/test/tasks_cpp_test_group.cc | 2 +- tasks_cpp/test/tasks_cpp_test_group.h | 2 +- tasks_cpp/test/tasks_cpp_test_queue.cc | 2 +- tasks_cpp/test/tasks_cpp_test_queue.h | 2 +- tasks_cpp/test/tasks_cpp_test_task.cc | 2 +- tasks_cpp/test/tasks_cpp_test_task.h | 2 +- 455 files changed, 2830 insertions(+), 360 deletions(-) diff --git a/algorithms_cpp/include/embb/algorithms/algorithms.h b/algorithms_cpp/include/embb/algorithms/algorithms.h index a4df292..bac8709 100644 --- a/algorithms_cpp/include/embb/algorithms/algorithms.h +++ b/algorithms_cpp/include/embb/algorithms/algorithms.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/count.h b/algorithms_cpp/include/embb/algorithms/count.h index 73f5b31..6016687 100644 --- a/algorithms_cpp/include/embb/algorithms/count.h +++ b/algorithms_cpp/include/embb/algorithms/count.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/for_each.h b/algorithms_cpp/include/embb/algorithms/for_each.h index 23af854..54e57a0 100644 --- a/algorithms_cpp/include/embb/algorithms/for_each.h +++ b/algorithms_cpp/include/embb/algorithms/for_each.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/identity.h b/algorithms_cpp/include/embb/algorithms/identity.h index 26235ce..d2ae305 100644 --- a/algorithms_cpp/include/embb/algorithms/identity.h +++ b/algorithms_cpp/include/embb/algorithms/identity.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/count-inl.h b/algorithms_cpp/include/embb/algorithms/internal/count-inl.h index 140fe51..dd11e38 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/count-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/count-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h b/algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h index fb5dcd3..8a4457a 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/for_each-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h b/algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h index 7cd2448..f278811 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/merge_sort-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/partition-inl.h b/algorithms_cpp/include/embb/algorithms/internal/partition-inl.h index 231ccb4..f1c2bca 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/partition-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/partition-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/partition.h b/algorithms_cpp/include/embb/algorithms/internal/partition.h index 400923d..948eb28 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/partition.h +++ b/algorithms_cpp/include/embb/algorithms/internal/partition.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h b/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h index 79a1241..e87927e 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/quick_sort-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/reduce-inl.h b/algorithms_cpp/include/embb/algorithms/internal/reduce-inl.h index bc15801..28c35ab 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/reduce-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/reduce-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/internal/scan-inl.h b/algorithms_cpp/include/embb/algorithms/internal/scan-inl.h index cbf748e..b81022e 100644 --- a/algorithms_cpp/include/embb/algorithms/internal/scan-inl.h +++ b/algorithms_cpp/include/embb/algorithms/internal/scan-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/invoke.h b/algorithms_cpp/include/embb/algorithms/invoke.h index a3884a4..ced924f 100644 --- a/algorithms_cpp/include/embb/algorithms/invoke.h +++ b/algorithms_cpp/include/embb/algorithms/invoke.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/merge_sort.h b/algorithms_cpp/include/embb/algorithms/merge_sort.h index 6e94903..a09cc90 100644 --- a/algorithms_cpp/include/embb/algorithms/merge_sort.h +++ b/algorithms_cpp/include/embb/algorithms/merge_sort.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/quick_sort.h b/algorithms_cpp/include/embb/algorithms/quick_sort.h index 80181d5..adefe09 100644 --- a/algorithms_cpp/include/embb/algorithms/quick_sort.h +++ b/algorithms_cpp/include/embb/algorithms/quick_sort.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/reduce.h b/algorithms_cpp/include/embb/algorithms/reduce.h index 463e1b8..1cf5d86 100644 --- a/algorithms_cpp/include/embb/algorithms/reduce.h +++ b/algorithms_cpp/include/embb/algorithms/reduce.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/scan.h b/algorithms_cpp/include/embb/algorithms/scan.h index 8a32e91..11d1315 100644 --- a/algorithms_cpp/include/embb/algorithms/scan.h +++ b/algorithms_cpp/include/embb/algorithms/scan.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/include/embb/algorithms/zip_iterator.h b/algorithms_cpp/include/embb/algorithms/zip_iterator.h index a3e033d..0de6ebf 100644 --- a/algorithms_cpp/include/embb/algorithms/zip_iterator.h +++ b/algorithms_cpp/include/embb/algorithms/zip_iterator.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/src/dummy.cc b/algorithms_cpp/src/dummy.cc index 13566b9..f2ce3d4 100644 --- a/algorithms_cpp/src/dummy.cc +++ b/algorithms_cpp/src/dummy.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/count_test.cc b/algorithms_cpp/test/count_test.cc index 0ab2571..6678383 100644 --- a/algorithms_cpp/test/count_test.cc +++ b/algorithms_cpp/test/count_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/count_test.h b/algorithms_cpp/test/count_test.h index 95f2a32..55862c7 100644 --- a/algorithms_cpp/test/count_test.h +++ b/algorithms_cpp/test/count_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/for_each_test.cc b/algorithms_cpp/test/for_each_test.cc index df46122..b42179e 100644 --- a/algorithms_cpp/test/for_each_test.cc +++ b/algorithms_cpp/test/for_each_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/for_each_test.h b/algorithms_cpp/test/for_each_test.h index f768662..efe7875 100644 --- a/algorithms_cpp/test/for_each_test.h +++ b/algorithms_cpp/test/for_each_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/invoke_test.cc b/algorithms_cpp/test/invoke_test.cc index 1481747..2776ed3 100644 --- a/algorithms_cpp/test/invoke_test.cc +++ b/algorithms_cpp/test/invoke_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/invoke_test.h b/algorithms_cpp/test/invoke_test.h index e75ecc3..4679b26 100644 --- a/algorithms_cpp/test/invoke_test.h +++ b/algorithms_cpp/test/invoke_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/main.cc b/algorithms_cpp/test/main.cc index 1da1475..5ae28d5 100644 --- a/algorithms_cpp/test/main.cc +++ b/algorithms_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/merge_sort_test.cc b/algorithms_cpp/test/merge_sort_test.cc index c3fd3ee..43c9dc1 100644 --- a/algorithms_cpp/test/merge_sort_test.cc +++ b/algorithms_cpp/test/merge_sort_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/merge_sort_test.h b/algorithms_cpp/test/merge_sort_test.h index 7dbc8b0..45bc4dc 100644 --- a/algorithms_cpp/test/merge_sort_test.h +++ b/algorithms_cpp/test/merge_sort_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/partitioner_test.cc b/algorithms_cpp/test/partitioner_test.cc index d17cc77..2ce02c9 100644 --- a/algorithms_cpp/test/partitioner_test.cc +++ b/algorithms_cpp/test/partitioner_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/partitioner_test.h b/algorithms_cpp/test/partitioner_test.h index ecea402..31001bb 100644 --- a/algorithms_cpp/test/partitioner_test.h +++ b/algorithms_cpp/test/partitioner_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/quick_sort_test.cc b/algorithms_cpp/test/quick_sort_test.cc index 151b658..ef1faba 100644 --- a/algorithms_cpp/test/quick_sort_test.cc +++ b/algorithms_cpp/test/quick_sort_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/quick_sort_test.h b/algorithms_cpp/test/quick_sort_test.h index 1d2ef03..1523117 100644 --- a/algorithms_cpp/test/quick_sort_test.h +++ b/algorithms_cpp/test/quick_sort_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/reduce_test.cc b/algorithms_cpp/test/reduce_test.cc index 63d31be..cf66a0a 100644 --- a/algorithms_cpp/test/reduce_test.cc +++ b/algorithms_cpp/test/reduce_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/reduce_test.h b/algorithms_cpp/test/reduce_test.h index 50ab6ca..e2d8e13 100644 --- a/algorithms_cpp/test/reduce_test.h +++ b/algorithms_cpp/test/reduce_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/scan_test.cc b/algorithms_cpp/test/scan_test.cc index 61f85f5..ffab634 100644 --- a/algorithms_cpp/test/scan_test.cc +++ b/algorithms_cpp/test/scan_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/scan_test.h b/algorithms_cpp/test/scan_test.h index 553f8bc..44e66b5 100644 --- a/algorithms_cpp/test/scan_test.h +++ b/algorithms_cpp/test/scan_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/zip_iterator_test.cc b/algorithms_cpp/test/zip_iterator_test.cc index d345206..2e67e7c 100644 --- a/algorithms_cpp/test/zip_iterator_test.cc +++ b/algorithms_cpp/test/zip_iterator_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/algorithms_cpp/test/zip_iterator_test.h b/algorithms_cpp/test/zip_iterator_test.h index 56b4639..8764914 100644 --- a/algorithms_cpp/test/zip_iterator_test.h +++ b/algorithms_cpp/test/zip_iterator_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/atomic.h b/base_c/include/embb/base/c/atomic.h index 8875432..b00b337 100644 --- a/base_c/include/embb/base/c/atomic.h +++ b/base_c/include/embb/base/c/atomic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/base.h b/base_c/include/embb/base/c/base.h index 0251a43..bcc178a 100644 --- a/base_c/include/embb/base/c/base.h +++ b/base_c/include/embb/base/c/base.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/condition_variable.h b/base_c/include/embb/base/c/condition_variable.h index 86143cc..d707c2b 100644 --- a/base_c/include/embb/base/c/condition_variable.h +++ b/base_c/include/embb/base/c/condition_variable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/core_set.h b/base_c/include/embb/base/c/core_set.h index 0980fef..767a3dc 100644 --- a/base_c/include/embb/base/c/core_set.h +++ b/base_c/include/embb/base/c/core_set.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/counter.h b/base_c/include/embb/base/c/counter.h index 05536a2..e38a167 100644 --- a/base_c/include/embb/base/c/counter.h +++ b/base_c/include/embb/base/c/counter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/duration.h b/base_c/include/embb/base/c/duration.h index fe1b435..1af05db 100644 --- a/base_c/include/embb/base/c/duration.h +++ b/base_c/include/embb/base/c/duration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/errors.h b/base_c/include/embb/base/c/errors.h index 3276dfc..fef908b 100644 --- a/base_c/include/embb/base/c/errors.h +++ b/base_c/include/embb/base/c/errors.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/and_assign.h b/base_c/include/embb/base/c/internal/atomic/and_assign.h index 9a99f51..48871ca 100644 --- a/base_c/include/embb/base/c/internal/atomic/and_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/and_assign.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/atomic_sizes.h.in b/base_c/include/embb/base/c/internal/atomic/atomic_sizes.h.in index 972239b..26a7528 100644 --- a/base_c/include/embb/base/c/internal/atomic/atomic_sizes.h.in +++ b/base_c/include/embb/base/c/internal/atomic/atomic_sizes.h.in @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/atomic_variables.h b/base_c/include/embb/base/c/internal/atomic/atomic_variables.h index 549ff0d..4c35b1e 100644 --- a/base_c/include/embb/base/c/internal/atomic/atomic_variables.h +++ b/base_c/include/embb/base/c/internal/atomic/atomic_variables.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/compare_and_swap.h b/base_c/include/embb/base/c/internal/atomic/compare_and_swap.h index bf6c273..8de4e09 100644 --- a/base_c/include/embb/base/c/internal/atomic/compare_and_swap.h +++ b/base_c/include/embb/base/c/internal/atomic/compare_and_swap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h b/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h index 627c817..a165744 100644 --- a/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h +++ b/base_c/include/embb/base/c/internal/atomic/fetch_and_add.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/generate_atomic_implementation_template.h b/base_c/include/embb/base/c/internal/atomic/generate_atomic_implementation_template.h index 49a38f7..318b835 100644 --- a/base_c/include/embb/base/c/internal/atomic/generate_atomic_implementation_template.h +++ b/base_c/include/embb/base/c/internal/atomic/generate_atomic_implementation_template.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/load.h b/base_c/include/embb/base/c/internal/atomic/load.h index 8a01f08..20094b5 100644 --- a/base_c/include/embb/base/c/internal/atomic/load.h +++ b/base_c/include/embb/base/c/internal/atomic/load.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/memory_barrier.h b/base_c/include/embb/base/c/internal/atomic/memory_barrier.h index a7e0966..392366f 100644 --- a/base_c/include/embb/base/c/internal/atomic/memory_barrier.h +++ b/base_c/include/embb/base/c/internal/atomic/memory_barrier.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/or_assign.h b/base_c/include/embb/base/c/internal/atomic/or_assign.h index b492529..9c76cf8 100644 --- a/base_c/include/embb/base/c/internal/atomic/or_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/or_assign.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/store.h b/base_c/include/embb/base/c/internal/atomic/store.h index c139f2e..fdb6a40 100644 --- a/base_c/include/embb/base/c/internal/atomic/store.h +++ b/base_c/include/embb/base/c/internal/atomic/store.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/swap.h b/base_c/include/embb/base/c/internal/atomic/swap.h index 0c53f63..70c397c 100644 --- a/base_c/include/embb/base/c/internal/atomic/swap.h +++ b/base_c/include/embb/base/c/internal/atomic/swap.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/atomic/xor_assign.h b/base_c/include/embb/base/c/internal/atomic/xor_assign.h index 823dee0..8de71fe 100644 --- a/base_c/include/embb/base/c/internal/atomic/xor_assign.h +++ b/base_c/include/embb/base/c/internal/atomic/xor_assign.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/bitset.h b/base_c/include/embb/base/c/internal/bitset.h index b32e6c7..0dd7216 100644 --- a/base_c/include/embb/base/c/internal/bitset.h +++ b/base_c/include/embb/base/c/internal/bitset.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/cmake_config.h.in b/base_c/include/embb/base/c/internal/cmake_config.h.in index 12eae11..21b3048 100644 --- a/base_c/include/embb/base/c/internal/cmake_config.h.in +++ b/base_c/include/embb/base/c/internal/cmake_config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/config.h b/base_c/include/embb/base/c/internal/config.h index 3c34467..8a08174 100644 --- a/base_c/include/embb/base/c/internal/config.h +++ b/base_c/include/embb/base/c/internal/config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/macro_helper.h b/base_c/include/embb/base/c/internal/macro_helper.h index 857d71d..8d43d8c 100644 --- a/base_c/include/embb/base/c/internal/macro_helper.h +++ b/base_c/include/embb/base/c/internal/macro_helper.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/platform.h b/base_c/include/embb/base/c/internal/platform.h index 7f025fc..5e21de6 100644 --- a/base_c/include/embb/base/c/internal/platform.h +++ b/base_c/include/embb/base/c/internal/platform.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/thread_index.h b/base_c/include/embb/base/c/internal/thread_index.h index 0bda787..239b6e3 100644 --- a/base_c/include/embb/base/c/internal/thread_index.h +++ b/base_c/include/embb/base/c/internal/thread_index.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/internal/unused.h b/base_c/include/embb/base/c/internal/unused.h index 2109249..d68ff3a 100644 --- a/base_c/include/embb/base/c/internal/unused.h +++ b/base_c/include/embb/base/c/internal/unused.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/log.h b/base_c/include/embb/base/c/log.h index 06cfb46..31c5128 100644 --- a/base_c/include/embb/base/c/log.h +++ b/base_c/include/embb/base/c/log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/memory_allocation.h b/base_c/include/embb/base/c/memory_allocation.h index c9d797d..9f2d199 100644 --- a/base_c/include/embb/base/c/memory_allocation.h +++ b/base_c/include/embb/base/c/memory_allocation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/mutex.h b/base_c/include/embb/base/c/mutex.h index dd15c89..ebac1d6 100644 --- a/base_c/include/embb/base/c/mutex.h +++ b/base_c/include/embb/base/c/mutex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/thread.h b/base_c/include/embb/base/c/thread.h index 0e9efd2..1d7ea11 100644 --- a/base_c/include/embb/base/c/thread.h +++ b/base_c/include/embb/base/c/thread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/thread_specific_storage.h b/base_c/include/embb/base/c/thread_specific_storage.h index 3b70bed..31ef36a 100644 --- a/base_c/include/embb/base/c/thread_specific_storage.h +++ b/base_c/include/embb/base/c/thread_specific_storage.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/include/embb/base/c/time.h b/base_c/include/embb/base/c/time.h index a220ce7..3316253 100644 --- a/base_c/include/embb/base/c/time.h +++ b/base_c/include/embb/base/c/time.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/atomic.c b/base_c/src/atomic.c index e21603e..e8ea812 100644 --- a/base_c/src/atomic.c +++ b/base_c/src/atomic.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/condition_variable.c b/base_c/src/condition_variable.c index 575bb33..14ca240 100644 --- a/base_c/src/condition_variable.c +++ b/base_c/src/condition_variable.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/core_set.c b/base_c/src/core_set.c index aa142f3..3500a59 100644 --- a/base_c/src/core_set.c +++ b/base_c/src/core_set.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/counter.c b/base_c/src/counter.c index d71eb4d..ef16ea8 100644 --- a/base_c/src/counter.c +++ b/base_c/src/counter.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/duration.c b/base_c/src/duration.c index 8db8c7c..fd16a02 100644 --- a/base_c/src/duration.c +++ b/base_c/src/duration.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/internal/thread_index.c b/base_c/src/internal/thread_index.c index 3396eb6..b4c1a75 100644 --- a/base_c/src/internal/thread_index.c +++ b/base_c/src/internal/thread_index.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/log.c b/base_c/src/log.c index b5b1696..a622275 100644 --- a/base_c/src/log.c +++ b/base_c/src/log.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/memory_allocation.c b/base_c/src/memory_allocation.c index e1462db..8977240 100644 --- a/base_c/src/memory_allocation.c +++ b/base_c/src/memory_allocation.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/mutex.c b/base_c/src/mutex.c index 601e16b..7b9a0f5 100644 --- a/base_c/src/mutex.c +++ b/base_c/src/mutex.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/thread.c b/base_c/src/thread.c index e7abb40..92f8bfc 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/thread_specific_storage.c b/base_c/src/thread_specific_storage.c index fea5d18..f27e828 100644 --- a/base_c/src/thread_specific_storage.c +++ b/base_c/src/thread_specific_storage.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/src/time.c b/base_c/src/time.c index bc92363..9a07727 100644 --- a/base_c/src/time.c +++ b/base_c/src/time.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/alloc_test.cc b/base_c/test/alloc_test.cc index 3ddaf4a..840c514 100644 --- a/base_c/test/alloc_test.cc +++ b/base_c/test/alloc_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/alloc_test.h b/base_c/test/alloc_test.h index b83c8bf..62ad953 100644 --- a/base_c/test/alloc_test.h +++ b/base_c/test/alloc_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/condition_var_test.cc b/base_c/test/condition_var_test.cc index 3a526d2..8688f1b 100644 --- a/base_c/test/condition_var_test.cc +++ b/base_c/test/condition_var_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/condition_var_test.h b/base_c/test/condition_var_test.h index 23b56be..4224074 100644 --- a/base_c/test/condition_var_test.h +++ b/base_c/test/condition_var_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/core_set_test.cc b/base_c/test/core_set_test.cc index 38e8e39..f8ab25b 100644 --- a/base_c/test/core_set_test.cc +++ b/base_c/test/core_set_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/core_set_test.h b/base_c/test/core_set_test.h index 1c6dbfb..33e5996 100644 --- a/base_c/test/core_set_test.h +++ b/base_c/test/core_set_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/counter_test.cc b/base_c/test/counter_test.cc index e6b9950..2cba520 100644 --- a/base_c/test/counter_test.cc +++ b/base_c/test/counter_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/counter_test.h b/base_c/test/counter_test.h index cf3297b..9f14bfa 100644 --- a/base_c/test/counter_test.h +++ b/base_c/test/counter_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/duration_test.cc b/base_c/test/duration_test.cc index 9b93ce3..675ad68 100644 --- a/base_c/test/duration_test.cc +++ b/base_c/test/duration_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/duration_test.h b/base_c/test/duration_test.h index d2a7d2f..73aca64 100644 --- a/base_c/test/duration_test.h +++ b/base_c/test/duration_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/main.cc b/base_c/test/main.cc index 4e26f30..ad864c8 100644 --- a/base_c/test/main.cc +++ b/base_c/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/mutex_test.cc b/base_c/test/mutex_test.cc index 4c045a1..ed970df 100644 --- a/base_c/test/mutex_test.cc +++ b/base_c/test/mutex_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/mutex_test.h b/base_c/test/mutex_test.h index dfe5dda..b049933 100644 --- a/base_c/test/mutex_test.h +++ b/base_c/test/mutex_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_index_test.cc b/base_c/test/thread_index_test.cc index 1dd5c13..baf2f75 100644 --- a/base_c/test/thread_index_test.cc +++ b/base_c/test/thread_index_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_index_test.h b/base_c/test/thread_index_test.h index 1f07630..3452a41 100644 --- a/base_c/test/thread_index_test.h +++ b/base_c/test/thread_index_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_specific_storage_test.cc b/base_c/test/thread_specific_storage_test.cc index 50e7b0c..3033e29 100644 --- a/base_c/test/thread_specific_storage_test.cc +++ b/base_c/test/thread_specific_storage_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_specific_storage_test.h b/base_c/test/thread_specific_storage_test.h index 1d77e3e..ac2c7df 100644 --- a/base_c/test/thread_specific_storage_test.h +++ b/base_c/test/thread_specific_storage_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_test.cc b/base_c/test/thread_test.cc index 6308f78..f5af851 100644 --- a/base_c/test/thread_test.cc +++ b/base_c/test/thread_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/thread_test.h b/base_c/test/thread_test.h index 6cdd684..149a489 100644 --- a/base_c/test/thread_test.h +++ b/base_c/test/thread_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/time_test.cc b/base_c/test/time_test.cc index 9797350..7b1b63e 100644 --- a/base_c/test/time_test.cc +++ b/base_c/test/time_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_c/test/time_test.h b/base_c/test/time_test.h index 419d26d..0cf3b84 100644 --- a/base_c/test/time_test.h +++ b/base_c/test/time_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/atomic.h b/base_cpp/include/embb/base/atomic.h index bf9cdb9..2d00b86 100644 --- a/base_cpp/include/embb/base/atomic.h +++ b/base_cpp/include/embb/base/atomic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/base.h b/base_cpp/include/embb/base/base.h index bf7e903..9bde979 100644 --- a/base_cpp/include/embb/base/base.h +++ b/base_cpp/include/embb/base/base.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/condition_variable.h b/base_cpp/include/embb/base/condition_variable.h index 8f72e5e..50dd37a 100644 --- a/base_cpp/include/embb/base/condition_variable.h +++ b/base_cpp/include/embb/base/condition_variable.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/core_set.h b/base_cpp/include/embb/base/core_set.h index 9682c0d..82599ac 100644 --- a/base_cpp/include/embb/base/core_set.h +++ b/base_cpp/include/embb/base/core_set.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/duration.h b/base_cpp/include/embb/base/duration.h index 4dbc4e4..dd66468 100644 --- a/base_cpp/include/embb/base/duration.h +++ b/base_cpp/include/embb/base/duration.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/exceptions.h b/base_cpp/include/embb/base/exceptions.h index abcc09d..9beb684 100644 --- a/base_cpp/include/embb/base/exceptions.h +++ b/base_cpp/include/embb/base/exceptions.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/function.h b/base_cpp/include/embb/base/function.h index 0abad4e..58aef0d 100644 --- a/base_cpp/include/embb/base/function.h +++ b/base_cpp/include/embb/base/function.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_arithmetic.h b/base_cpp/include/embb/base/internal/atomic/atomic_arithmetic.h index 2709dca..f9cdd25 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_arithmetic.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_arithmetic.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_base.h b/base_cpp/include/embb/base/internal/atomic/atomic_base.h index 1be01e5..bfa3dd6 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_base.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_base.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_implementation.h b/base_cpp/include/embb/base/internal/atomic/atomic_implementation.h index c877564..0367be7 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_implementation.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_implementation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_integer.h b/base_cpp/include/embb/base/internal/atomic/atomic_integer.h index 2c1476c..c609bd9 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_integer.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_integer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_pointer.h b/base_cpp/include/embb/base/internal/atomic/atomic_pointer.h index a689054..5a5bcae 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_pointer.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_pointer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/atomic/atomic_utility.h b/base_cpp/include/embb/base/internal/atomic/atomic_utility.h index b8051ee..89f08c9 100644 --- a/base_cpp/include/embb/base/internal/atomic/atomic_utility.h +++ b/base_cpp/include/embb/base/internal/atomic/atomic_utility.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/cmake_config.h.in b/base_cpp/include/embb/base/internal/cmake_config.h.in index 0c6d975..02226f6 100644 --- a/base_cpp/include/embb/base/internal/cmake_config.h.in +++ b/base_cpp/include/embb/base/internal/cmake_config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/condition_variable-inl.h b/base_cpp/include/embb/base/internal/condition_variable-inl.h index 25b65aa..97f4caf 100644 --- a/base_cpp/include/embb/base/internal/condition_variable-inl.h +++ b/base_cpp/include/embb/base/internal/condition_variable-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/config.h b/base_cpp/include/embb/base/internal/config.h index ceddb94..ffab0c2 100644 --- a/base_cpp/include/embb/base/internal/config.h +++ b/base_cpp/include/embb/base/internal/config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/duration-inl.h b/base_cpp/include/embb/base/internal/duration-inl.h index 2d502fd..982fcb7 100644 --- a/base_cpp/include/embb/base/internal/duration-inl.h +++ b/base_cpp/include/embb/base/internal/duration-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function0.h b/base_cpp/include/embb/base/internal/function0.h index 99f9ff2..396c7da 100644 --- a/base_cpp/include/embb/base/internal/function0.h +++ b/base_cpp/include/embb/base/internal/function0.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function1.h b/base_cpp/include/embb/base/internal/function1.h index 4951140..b880d86 100644 --- a/base_cpp/include/embb/base/internal/function1.h +++ b/base_cpp/include/embb/base/internal/function1.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function2.h b/base_cpp/include/embb/base/internal/function2.h index 079b663..3b9f9ba 100644 --- a/base_cpp/include/embb/base/internal/function2.h +++ b/base_cpp/include/embb/base/internal/function2.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function3.h b/base_cpp/include/embb/base/internal/function3.h index 343001b..545feca 100644 --- a/base_cpp/include/embb/base/internal/function3.h +++ b/base_cpp/include/embb/base/internal/function3.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function4.h b/base_cpp/include/embb/base/internal/function4.h index 67de1d2..22415e5 100644 --- a/base_cpp/include/embb/base/internal/function4.h +++ b/base_cpp/include/embb/base/internal/function4.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/function5.h b/base_cpp/include/embb/base/internal/function5.h index c6ad05f..3221e57 100644 --- a/base_cpp/include/embb/base/internal/function5.h +++ b/base_cpp/include/embb/base/internal/function5.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/functionT.h b/base_cpp/include/embb/base/internal/functionT.h index 0c80b6b..9935cb7 100644 --- a/base_cpp/include/embb/base/internal/functionT.h +++ b/base_cpp/include/embb/base/internal/functionT.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/memory_allocation-inl.h b/base_cpp/include/embb/base/internal/memory_allocation-inl.h index 3f6f6cb..7565bc4 100644 --- a/base_cpp/include/embb/base/internal/memory_allocation-inl.h +++ b/base_cpp/include/embb/base/internal/memory_allocation-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/mutex-inl.h b/base_cpp/include/embb/base/internal/mutex-inl.h index e9fcb62..ffdbf12 100644 --- a/base_cpp/include/embb/base/internal/mutex-inl.h +++ b/base_cpp/include/embb/base/internal/mutex-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/nil.h b/base_cpp/include/embb/base/internal/nil.h index 5d46990..36503c0 100644 --- a/base_cpp/include/embb/base/internal/nil.h +++ b/base_cpp/include/embb/base/internal/nil.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/platform.h b/base_cpp/include/embb/base/internal/platform.h index 6258563..65b82f1 100644 --- a/base_cpp/include/embb/base/internal/platform.h +++ b/base_cpp/include/embb/base/internal/platform.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/thread-inl.h b/base_cpp/include/embb/base/internal/thread-inl.h index 454f75a..8c856f0 100644 --- a/base_cpp/include/embb/base/internal/thread-inl.h +++ b/base_cpp/include/embb/base/internal/thread-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/thread_closures.h b/base_cpp/include/embb/base/internal/thread_closures.h index 03273ac..9de9d72 100644 --- a/base_cpp/include/embb/base/internal/thread_closures.h +++ b/base_cpp/include/embb/base/internal/thread_closures.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/internal/thread_specific_storage-inl.h b/base_cpp/include/embb/base/internal/thread_specific_storage-inl.h index 00b81c3..e142aee 100644 --- a/base_cpp/include/embb/base/internal/thread_specific_storage-inl.h +++ b/base_cpp/include/embb/base/internal/thread_specific_storage-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/log.h b/base_cpp/include/embb/base/log.h index b9a398a..275e95a 100644 --- a/base_cpp/include/embb/base/log.h +++ b/base_cpp/include/embb/base/log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/memory_allocation.h b/base_cpp/include/embb/base/memory_allocation.h index 0eb03b7..7b415a3 100644 --- a/base_cpp/include/embb/base/memory_allocation.h +++ b/base_cpp/include/embb/base/memory_allocation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/mutex.h b/base_cpp/include/embb/base/mutex.h index ac9b6fc..bae49d6 100644 --- a/base_cpp/include/embb/base/mutex.h +++ b/base_cpp/include/embb/base/mutex.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/thread.h b/base_cpp/include/embb/base/thread.h index a2278ea..10fe983 100644 --- a/base_cpp/include/embb/base/thread.h +++ b/base_cpp/include/embb/base/thread.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/thread_specific_storage.h b/base_cpp/include/embb/base/thread_specific_storage.h index fa2191e..1f07996 100644 --- a/base_cpp/include/embb/base/thread_specific_storage.h +++ b/base_cpp/include/embb/base/thread_specific_storage.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/include/embb/base/time.h b/base_cpp/include/embb/base/time.h index 06f9ee8..f942588 100644 --- a/base_cpp/include/embb/base/time.h +++ b/base_cpp/include/embb/base/time.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/condition_variable.cc b/base_cpp/src/condition_variable.cc index 9a6a2a8..8124d2e 100644 --- a/base_cpp/src/condition_variable.cc +++ b/base_cpp/src/condition_variable.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/core_set.cc b/base_cpp/src/core_set.cc index eb7ce6b..751a373 100644 --- a/base_cpp/src/core_set.cc +++ b/base_cpp/src/core_set.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/duration.cc b/base_cpp/src/duration.cc index efc493f..2870ef8 100644 --- a/base_cpp/src/duration.cc +++ b/base_cpp/src/duration.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/function.cc b/base_cpp/src/function.cc index 118035a..3eea841 100644 --- a/base_cpp/src/function.cc +++ b/base_cpp/src/function.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/log.cc b/base_cpp/src/log.cc index 2cefe3a..c2f10f3 100644 --- a/base_cpp/src/log.cc +++ b/base_cpp/src/log.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/memory_allocation.cc b/base_cpp/src/memory_allocation.cc index 73ac560..34cb28e 100644 --- a/base_cpp/src/memory_allocation.cc +++ b/base_cpp/src/memory_allocation.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/mutex.cc b/base_cpp/src/mutex.cc index be387f1..83dd946 100644 --- a/base_cpp/src/mutex.cc +++ b/base_cpp/src/mutex.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/thread.cc b/base_cpp/src/thread.cc index 6f6259e..3766dd9 100644 --- a/base_cpp/src/thread.cc +++ b/base_cpp/src/thread.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/time.cc b/base_cpp/src/time.cc index 8f99b01..1f827c5 100644 --- a/base_cpp/src/time.cc +++ b/base_cpp/src/time.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/atomic_test.cc b/base_cpp/test/atomic_test.cc index 580859c..f31d523 100644 --- a/base_cpp/test/atomic_test.cc +++ b/base_cpp/test/atomic_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/atomic_test.h b/base_cpp/test/atomic_test.h index 6696d29..9dea845 100644 --- a/base_cpp/test/atomic_test.h +++ b/base_cpp/test/atomic_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/condition_var_test.cc b/base_cpp/test/condition_var_test.cc index a023cf0..1159c38 100644 --- a/base_cpp/test/condition_var_test.cc +++ b/base_cpp/test/condition_var_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/condition_var_test.h b/base_cpp/test/condition_var_test.h index a2fefb7..597fc9f 100644 --- a/base_cpp/test/condition_var_test.h +++ b/base_cpp/test/condition_var_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/core_set_test.cc b/base_cpp/test/core_set_test.cc index 9dff77f..b23db7b 100644 --- a/base_cpp/test/core_set_test.cc +++ b/base_cpp/test/core_set_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/core_set_test.h b/base_cpp/test/core_set_test.h index d9579a9..bf70437 100644 --- a/base_cpp/test/core_set_test.h +++ b/base_cpp/test/core_set_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/duration_test.cc b/base_cpp/test/duration_test.cc index fb70d22..dcad281 100644 --- a/base_cpp/test/duration_test.cc +++ b/base_cpp/test/duration_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/duration_test.h b/base_cpp/test/duration_test.h index 48b8509..d36e2b5 100644 --- a/base_cpp/test/duration_test.h +++ b/base_cpp/test/duration_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/log_test.cc b/base_cpp/test/log_test.cc index 6bafe2a..2109885 100644 --- a/base_cpp/test/log_test.cc +++ b/base_cpp/test/log_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/log_test.h b/base_cpp/test/log_test.h index bbf78f5..d258a4e 100644 --- a/base_cpp/test/log_test.h +++ b/base_cpp/test/log_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/main.cc b/base_cpp/test/main.cc index db2f5fa..31b57d2 100644 --- a/base_cpp/test/main.cc +++ b/base_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/memory_allocation_test.cc b/base_cpp/test/memory_allocation_test.cc index 8d75726..f43a66a 100644 --- a/base_cpp/test/memory_allocation_test.cc +++ b/base_cpp/test/memory_allocation_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/memory_allocation_test.h b/base_cpp/test/memory_allocation_test.h index 58a360a..2c1dbda 100644 --- a/base_cpp/test/memory_allocation_test.h +++ b/base_cpp/test/memory_allocation_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/mutex_test.cc b/base_cpp/test/mutex_test.cc index b788c6d..496b3c8 100644 --- a/base_cpp/test/mutex_test.cc +++ b/base_cpp/test/mutex_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/mutex_test.h b/base_cpp/test/mutex_test.h index 8f379e3..793ff90 100644 --- a/base_cpp/test/mutex_test.h +++ b/base_cpp/test/mutex_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/thread_specific_storage_test.cc b/base_cpp/test/thread_specific_storage_test.cc index f979b50..398af51 100644 --- a/base_cpp/test/thread_specific_storage_test.cc +++ b/base_cpp/test/thread_specific_storage_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/thread_specific_storage_test.h b/base_cpp/test/thread_specific_storage_test.h index 1c94e2a..7a07c5d 100644 --- a/base_cpp/test/thread_specific_storage_test.h +++ b/base_cpp/test/thread_specific_storage_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/thread_test.cc b/base_cpp/test/thread_test.cc index f8af461..68de306 100644 --- a/base_cpp/test/thread_test.cc +++ b/base_cpp/test/thread_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/thread_test.h b/base_cpp/test/thread_test.h index 3d27579..48d2f30 100644 --- a/base_cpp/test/thread_test.h +++ b/base_cpp/test/thread_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/test/time_test.h b/base_cpp/test/time_test.h index d49a1fb..da00d6d 100644 --- a/base_cpp/test/time_test.h +++ b/base_cpp/test/time_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/containers.h b/containers_cpp/include/embb/containers/containers.h index 8cc7c79..8e842a6 100644 --- a/containers_cpp/include/embb/containers/containers.h +++ b/containers_cpp/include/embb/containers/containers.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h index 83f80aa..9e82f73 100644 --- a/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h +++ b/containers_cpp/include/embb/containers/internal/hazard_pointer-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/hazard_pointer.h b/containers_cpp/include/embb/containers/internal/hazard_pointer.h index 2a25b67..25570dd 100644 --- a/containers_cpp/include/embb/containers/internal/hazard_pointer.h +++ b/containers_cpp/include/embb/containers/internal/hazard_pointer.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/lock_free_mpmc_queue-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_mpmc_queue-inl.h index d087706..a3defd6 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_mpmc_queue-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_mpmc_queue-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h index 572aa32..70b409f 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h index eedc22d..83b4353 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/object_pool-inl.h b/containers_cpp/include/embb/containers/internal/object_pool-inl.h index 9458a55..3663c29 100644 --- a/containers_cpp/include/embb/containers/internal/object_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/object_pool-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h b/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h index 18ef996..049cc44 100644 --- a/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/internal/wait_free_spsc_queue-inl.h b/containers_cpp/include/embb/containers/internal/wait_free_spsc_queue-inl.h index 352e6c8..cc605d4 100644 --- a/containers_cpp/include/embb/containers/internal/wait_free_spsc_queue-inl.h +++ b/containers_cpp/include/embb/containers/internal/wait_free_spsc_queue-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/lock_free_mpmc_queue.h b/containers_cpp/include/embb/containers/lock_free_mpmc_queue.h index 8340c53..93c07fb 100644 --- a/containers_cpp/include/embb/containers/lock_free_mpmc_queue.h +++ b/containers_cpp/include/embb/containers/lock_free_mpmc_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/lock_free_stack.h b/containers_cpp/include/embb/containers/lock_free_stack.h index 7fb6d5e..ebe2079 100644 --- a/containers_cpp/include/embb/containers/lock_free_stack.h +++ b/containers_cpp/include/embb/containers/lock_free_stack.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h b/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h index 7b218fc..3dff4cc 100644 --- a/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h +++ b/containers_cpp/include/embb/containers/lock_free_tree_value_pool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/object_pool.h b/containers_cpp/include/embb/containers/object_pool.h index 889f5cc..f8b9e5c 100644 --- a/containers_cpp/include/embb/containers/object_pool.h +++ b/containers_cpp/include/embb/containers/object_pool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/wait_free_array_value_pool.h b/containers_cpp/include/embb/containers/wait_free_array_value_pool.h index 5a6bfda..c8a1d2f 100644 --- a/containers_cpp/include/embb/containers/wait_free_array_value_pool.h +++ b/containers_cpp/include/embb/containers/wait_free_array_value_pool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/include/embb/containers/wait_free_spsc_queue.h b/containers_cpp/include/embb/containers/wait_free_spsc_queue.h index 30f7235..69eb8dc 100644 --- a/containers_cpp/include/embb/containers/wait_free_spsc_queue.h +++ b/containers_cpp/include/embb/containers/wait_free_spsc_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/src/dummy.cc b/containers_cpp/src/dummy.cc index e95756a..c4fd49d 100644 --- a/containers_cpp/src/dummy.cc +++ b/containers_cpp/src/dummy.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/hazard_pointer_test.cc b/containers_cpp/test/hazard_pointer_test.cc index 7913b92..7a401fc 100644 --- a/containers_cpp/test/hazard_pointer_test.cc +++ b/containers_cpp/test/hazard_pointer_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/hazard_pointer_test.h b/containers_cpp/test/hazard_pointer_test.h index f6631cd..fe18def 100644 --- a/containers_cpp/test/hazard_pointer_test.h +++ b/containers_cpp/test/hazard_pointer_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/main.cc b/containers_cpp/test/main.cc index e4cb128..d21dede 100644 --- a/containers_cpp/test/main.cc +++ b/containers_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/object_pool_test-inl.h b/containers_cpp/test/object_pool_test-inl.h index db340b2..cafe7e7 100644 --- a/containers_cpp/test/object_pool_test-inl.h +++ b/containers_cpp/test/object_pool_test-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/object_pool_test.cc b/containers_cpp/test/object_pool_test.cc index ccc91ac..6425154 100644 --- a/containers_cpp/test/object_pool_test.cc +++ b/containers_cpp/test/object_pool_test.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/object_pool_test.h b/containers_cpp/test/object_pool_test.h index 4c5c177..92fb9e8 100644 --- a/containers_cpp/test/object_pool_test.h +++ b/containers_cpp/test/object_pool_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/pool_test-inl.h b/containers_cpp/test/pool_test-inl.h index 70efb60..3208775 100644 --- a/containers_cpp/test/pool_test-inl.h +++ b/containers_cpp/test/pool_test-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/pool_test.h b/containers_cpp/test/pool_test.h index 16fcbd9..63c1586 100644 --- a/containers_cpp/test/pool_test.h +++ b/containers_cpp/test/pool_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/queue_test-inl.h b/containers_cpp/test/queue_test-inl.h index 3e63930..ac96b48 100644 --- a/containers_cpp/test/queue_test-inl.h +++ b/containers_cpp/test/queue_test-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/queue_test.h b/containers_cpp/test/queue_test.h index 22b7381..95a1585 100644 --- a/containers_cpp/test/queue_test.h +++ b/containers_cpp/test/queue_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/stack_test-inl.h b/containers_cpp/test/stack_test-inl.h index 6e82d4d..18ef724 100644 --- a/containers_cpp/test/stack_test-inl.h +++ b/containers_cpp/test/stack_test-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/dataflow.h b/dataflow_cpp/include/embb/dataflow/dataflow.h index 376206f..73d6151 100644 --- a/dataflow_cpp/include/embb/dataflow/dataflow.h +++ b/dataflow_cpp/include/embb/dataflow/dataflow.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/action.h b/dataflow_cpp/include/embb/dataflow/internal/action.h index dba3ca8..61f4cfa 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/action.h +++ b/dataflow_cpp/include/embb/dataflow/internal/action.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h index 5234740..deff2fc 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h +++ b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h index 4ec14af..cb09293 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index 60b4024..666146b 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 7fc87b6..211fdb5 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index ab47fee..55c5526 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/out.h b/dataflow_cpp/include/embb/dataflow/internal/out.h index 9c2f1a1..d81dae0 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/out.h +++ b/dataflow_cpp/include/embb/dataflow/internal/out.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/outputs.h b/dataflow_cpp/include/embb/dataflow/internal/outputs.h index cf926b0..9710501 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/outputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/outputs.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index e6f001a..4f6ea3e 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h index 4219cea..6020417 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler.h index 5770217..9f86e96 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 9d519ad..9d26bfc 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h index 919a3a3..575fea3 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index e184e2b..85b288b 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/signal.h b/dataflow_cpp/include/embb/dataflow/internal/signal.h index dde39cc..4931681 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/signal.h +++ b/dataflow_cpp/include/embb/dataflow/internal/signal.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index 2c835ed..7b76c92 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h b/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h index 447602d..75bf604 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink_executor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/source.h b/dataflow_cpp/include/embb/dataflow/internal/source.h index b6a0f6f..67bd37f 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h index 98a5a1e..bf26ae0 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 0015ad9..caecc20 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/tuple.h b/dataflow_cpp/include/embb/dataflow/internal/tuple.h index f03f9ff..c5f7981 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/tuple.h +++ b/dataflow_cpp/include/embb/dataflow/internal/tuple.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/internal/typelist.h b/dataflow_cpp/include/embb/dataflow/internal/typelist.h index 4c25272..a193909 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/typelist.h +++ b/dataflow_cpp/include/embb/dataflow/internal/typelist.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 33dbaff..94a2e1a 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/src/node.cc b/dataflow_cpp/src/node.cc index 55b91c7..cc5e031 100644 --- a/dataflow_cpp/src/node.cc +++ b/dataflow_cpp/src/node.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index cf50d3a..20ac9b3 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.h b/dataflow_cpp/test/dataflow_cpp_test_simple.h index b1ffea9..d4fc9c1 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.h +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/test/dataflow_cpp_test_tuple.cc b/dataflow_cpp/test/dataflow_cpp_test_tuple.cc index 0d54432..640b37f 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_tuple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_tuple.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/test/dataflow_cpp_test_tuple.h b/dataflow_cpp/test/dataflow_cpp_test_tuple.h index 31bc3bb..3013d50 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_tuple.h +++ b/dataflow_cpp/test/dataflow_cpp_test_tuple.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/dataflow_cpp/test/main.cc b/dataflow_cpp/test/main.cc index 0db1d7c..7e09ac1 100644 --- a/dataflow_cpp/test/main.cc +++ b/dataflow_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/counting/count-snippet.h b/doc/examples/algorithms/counting/count-snippet.h index 9b3191d..d14f295 100644 --- a/doc/examples/algorithms/counting/count-snippet.h +++ b/doc/examples/algorithms/counting/count-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::iterator_traits::difference_type count; using embb::algorithms::Count; count = Count(range, range + 8, 1); diff --git a/doc/examples/algorithms/counting/count_if-snippet.h b/doc/examples/algorithms/counting/count_if-snippet.h index 68806e8..e1b9d1c 100644 --- a/doc/examples/algorithms/counting/count_if-snippet.h +++ b/doc/examples/algorithms/counting/count_if-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::CountIf; count = CountIf(range, range + 8, [](const int& value) -> bool { return value > 0; }); diff --git a/doc/examples/algorithms/counting/counting-fragmented.cc b/doc/examples/algorithms/counting/counting-fragmented.cc index a621d8b..63a4846 100644 --- a/doc/examples/algorithms/counting/counting-fragmented.cc +++ b/doc/examples/algorithms/counting/counting-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/counting/setup-snippet.h b/doc/examples/algorithms/counting/setup-snippet.h index f488cbd..42fdffc 100644 --- a/doc/examples/algorithms/counting/setup-snippet.h +++ b/doc/examples/algorithms/counting/setup-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int range[] = {0, 3, 2, 0, 1, 1, 3, 2}; diff --git a/doc/examples/algorithms/for_each/doubling-snippet.h b/doc/examples/algorithms/for_each/doubling-snippet.h index 9d16397..891ba47 100644 --- a/doc/examples/algorithms/for_each/doubling-snippet.h +++ b/doc/examples/algorithms/for_each/doubling-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::ForEach; ForEach(range.begin(), range.end(), [] (int& to_double) { to_double *= 2; }); diff --git a/doc/examples/algorithms/for_each/doubling_zip-snippet.h b/doc/examples/algorithms/for_each/doubling_zip-snippet.h index 0e5ccc4..3d0788d 100644 --- a/doc/examples/algorithms/for_each/doubling_zip-snippet.h +++ b/doc/examples/algorithms/for_each/doubling_zip-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::Zip; using embb::algorithms::ZipPair; ForEach(Zip(input_range.begin(), output_range.begin()), diff --git a/doc/examples/algorithms/for_each/for_each-fragmented.cc b/doc/examples/algorithms/for_each/for_each-fragmented.cc index ab80a0c..99aeea4 100644 --- a/doc/examples/algorithms/for_each/for_each-fragmented.cc +++ b/doc/examples/algorithms/for_each/for_each-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/for_each/setup_zip-snippet.h b/doc/examples/algorithms/for_each/setup_zip-snippet.h index 311fb4b..9a3557f 100644 --- a/doc/examples/algorithms/for_each/setup_zip-snippet.h +++ b/doc/examples/algorithms/for_each/setup_zip-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector input_range(5); for (size_t i=0; i < input_range.size(); i++) { input_range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/invoke/invocation-snippet.h b/doc/examples/algorithms/invoke/invocation-snippet.h index 2b27930..29a36a8 100644 --- a/doc/examples/algorithms/invoke/invocation-snippet.h +++ b/doc/examples/algorithms/invoke/invocation-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::Invoke; Invoke(WorkPackageA, WorkPackageB, WorkPackageC); diff --git a/doc/examples/algorithms/invoke/invoke-fragmented.cc b/doc/examples/algorithms/invoke/invoke-fragmented.cc index 94cddd2..925dbaa 100644 --- a/doc/examples/algorithms/invoke/invoke-fragmented.cc +++ b/doc/examples/algorithms/invoke/invoke-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/invoke/packages-snippet.h b/doc/examples/algorithms/invoke/packages-snippet.h index 743db1d..c58ecdc 100644 --- a/doc/examples/algorithms/invoke/packages-snippet.h +++ b/doc/examples/algorithms/invoke/packages-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void WorkPackageA(); void WorkPackageB(); void WorkPackageC(); diff --git a/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h b/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h index f518853..28f7dba 100644 --- a/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h +++ b/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void ParallelQuickSort(int* first, int* last) { if (last - first <= 1) return; int* mid = Partition(first, last); diff --git a/doc/examples/algorithms/invoke/quick_sort-snippet.h b/doc/examples/algorithms/invoke/quick_sort-snippet.h index 9d33c89..ae2e7d4 100644 --- a/doc/examples/algorithms/invoke/quick_sort-snippet.h +++ b/doc/examples/algorithms/invoke/quick_sort-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void QuickSort(int* first, int* last) { if (last - first <= 1) return; int* mid = Partition(first, last); diff --git a/doc/examples/algorithms/reduce/dot_product-snippet.h b/doc/examples/algorithms/reduce/dot_product-snippet.h index 8d6bbf2..f759f25 100644 --- a/doc/examples/algorithms/reduce/dot_product-snippet.h +++ b/doc/examples/algorithms/reduce/dot_product-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::Zip; using embb::algorithms::ZipPair; int dot_product = Reduce(Zip(range.begin(), second_range.begin()), diff --git a/doc/examples/algorithms/reduce/parallel-snippet.h b/doc/examples/algorithms/reduce/parallel-snippet.h index b28ad55..3efd4a0 100644 --- a/doc/examples/algorithms/reduce/parallel-snippet.h +++ b/doc/examples/algorithms/reduce/parallel-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::Reduce; sum = Reduce(range.begin(), range.end(), 0, std::plus()); diff --git a/doc/examples/algorithms/reduce/range_init-snippet.h b/doc/examples/algorithms/reduce/range_init-snippet.h index e3a3ee3..0c70054 100644 --- a/doc/examples/algorithms/reduce/range_init-snippet.h +++ b/doc/examples/algorithms/reduce/range_init-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector range(5); for (size_t i = 0; i < range.size(); i++) { range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/reduce/reduce-fragmented.cc b/doc/examples/algorithms/reduce/reduce-fragmented.cc index 4c9f1df..5fad70c 100644 --- a/doc/examples/algorithms/reduce/reduce-fragmented.cc +++ b/doc/examples/algorithms/reduce/reduce-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/reduce/second_range_init-snippet.h b/doc/examples/algorithms/reduce/second_range_init-snippet.h index 0c1f44e..42ea3e0 100644 --- a/doc/examples/algorithms/reduce/second_range_init-snippet.h +++ b/doc/examples/algorithms/reduce/second_range_init-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector second_range(5); for (size_t i = 0; i < range.size(); i++) { second_range[i] = static_cast(i) + 5; diff --git a/doc/examples/algorithms/reduce/sequential-snippet.h b/doc/examples/algorithms/reduce/sequential-snippet.h index c5cca02..7fa639c 100644 --- a/doc/examples/algorithms/reduce/sequential-snippet.h +++ b/doc/examples/algorithms/reduce/sequential-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int sum = 0; for (size_t i = 0; i < range.size(); i++) { sum += range[i]; diff --git a/doc/examples/algorithms/scan/prefix_sum-snippet.h b/doc/examples/algorithms/scan/prefix_sum-snippet.h index 38fae7d..e5ec3d7 100644 --- a/doc/examples/algorithms/scan/prefix_sum-snippet.h +++ b/doc/examples/algorithms/scan/prefix_sum-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::Scan; Scan(input_range.begin(), input_range.end(), output_range.begin(), 0, std::plus()); diff --git a/doc/examples/algorithms/scan/scan-fragmented.cc b/doc/examples/algorithms/scan/scan-fragmented.cc index 3a9c1d3..cf1e84f 100644 --- a/doc/examples/algorithms/scan/scan-fragmented.cc +++ b/doc/examples/algorithms/scan/scan-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h b/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h index 4f42a55..f975a68 100644 --- a/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h +++ b/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector output_range(input_range.size()); output_range[0] = input_range[0]; for(size_t i = 1; i < input_range.size(); i++) { diff --git a/doc/examples/algorithms/scan/setup-snippet.h b/doc/examples/algorithms/scan/setup-snippet.h index 56c9517..08e2678 100644 --- a/doc/examples/algorithms/scan/setup-snippet.h +++ b/doc/examples/algorithms/scan/setup-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector input_range(5); for (size_t i = 0; i < input_range.size(); i++) { input_range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h b/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h index 7f12c05..62065d7 100644 --- a/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h +++ b/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::MergeSort; std::vector temporary_range(range.size()); MergeSort(range.begin(), range.end(), temporary_range.begin()); diff --git a/doc/examples/algorithms/sorting/quick_sort-snippet.h b/doc/examples/algorithms/sorting/quick_sort-snippet.h index a8eeb9b..4409302 100644 --- a/doc/examples/algorithms/sorting/quick_sort-snippet.h +++ b/doc/examples/algorithms/sorting/quick_sort-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + using embb::algorithms::QuickSort; QuickSort(range.begin(), range.end()); diff --git a/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h b/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h index d33307d..6a182e3 100644 --- a/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h +++ b/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + QuickSort(range.begin(), range.end(), std::greater()); diff --git a/doc/examples/algorithms/sorting/range_define-snippet.h b/doc/examples/algorithms/sorting/range_define-snippet.h index f9eb29e..cd31890 100644 --- a/doc/examples/algorithms/sorting/range_define-snippet.h +++ b/doc/examples/algorithms/sorting/range_define-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector range; diff --git a/doc/examples/algorithms/sorting/sorting-fragmented.cc b/doc/examples/algorithms/sorting/sorting-fragmented.cc index 36cb1ed..5872b63 100644 --- a/doc/examples/algorithms/sorting/sorting-fragmented.cc +++ b/doc/examples/algorithms/sorting/sorting-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/containers/object_pool-fragmented.cc b/doc/examples/containers/object_pool-fragmented.cc index fb7ee1b..2be5dd5 100644 --- a/doc/examples/containers/object_pool-fragmented.cc +++ b/doc/examples/containers/object_pool-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/containers/object_pool-snippet.h b/doc/examples/containers/object_pool-snippet.h index 15fe2b0..fe6552d 100644 --- a/doc/examples/containers/object_pool-snippet.h +++ b/doc/examples/containers/object_pool-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::containers::ObjectPool objPool(5); //@\label{lst:object_pool_lst1:line_create}@ int* alloc[5]; diff --git a/doc/examples/containers/object_pool_2-snippet.h b/doc/examples/containers/object_pool_2-snippet.h index db87c42..e346265 100644 --- a/doc/examples/containers/object_pool_2-snippet.h +++ b/doc/examples/containers/object_pool_2-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::containers::ObjectPool> objPool(5); //@\label{lst:object_pool_lst2:line_create}@ diff --git a/doc/examples/containers/queues-fragmented.cc b/doc/examples/containers/queues-fragmented.cc index 0b6eaff..89f3a73 100644 --- a/doc/examples/containers/queues-fragmented.cc +++ b/doc/examples/containers/queues-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/containers/queues-snippet.h b/doc/examples/containers/queues-snippet.h index 4e3a24b..16a186f 100644 --- a/doc/examples/containers/queues-snippet.h +++ b/doc/examples/containers/queues-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::containers::LockFreeMPMCQueue queue(10); //@\label{lst:queue_lst1:line_create}@ int i, j; diff --git a/doc/examples/containers/stack-fragmented.cc b/doc/examples/containers/stack-fragmented.cc index 31adda7..5da21d4 100644 --- a/doc/examples/containers/stack-fragmented.cc +++ b/doc/examples/containers/stack-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/containers/stack-snippet.h b/doc/examples/containers/stack-snippet.h index 057ebe5..29b8f3c 100644 --- a/doc/examples/containers/stack-snippet.h +++ b/doc/examples/containers/stack-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::containers::LockFreeStack stack(10); //@\label{lst:stack_lst1:line_create}@ int i, j; diff --git a/doc/examples/dataflow/dataflow_add-snippet.h b/doc/examples/dataflow/dataflow_add-snippet.h index ce51ef8..80db7a8 100644 --- a/doc/examples/dataflow/dataflow_add-snippet.h +++ b/doc/examples/dataflow/dataflow_add-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + nw.AddSource(read); diff --git a/doc/examples/dataflow/dataflow_comparator-snippet.h b/doc/examples/dataflow/dataflow_comparator-snippet.h index 3630f18..08cb559 100644 --- a/doc/examples/dataflow/dataflow_comparator-snippet.h +++ b/doc/examples/dataflow/dataflow_comparator-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + template class Comparator { public: diff --git a/doc/examples/dataflow/dataflow_connect-snippet.h b/doc/examples/dataflow/dataflow_connect-snippet.h index 7c7537e..69f126d 100644 --- a/doc/examples/dataflow/dataflow_connect-snippet.h +++ b/doc/examples/dataflow/dataflow_connect-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + read >> replace >> write; diff --git a/doc/examples/dataflow/dataflow_consumer-snippet.h b/doc/examples/dataflow/dataflow_consumer-snippet.h index eae4054..f51e681 100644 --- a/doc/examples/dataflow/dataflow_consumer-snippet.h +++ b/doc/examples/dataflow/dataflow_consumer-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + template class Consumer { public: diff --git a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h index f1cfcaa..bb32bf9 100644 --- a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + Producer producer1(1), producer2(2), diff --git a/doc/examples/dataflow/dataflow_declare_replace-snippet.h b/doc/examples/dataflow/dataflow_declare_replace-snippet.h index e230807..1c028a5 100644 --- a/doc/examples/dataflow/dataflow_declare_replace-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_replace-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + Network::ParallelProcess< Network::Inputs::Type, Network::Outputs::Type> replace( diff --git a/doc/examples/dataflow/dataflow_declare_sink-snippet.h b/doc/examples/dataflow/dataflow_declare_sink-snippet.h index dfdd6b2..a7aa85d 100644 --- a/doc/examples/dataflow/dataflow_declare_sink-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_sink-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + Network::Sink write( embb::base::MakeFunction(SinkFunction) ); diff --git a/doc/examples/dataflow/dataflow_declare_source-snippet.h b/doc/examples/dataflow/dataflow_declare_source-snippet.h index 470db74..b9b1b10 100644 --- a/doc/examples/dataflow/dataflow_declare_source-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_source-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + Network::Source read( embb::base::MakeFunction(SourceFunction) ); diff --git a/doc/examples/dataflow/dataflow_include-snippet.h b/doc/examples/dataflow/dataflow_include-snippet.h index ca47769..db95ea5 100644 --- a/doc/examples/dataflow/dataflow_include-snippet.h +++ b/doc/examples/dataflow/dataflow_include-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #include diff --git a/doc/examples/dataflow/dataflow_linear-fragmented.cc b/doc/examples/dataflow/dataflow_linear-fragmented.cc index 25bdacd..66c6fcc 100644 --- a/doc/examples/dataflow/dataflow_linear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_linear-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/dataflow/dataflow_network-snippet.h b/doc/examples/dataflow/dataflow_network-snippet.h index c13ebeb..39b6d67 100644 --- a/doc/examples/dataflow/dataflow_network-snippet.h +++ b/doc/examples/dataflow/dataflow_network-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + typedef embb::dataflow::Network<2> Network; static Network nw; diff --git a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc index e7f419d..e3e664a 100644 --- a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/dataflow/dataflow_producer-snippet.h b/doc/examples/dataflow/dataflow_producer-snippet.h index f76065c..20e4156 100644 --- a/doc/examples/dataflow/dataflow_producer-snippet.h +++ b/doc/examples/dataflow/dataflow_producer-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + template class Producer { public: diff --git a/doc/examples/dataflow/dataflow_replace_function-snippet.h b/doc/examples/dataflow/dataflow_replace_function-snippet.h index 21e71d9..bc5a311 100644 --- a/doc/examples/dataflow/dataflow_replace_function-snippet.h +++ b/doc/examples/dataflow/dataflow_replace_function-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void ReplaceFunction(std::string const & istr, std::string & ostr) { ostr = istr; repl(ostr, what, with); diff --git a/doc/examples/dataflow/dataflow_run-snippet.h b/doc/examples/dataflow/dataflow_run-snippet.h index ff4f083..d2d94ee 100644 --- a/doc/examples/dataflow/dataflow_run-snippet.h +++ b/doc/examples/dataflow/dataflow_run-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + nw(); diff --git a/doc/examples/dataflow/dataflow_sink_function-snippet.h b/doc/examples/dataflow/dataflow_sink_function-snippet.h index 66896ea..91d08e7 100644 --- a/doc/examples/dataflow/dataflow_sink_function-snippet.h +++ b/doc/examples/dataflow/dataflow_sink_function-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void SinkFunction(std::string const & str) { std::cout << str << std::endl; } diff --git a/doc/examples/dataflow/dataflow_source_function-snippet.h b/doc/examples/dataflow/dataflow_source_function-snippet.h index 1afc660..a8fe9d1 100644 --- a/doc/examples/dataflow/dataflow_source_function-snippet.h +++ b/doc/examples/dataflow/dataflow_source_function-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + bool SourceFunction(std::string & str) { if (!file.eof()) { std::getline(file, str); diff --git a/doc/examples/main.cc b/doc/examples/main.cc index 7888d4b..80b9c3c 100644 --- a/doc/examples/main.cc +++ b/doc/examples/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_c-fragmented.cc b/doc/examples/mtapi/mtapi_c-fragmented.cc index d543e12..735d30a 100644 --- a/doc/examples/mtapi/mtapi_c-fragmented.cc +++ b/doc/examples/mtapi/mtapi_c-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_c_action_signature-snippet.h b/doc/examples/mtapi/mtapi_c_action_signature-snippet.h index 80b8a4f..d04cf72 100644 --- a/doc/examples/mtapi/mtapi_c_action_signature-snippet.h +++ b/doc/examples/mtapi/mtapi_c_action_signature-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void fibonacciActionFunction( const void* args, mtapi_size_t arg_size, diff --git a/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h b/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h index 525f7be..8cb2304 100644 --- a/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h +++ b/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int b = n - 2; int y; fibonacciActionFunction( diff --git a/doc/examples/mtapi/mtapi_c_calc_task-snippet.h b/doc/examples/mtapi/mtapi_c_calc_task-snippet.h index 62b352a..cc84dba 100644 --- a/doc/examples/mtapi/mtapi_c_calc_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_calc_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int a = n - 1; int x; mtapi_task_hndl_t task = mtapi_task_start( diff --git a/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h b/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h index b1850d0..a95de9f 100644 --- a/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h +++ b/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #define THIS_DOMAIN_ID 1 #define THIS_NODE_ID 1 diff --git a/doc/examples/mtapi/mtapi_c_finalize-snippet.h b/doc/examples/mtapi/mtapi_c_finalize-snippet.h index 21c5bfa..4e54489 100644 --- a/doc/examples/mtapi/mtapi_c_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_c_finalize-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* delete action */ mtapi_action_delete(fibonacciAction, 100, &status); MTAPI_CHECK_STATUS(status); diff --git a/doc/examples/mtapi/mtapi_c_initialize-snippet.h b/doc/examples/mtapi/mtapi_c_initialize-snippet.h index 1269342..8e97e2e 100644 --- a/doc/examples/mtapi/mtapi_c_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_c_initialize-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_status_t status; /* initialize node attributes to default values */ diff --git a/doc/examples/mtapi/mtapi_c_network-fragmented.cc b/doc/examples/mtapi/mtapi_c_network-fragmented.cc index 777e74c..0cc5026 100644 --- a/doc/examples/mtapi/mtapi_c_network-fragmented.cc +++ b/doc/examples/mtapi/mtapi_c_network-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_c_opencl-fragmented.cc b/doc/examples/mtapi/mtapi_c_opencl-fragmented.cc index 074744a..ea0f67b 100644 --- a/doc/examples/mtapi/mtapi_c_opencl-fragmented.cc +++ b/doc/examples/mtapi/mtapi_c_opencl-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_c_plugin-fragmented.cc b/doc/examples/mtapi/mtapi_c_plugin-fragmented.cc index b072164..bbbcc70 100644 --- a/doc/examples/mtapi/mtapi_c_plugin-fragmented.cc +++ b/doc/examples/mtapi/mtapi_c_plugin-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h index 2ec43dd..ac2a54c 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + action = mtapi_ext_plugin_action_create( PLUGIN_JOB_ID, plugin_task_start, diff --git a/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h index 7c44e30..e1f8564 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void plugin_action_finalize( MTAPI_IN mtapi_action_hndl_t action, MTAPI_OUT mtapi_status_t* status diff --git a/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h index 9e97299..8246569 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + job = mtapi_job_get( PLUGIN_JOB_ID, PLUGIN_DOMAIN_ID, diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h index 2a62c5d..a63d4ff 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void plugin_task_cancel( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h index a180edc..6870f2a 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void plugin_task_schedule(embb_mtapi_task_t* local_task) { // here the task might be dispatched to some hardware or separate thread diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h index 344330a..99491b1 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + task = mtapi_task_start( MTAPI_TASK_ID_NONE, job, diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h index 8e4d063..e07da78 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void plugin_task_start( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { diff --git a/doc/examples/mtapi/mtapi_c_register_action-snippet.h b/doc/examples/mtapi/mtapi_c_register_action-snippet.h index a05aaa7..fac8e96 100644 --- a/doc/examples/mtapi/mtapi_c_register_action-snippet.h +++ b/doc/examples/mtapi/mtapi_c_register_action-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* create action */ mtapi_action_hndl_t fibonacciAction; fibonacciAction = mtapi_action_create( diff --git a/doc/examples/mtapi/mtapi_c_start_task-snippet.h b/doc/examples/mtapi/mtapi_c_start_task-snippet.h index 79d005e..37c9fdd 100644 --- a/doc/examples/mtapi/mtapi_c_start_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_start_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* start task */ int result; task = mtapi_task_start( diff --git a/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h b/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h index 44246ab..246f00f 100644 --- a/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h +++ b/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* check size of arguments (in this case we only expect one int value)*/ mtapi_status_t status; diff --git a/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h b/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h index 24e7630..bafb072 100644 --- a/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h +++ b/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* if the caller is not interested in results, result_buffer may be MTAPI_NULL. Of course, this depends on the application */ int* result = MTAPI_NULL; diff --git a/doc/examples/mtapi/mtapi_c_wait_task-snippet.h b/doc/examples/mtapi/mtapi_c_wait_task-snippet.h index 8c3e348..25934fc 100644 --- a/doc/examples/mtapi/mtapi_c_wait_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_wait_task-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_task_wait(task, MTAPI_INFINITE, &status); MTAPI_CHECK_STATUS(status); diff --git a/doc/examples/mtapi/mtapi_check_status-snippet.h b/doc/examples/mtapi/mtapi_check_status-snippet.h index bf1d1d3..786f461 100644 --- a/doc/examples/mtapi/mtapi_check_status-snippet.h +++ b/doc/examples/mtapi/mtapi_check_status-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #include #include #include diff --git a/doc/examples/mtapi/mtapi_cpp-fragmented.cc b/doc/examples/mtapi/mtapi_cpp-fragmented.cc index d211fd9..427039e 100644 --- a/doc/examples/mtapi/mtapi_cpp-fragmented.cc +++ b/doc/examples/mtapi/mtapi_cpp-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h index aad4e1e..10e4331 100644 --- a/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int a = n - 1; int x; embb::mtapi::Task task = node.Start(fibonacciJob, &a, &x); diff --git a/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h b/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h index 747609d..cca471b 100644 --- a/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #define THIS_DOMAIN_ID 1 #define THIS_NODE_ID 1 diff --git a/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h b/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h index 5061b36..ead681d 100644 --- a/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* finalize the node */ embb::mtapi::Node::Finalize(); diff --git a/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h b/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h index b91d187..429365a 100644 --- a/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::mtapi::Node& node = embb::mtapi::Node::GetInstance(); diff --git a/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h b/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h index 859b55a..22add40 100644 --- a/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* initialize the node with default attributes */ embb::mtapi::Node::Initialize(THIS_DOMAIN_ID, THIS_NODE_ID); diff --git a/doc/examples/mtapi/mtapi_cpp_main-snippet.h b/doc/examples/mtapi/mtapi_cpp_main-snippet.h index 582850a..f24bec4 100644 --- a/doc/examples/mtapi/mtapi_cpp_main-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_main-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + EMBB_TRY { int result = fibonacci(6); std::cout << "result: " << result << std::endl; diff --git a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h index beeea5a..fd2dfe9 100644 --- a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* create action */ embb::mtapi::Action fibonacciAction( FIBONACCI_JOB, /* action ID, defined by the diff --git a/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h index cf1f908..3431de0 100644 --- a/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int result; embb::mtapi::Task task = node.Start(fibonacciJob, &n, &result); diff --git a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h index 9f1f9d7..ffb4115 100644 --- a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_status_t status = task.Wait(MTAPI_INFINITE); if (status != MTAPI_SUCCESS) { printf("task failed with error: %d\n\n", status); diff --git a/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h b/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h index 9f56102..5e73ccd 100644 --- a/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + static void AddVectorAction( void const * arguments, mtapi_size_t arguments_size, diff --git a/doc/examples/mtapi/mtapi_network_c_header-snippet.h b/doc/examples/mtapi/mtapi_network_c_header-snippet.h index c052390..ea19d49 100644 --- a/doc/examples/mtapi/mtapi_network_c_header-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_header-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #include diff --git a/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h b/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h index c057151..a8fbe93 100644 --- a/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + network_action = mtapi_network_action_create( NETWORK_DOMAIN, NETWORK_LOCAL_JOB, diff --git a/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h b/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h index 74d49f3..c783f33 100644 --- a/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_network_plugin_finalize(&status); diff --git a/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h b/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h index b7cc83b..4f22a13 100644 --- a/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_network_plugin_initialize("127.0.0.1", 12345, 5, kElements * 4 * 3 + 32, &status); diff --git a/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h b/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h index 31fa6ac..973c291 100644 --- a/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + float node_remote = 1.0f; local_action = mtapi_action_create( NETWORK_REMOTE_JOB, diff --git a/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h index c3927a4..f48468d 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + float node_local = 1.0f; action = mtapi_opencl_action_create( OPENCL_JOB, diff --git a/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h index 1d3a916..c18576d 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + #include diff --git a/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h index cfd3e99..c21b050 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + const char * kernel = "__kernel void AddVector(\n" " __global void* arguments,\n" diff --git a/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h index 8689937..5bd01b4 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_opencl_plugin_finalize(&status); diff --git a/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h index c8106fc..05f901b 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_opencl_plugin_initialize(&status); diff --git a/doc/examples/mtapi/mtapi_terminating_condition-snippet.h b/doc/examples/mtapi/mtapi_terminating_condition-snippet.h index 7112b48..1718f2a 100644 --- a/doc/examples/mtapi/mtapi_terminating_condition-snippet.h +++ b/doc/examples/mtapi/mtapi_terminating_condition-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + if (n < 2) { *result = n; } else { diff --git a/doc/examples/mtapi/mtapi_write_back-snippet.h b/doc/examples/mtapi/mtapi_write_back-snippet.h index bca08c7..03254fc 100644 --- a/doc/examples/mtapi/mtapi_write_back-snippet.h +++ b/doc/examples/mtapi/mtapi_write_back-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + *result = x + y; } } diff --git a/doc/examples/stl_for_each/function-snippet.h b/doc/examples/stl_for_each/function-snippet.h index d870d31..6371b44 100644 --- a/doc/examples/stl_for_each/function-snippet.h +++ b/doc/examples/stl_for_each/function-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::for_each(range.begin(), range.end(), &DoubleFunction); diff --git a/doc/examples/stl_for_each/function_define-snippet.h b/doc/examples/stl_for_each/function_define-snippet.h index 0bb8d2b..a20bd68 100644 --- a/doc/examples/stl_for_each/function_define-snippet.h +++ b/doc/examples/stl_for_each/function_define-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void DoubleFunction(int& to_double) { to_double *= 2; } diff --git a/doc/examples/stl_for_each/functor-snippet.h b/doc/examples/stl_for_each/functor-snippet.h index e282b10..b7a52fd 100644 --- a/doc/examples/stl_for_each/functor-snippet.h +++ b/doc/examples/stl_for_each/functor-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::for_each(range.begin(), range.end(), DoubleFunctor()); diff --git a/doc/examples/stl_for_each/functor_define-snippet.h b/doc/examples/stl_for_each/functor_define-snippet.h index d5e34d1..7da7d08 100644 --- a/doc/examples/stl_for_each/functor_define-snippet.h +++ b/doc/examples/stl_for_each/functor_define-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + struct DoubleFunctor { void operator()(int& to_double) { to_double *= 2; diff --git a/doc/examples/stl_for_each/lambda-snippet.h b/doc/examples/stl_for_each/lambda-snippet.h index e8c545a..5094582 100644 --- a/doc/examples/stl_for_each/lambda-snippet.h +++ b/doc/examples/stl_for_each/lambda-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::for_each(range.begin(), range.end(), [] (int& to_double) { to_double *= 2; }); diff --git a/doc/examples/stl_for_each/manual-snippet.h b/doc/examples/stl_for_each/manual-snippet.h index 22b72cc..50965bb 100644 --- a/doc/examples/stl_for_each/manual-snippet.h +++ b/doc/examples/stl_for_each/manual-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + for (size_t i=0; i < range.size(); i++) { range[i] *= 2; } diff --git a/doc/examples/stl_for_each/setup-snippet.h b/doc/examples/stl_for_each/setup-snippet.h index 0e78cc8..fc24873 100644 --- a/doc/examples/stl_for_each/setup-snippet.h +++ b/doc/examples/stl_for_each/setup-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + std::vector range(5); for (size_t i=0; i < range.size(); i++) { range[i] = static_cast(i) + 1; diff --git a/doc/examples/stl_for_each/stl_for_each-fragmented.cc b/doc/examples/stl_for_each/stl_for_each-fragmented.cc index ecff00b..bd5aa21 100644 --- a/doc/examples/stl_for_each/stl_for_each-fragmented.cc +++ b/doc/examples/stl_for_each/stl_for_each-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/tasks/tasks_cpp-fragmented.cc b/doc/examples/tasks/tasks_cpp-fragmented.cc index 4e13885..5443760 100644 --- a/doc/examples/tasks/tasks_cpp-fragmented.cc +++ b/doc/examples/tasks/tasks_cpp-fragmented.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/examples/tasks/tasks_cpp_action_signature-snippet.h b/doc/examples/tasks/tasks_cpp_action_signature-snippet.h index 24aa989..d9bdbdf 100644 --- a/doc/examples/tasks/tasks_cpp_action_signature-snippet.h +++ b/doc/examples/tasks/tasks_cpp_action_signature-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + void fibonacciActionFunction( int n, int* result, diff --git a/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h b/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h index eb08e75..0a3683d 100644 --- a/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h +++ b/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int b = n - 2; int y; fibonacciActionFunction( diff --git a/doc/examples/tasks/tasks_cpp_calc_task-snippet.h b/doc/examples/tasks/tasks_cpp_calc_task-snippet.h index cfe5664..47d5bfc 100644 --- a/doc/examples/tasks/tasks_cpp_calc_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_calc_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int a = n - 1; int x; embb::tasks::Task task = node.Spawn( diff --git a/doc/examples/tasks/tasks_cpp_get_node-snippet.h b/doc/examples/tasks/tasks_cpp_get_node-snippet.h index f644ec5..c40696d 100644 --- a/doc/examples/tasks/tasks_cpp_get_node-snippet.h +++ b/doc/examples/tasks/tasks_cpp_get_node-snippet.h @@ -1 +1,27 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + embb::tasks::Node& node = embb::tasks::Node::GetInstance(); diff --git a/doc/examples/tasks/tasks_cpp_start_task-snippet.h b/doc/examples/tasks/tasks_cpp_start_task-snippet.h index 507e634..35471a9 100644 --- a/doc/examples/tasks/tasks_cpp_start_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_start_task-snippet.h @@ -1,3 +1,29 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + int result; embb::tasks::Task task = node.Spawn( embb::base::Bind( diff --git a/doc/examples/tasks/tasks_cpp_wait_task-snippet.h b/doc/examples/tasks/tasks_cpp_wait_task-snippet.h index 21637fd..d683b42 100644 --- a/doc/examples/tasks/tasks_cpp_wait_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_wait_task-snippet.h @@ -1,2 +1,28 @@ +/* + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + mtapi_status_t status = task.Wait(MTAPI_INFINITE); MTAPI_CHECK_STATUS(status); diff --git a/mtapi_c/include/mtapi.h b/mtapi_c/include/mtapi.h index e25eb56..7ac0853 100644 --- a/mtapi_c/include/mtapi.h +++ b/mtapi_c/include/mtapi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_action_t.c b/mtapi_c/src/embb_mtapi_action_t.c index c062bdd..dff3606 100644 --- a/mtapi_c/src/embb_mtapi_action_t.c +++ b/mtapi_c/src/embb_mtapi_action_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_action_t.h b/mtapi_c/src/embb_mtapi_action_t.h index 0d6848f..7fd7533 100644 --- a/mtapi_c/src/embb_mtapi_action_t.h +++ b/mtapi_c/src/embb_mtapi_action_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_action_t_fwd.h b/mtapi_c/src/embb_mtapi_action_t_fwd.h index 27944d7..f8a4a66 100644 --- a/mtapi_c/src/embb_mtapi_action_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_action_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_alloc.c b/mtapi_c/src/embb_mtapi_alloc.c index 7a5d397..5b02614 100644 --- a/mtapi_c/src/embb_mtapi_alloc.c +++ b/mtapi_c/src/embb_mtapi_alloc.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_alloc.h b/mtapi_c/src/embb_mtapi_alloc.h index f5a2ec1..6644444 100644 --- a/mtapi_c/src/embb_mtapi_alloc.h +++ b/mtapi_c/src/embb_mtapi_alloc.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_attr.c b/mtapi_c/src/embb_mtapi_attr.c index ca05372..fc14074 100644 --- a/mtapi_c/src/embb_mtapi_attr.c +++ b/mtapi_c/src/embb_mtapi_attr.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_attr.h b/mtapi_c/src/embb_mtapi_attr.h index 46e4626..467ae09 100644 --- a/mtapi_c/src/embb_mtapi_attr.h +++ b/mtapi_c/src/embb_mtapi_attr.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_group_t.c b/mtapi_c/src/embb_mtapi_group_t.c index ed9c548..4702756 100644 --- a/mtapi_c/src/embb_mtapi_group_t.c +++ b/mtapi_c/src/embb_mtapi_group_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_group_t.h b/mtapi_c/src/embb_mtapi_group_t.h index 34ebe92..9bf2932 100644 --- a/mtapi_c/src/embb_mtapi_group_t.h +++ b/mtapi_c/src/embb_mtapi_group_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_group_t_fwd.h b/mtapi_c/src/embb_mtapi_group_t_fwd.h index 66233b3..6b40ec8 100644 --- a/mtapi_c/src/embb_mtapi_group_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_group_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_id_pool_t.c b/mtapi_c/src/embb_mtapi_id_pool_t.c index 0f10d96..37416e9 100644 --- a/mtapi_c/src/embb_mtapi_id_pool_t.c +++ b/mtapi_c/src/embb_mtapi_id_pool_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_id_pool_t.h b/mtapi_c/src/embb_mtapi_id_pool_t.h index 46b04fa..d3f2616 100644 --- a/mtapi_c/src/embb_mtapi_id_pool_t.h +++ b/mtapi_c/src/embb_mtapi_id_pool_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_job_t.c b/mtapi_c/src/embb_mtapi_job_t.c index 227666e..3908991 100644 --- a/mtapi_c/src/embb_mtapi_job_t.c +++ b/mtapi_c/src/embb_mtapi_job_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_job_t.h b/mtapi_c/src/embb_mtapi_job_t.h index 9e2ec88..0ca4d47 100644 --- a/mtapi_c/src/embb_mtapi_job_t.h +++ b/mtapi_c/src/embb_mtapi_job_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_job_t_fwd.h b/mtapi_c/src/embb_mtapi_job_t_fwd.h index c986a86..1e1bc21 100644 --- a/mtapi_c/src/embb_mtapi_job_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_job_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_log.h b/mtapi_c/src/embb_mtapi_log.h index 8f98eaf..00a521a 100644 --- a/mtapi_c/src/embb_mtapi_log.h +++ b/mtapi_c/src/embb_mtapi_log.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index 9f60cd8..9b1d2d3 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_node_t.h b/mtapi_c/src/embb_mtapi_node_t.h index 22fca86..be16101 100644 --- a/mtapi_c/src/embb_mtapi_node_t.h +++ b/mtapi_c/src/embb_mtapi_node_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_node_t_fwd.h b/mtapi_c/src/embb_mtapi_node_t_fwd.h index 78ee823..f9a7e19 100644 --- a/mtapi_c/src/embb_mtapi_node_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_node_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_pool_template-inl.h b/mtapi_c/src/embb_mtapi_pool_template-inl.h index 5366972..75b607b 100644 --- a/mtapi_c/src/embb_mtapi_pool_template-inl.h +++ b/mtapi_c/src/embb_mtapi_pool_template-inl.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_pool_template.h b/mtapi_c/src/embb_mtapi_pool_template.h index 1bace62..088eeaf 100644 --- a/mtapi_c/src/embb_mtapi_pool_template.h +++ b/mtapi_c/src/embb_mtapi_pool_template.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_queue_t.c b/mtapi_c/src/embb_mtapi_queue_t.c index 8288dab..1a32406 100644 --- a/mtapi_c/src/embb_mtapi_queue_t.c +++ b/mtapi_c/src/embb_mtapi_queue_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_queue_t.h b/mtapi_c/src/embb_mtapi_queue_t.h index 37ae3fd..1f3fc35 100644 --- a/mtapi_c/src/embb_mtapi_queue_t.h +++ b/mtapi_c/src/embb_mtapi_queue_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_queue_t_fwd.h b/mtapi_c/src/embb_mtapi_queue_t_fwd.h index 0fb3824..23c49f4 100644 --- a/mtapi_c/src/embb_mtapi_queue_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_queue_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.c b/mtapi_c/src/embb_mtapi_scheduler_t.c index 326563b..1d124e8 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.c +++ b/mtapi_c/src/embb_mtapi_scheduler_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.h b/mtapi_c/src/embb_mtapi_scheduler_t.h index 9b340d2..ac94a0d 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.h +++ b/mtapi_c/src/embb_mtapi_scheduler_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h b/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h index 454c471..09fab76 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_scheduler_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_context_t.c b/mtapi_c/src/embb_mtapi_task_context_t.c index 4742297..9ca279a 100644 --- a/mtapi_c/src/embb_mtapi_task_context_t.c +++ b/mtapi_c/src/embb_mtapi_task_context_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_context_t.h b/mtapi_c/src/embb_mtapi_task_context_t.h index 8763b44..26f33f6 100644 --- a/mtapi_c/src/embb_mtapi_task_context_t.h +++ b/mtapi_c/src/embb_mtapi_task_context_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_context_t_fwd.h b/mtapi_c/src/embb_mtapi_task_context_t_fwd.h index 0ecfb4e..a7c2b42 100644 --- a/mtapi_c/src/embb_mtapi_task_context_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_task_context_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_queue_t.c b/mtapi_c/src/embb_mtapi_task_queue_t.c index 130cda5..8bb9f7f 100644 --- a/mtapi_c/src/embb_mtapi_task_queue_t.c +++ b/mtapi_c/src/embb_mtapi_task_queue_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_queue_t.h b/mtapi_c/src/embb_mtapi_task_queue_t.h index 7041db1..10df771 100644 --- a/mtapi_c/src/embb_mtapi_task_queue_t.h +++ b/mtapi_c/src/embb_mtapi_task_queue_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h b/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h index f313556..5ad9b0d 100644 --- a/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_task_queue_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_t.c b/mtapi_c/src/embb_mtapi_task_t.c index d59731c..4323a13 100644 --- a/mtapi_c/src/embb_mtapi_task_t.c +++ b/mtapi_c/src/embb_mtapi_task_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_t.h b/mtapi_c/src/embb_mtapi_task_t.h index be47d6c..2abf41c 100644 --- a/mtapi_c/src/embb_mtapi_task_t.h +++ b/mtapi_c/src/embb_mtapi_task_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_t_fwd.h b/mtapi_c/src/embb_mtapi_task_t_fwd.h index f44bba4..3c3f170 100644 --- a/mtapi_c/src/embb_mtapi_task_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_task_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_task_visitor_function_t.h b/mtapi_c/src/embb_mtapi_task_visitor_function_t.h index 54d2b8c..ee2b3e4 100644 --- a/mtapi_c/src/embb_mtapi_task_visitor_function_t.h +++ b/mtapi_c/src/embb_mtapi_task_visitor_function_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.c b/mtapi_c/src/embb_mtapi_thread_context_t.c index 2a7bdc4..a8745f8 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.c +++ b/mtapi_c/src/embb_mtapi_thread_context_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.h b/mtapi_c/src/embb_mtapi_thread_context_t.h index a207886..9fa588f 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.h +++ b/mtapi_c/src/embb_mtapi_thread_context_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h b/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h index dc19293..cc05d15 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h +++ b/mtapi_c/src/embb_mtapi_thread_context_t_fwd.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_action_attributes_t.c b/mtapi_c/src/mtapi_action_attributes_t.c index 9cbbfce..e5db243 100644 --- a/mtapi_c/src/mtapi_action_attributes_t.c +++ b/mtapi_c/src/mtapi_action_attributes_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_affinity_t.c b/mtapi_c/src/mtapi_affinity_t.c index cfb0b9f..3705a4b 100644 --- a/mtapi_c/src/mtapi_affinity_t.c +++ b/mtapi_c/src/mtapi_affinity_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_group_attributes_t.c b/mtapi_c/src/mtapi_group_attributes_t.c index 5342bcd..c41d45c 100644 --- a/mtapi_c/src/mtapi_group_attributes_t.c +++ b/mtapi_c/src/mtapi_group_attributes_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_node_attributes_t.c b/mtapi_c/src/mtapi_node_attributes_t.c index 53ebf4c..18ed2c5 100644 --- a/mtapi_c/src/mtapi_node_attributes_t.c +++ b/mtapi_c/src/mtapi_node_attributes_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_queue_attributes_t.c b/mtapi_c/src/mtapi_queue_attributes_t.c index 6f39b0c..f41fe3c 100644 --- a/mtapi_c/src/mtapi_queue_attributes_t.c +++ b/mtapi_c/src/mtapi_queue_attributes_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_status_t.h b/mtapi_c/src/mtapi_status_t.h index 39fe780..c7f3c98 100644 --- a/mtapi_c/src/mtapi_status_t.h +++ b/mtapi_c/src/mtapi_status_t.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/src/mtapi_task_attributes_t.c b/mtapi_c/src/mtapi_task_attributes_t.c index 43d9004..135b948 100644 --- a/mtapi_c/src/mtapi_task_attributes_t.c +++ b/mtapi_c/src/mtapi_task_attributes_t.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_config.h b/mtapi_c/test/embb_mtapi_test_config.h index fb08d64..6577c16 100644 --- a/mtapi_c/test/embb_mtapi_test_config.h +++ b/mtapi_c/test/embb_mtapi_test_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_error.cc b/mtapi_c/test/embb_mtapi_test_error.cc index 6b3450a..d7d8d91 100644 --- a/mtapi_c/test/embb_mtapi_test_error.cc +++ b/mtapi_c/test/embb_mtapi_test_error.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_error.h b/mtapi_c/test/embb_mtapi_test_error.h index 3759bdd..3061bb9 100644 --- a/mtapi_c/test/embb_mtapi_test_error.h +++ b/mtapi_c/test/embb_mtapi_test_error.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_group.cc b/mtapi_c/test/embb_mtapi_test_group.cc index 37f17d9..445f9be 100644 --- a/mtapi_c/test/embb_mtapi_test_group.cc +++ b/mtapi_c/test/embb_mtapi_test_group.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_group.h b/mtapi_c/test/embb_mtapi_test_group.h index 578a34e..e6501d6 100644 --- a/mtapi_c/test/embb_mtapi_test_group.h +++ b/mtapi_c/test/embb_mtapi_test_group.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_id_pool.cc b/mtapi_c/test/embb_mtapi_test_id_pool.cc index f7c7855..0ba6e62 100644 --- a/mtapi_c/test/embb_mtapi_test_id_pool.cc +++ b/mtapi_c/test/embb_mtapi_test_id_pool.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_id_pool.h b/mtapi_c/test/embb_mtapi_test_id_pool.h index a85a284..626bb4f 100644 --- a/mtapi_c/test/embb_mtapi_test_id_pool.h +++ b/mtapi_c/test/embb_mtapi_test_id_pool.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_init_finalize.cc b/mtapi_c/test/embb_mtapi_test_init_finalize.cc index 710d6c1..226919f 100644 --- a/mtapi_c/test/embb_mtapi_test_init_finalize.cc +++ b/mtapi_c/test/embb_mtapi_test_init_finalize.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_init_finalize.h b/mtapi_c/test/embb_mtapi_test_init_finalize.h index 519ba18..974237c 100644 --- a/mtapi_c/test/embb_mtapi_test_init_finalize.h +++ b/mtapi_c/test/embb_mtapi_test_init_finalize.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_queue.cc b/mtapi_c/test/embb_mtapi_test_queue.cc index 08a0933..4de48f9 100644 --- a/mtapi_c/test/embb_mtapi_test_queue.cc +++ b/mtapi_c/test/embb_mtapi_test_queue.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_queue.h b/mtapi_c/test/embb_mtapi_test_queue.h index 1e123f9..91aea99 100644 --- a/mtapi_c/test/embb_mtapi_test_queue.h +++ b/mtapi_c/test/embb_mtapi_test_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_task.cc b/mtapi_c/test/embb_mtapi_test_task.cc index 9393ec5..9431862 100644 --- a/mtapi_c/test/embb_mtapi_test_task.cc +++ b/mtapi_c/test/embb_mtapi_test_task.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/embb_mtapi_test_task.h b/mtapi_c/test/embb_mtapi_test_task.h index 19ab8c8..bc379e7 100644 --- a/mtapi_c/test/embb_mtapi_test_task.h +++ b/mtapi_c/test/embb_mtapi_test_task.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_c/test/main.cc b/mtapi_c/test/main.cc index 85b2e57..6fb351e 100644 --- a/mtapi_c/test/main.cc +++ b/mtapi_c/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/action.h b/mtapi_cpp/include/embb/mtapi/action.h index 50f8d75..564ab49 100644 --- a/mtapi_cpp/include/embb/mtapi/action.h +++ b/mtapi_cpp/include/embb/mtapi/action.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/action_attributes.h b/mtapi_cpp/include/embb/mtapi/action_attributes.h index 70f798b..f4bbf4b 100644 --- a/mtapi_cpp/include/embb/mtapi/action_attributes.h +++ b/mtapi_cpp/include/embb/mtapi/action_attributes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/affinity.h b/mtapi_cpp/include/embb/mtapi/affinity.h index c2e0cfe..1496d48 100644 --- a/mtapi_cpp/include/embb/mtapi/affinity.h +++ b/mtapi_cpp/include/embb/mtapi/affinity.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/group.h b/mtapi_cpp/include/embb/mtapi/group.h index 8fefc53..6d47598 100644 --- a/mtapi_cpp/include/embb/mtapi/group.h +++ b/mtapi_cpp/include/embb/mtapi/group.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/group_attributes.h b/mtapi_cpp/include/embb/mtapi/group_attributes.h index 3f254f2..e77d661 100644 --- a/mtapi_cpp/include/embb/mtapi/group_attributes.h +++ b/mtapi_cpp/include/embb/mtapi/group_attributes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/internal/check_status.h b/mtapi_cpp/include/embb/mtapi/internal/check_status.h index 5176a4d..3a7b47a 100644 --- a/mtapi_cpp/include/embb/mtapi/internal/check_status.h +++ b/mtapi_cpp/include/embb/mtapi/internal/check_status.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/job.h b/mtapi_cpp/include/embb/mtapi/job.h index 50eeec9..7b4c0f9 100644 --- a/mtapi_cpp/include/embb/mtapi/job.h +++ b/mtapi_cpp/include/embb/mtapi/job.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/mtapi.h b/mtapi_cpp/include/embb/mtapi/mtapi.h index 8ceb6e9..35e6d26 100644 --- a/mtapi_cpp/include/embb/mtapi/mtapi.h +++ b/mtapi_cpp/include/embb/mtapi/mtapi.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/node.h b/mtapi_cpp/include/embb/mtapi/node.h index 071cfff..115e48c 100644 --- a/mtapi_cpp/include/embb/mtapi/node.h +++ b/mtapi_cpp/include/embb/mtapi/node.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/node_attributes.h b/mtapi_cpp/include/embb/mtapi/node_attributes.h index 1dc104e..ae03fa7 100644 --- a/mtapi_cpp/include/embb/mtapi/node_attributes.h +++ b/mtapi_cpp/include/embb/mtapi/node_attributes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/queue.h b/mtapi_cpp/include/embb/mtapi/queue.h index 43e957b..718fac3 100644 --- a/mtapi_cpp/include/embb/mtapi/queue.h +++ b/mtapi_cpp/include/embb/mtapi/queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/queue_attributes.h b/mtapi_cpp/include/embb/mtapi/queue_attributes.h index e5050b0..ee701d7 100644 --- a/mtapi_cpp/include/embb/mtapi/queue_attributes.h +++ b/mtapi_cpp/include/embb/mtapi/queue_attributes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/status_exception.h b/mtapi_cpp/include/embb/mtapi/status_exception.h index 5f1504b..95e7ad5 100644 --- a/mtapi_cpp/include/embb/mtapi/status_exception.h +++ b/mtapi_cpp/include/embb/mtapi/status_exception.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/task.h b/mtapi_cpp/include/embb/mtapi/task.h index 40f3aaf..eaacc0c 100644 --- a/mtapi_cpp/include/embb/mtapi/task.h +++ b/mtapi_cpp/include/embb/mtapi/task.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/task_attributes.h b/mtapi_cpp/include/embb/mtapi/task_attributes.h index e743279..7c16094 100644 --- a/mtapi_cpp/include/embb/mtapi/task_attributes.h +++ b/mtapi_cpp/include/embb/mtapi/task_attributes.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/include/embb/mtapi/task_context.h b/mtapi_cpp/include/embb/mtapi/task_context.h index 73df784..3b8982d 100644 --- a/mtapi_cpp/include/embb/mtapi/task_context.h +++ b/mtapi_cpp/include/embb/mtapi/task_context.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/src/check_status.cc b/mtapi_cpp/src/check_status.cc index 7af10ae..50c1c2d 100644 --- a/mtapi_cpp/src/check_status.cc +++ b/mtapi_cpp/src/check_status.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/src/node.cc b/mtapi_cpp/src/node.cc index 80e9406..9b77f2c 100644 --- a/mtapi_cpp/src/node.cc +++ b/mtapi_cpp/src/node.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/main.cc b/mtapi_cpp/test/main.cc index 4cd6b97..2e5d7f5 100644 --- a/mtapi_cpp/test/main.cc +++ b/mtapi_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_config.h b/mtapi_cpp/test/mtapi_cpp_test_config.h index 4b3c2d7..31c5f2c 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_config.h +++ b/mtapi_cpp/test/mtapi_cpp_test_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_group.cc b/mtapi_cpp/test/mtapi_cpp_test_group.cc index 610d58d..1378311 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_group.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_group.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_group.h b/mtapi_cpp/test/mtapi_cpp_test_group.h index 7a1cf2c..d80973f 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_group.h +++ b/mtapi_cpp/test/mtapi_cpp_test_group.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_queue.cc b/mtapi_cpp/test/mtapi_cpp_test_queue.cc index 91a8884..8e17abf 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_queue.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_queue.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_queue.h b/mtapi_cpp/test/mtapi_cpp_test_queue.h index 9659ae2..42c6c8e 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_queue.h +++ b/mtapi_cpp/test/mtapi_cpp_test_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_task.cc b/mtapi_cpp/test/mtapi_cpp_test_task.cc index b21ddf7..fa3de4e 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_task.cc +++ b/mtapi_cpp/test/mtapi_cpp_test_task.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/mtapi_cpp/test/mtapi_cpp_test_task.h b/mtapi_cpp/test/mtapi_cpp_test_task.h index f86b6fe..f40c3bd 100644 --- a/mtapi_cpp/test/mtapi_cpp_test_task.h +++ b/mtapi_cpp/test/mtapi_cpp_test_task.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/scripts/license.txt b/scripts/license.txt index e95756a..c4fd49d 100644 --- a/scripts/license.txt +++ b/scripts/license.txt @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/action.h b/tasks_cpp/include/embb/tasks/action.h index 34c22db..e034cbf 100644 --- a/tasks_cpp/include/embb/tasks/action.h +++ b/tasks_cpp/include/embb/tasks/action.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/continuation.h b/tasks_cpp/include/embb/tasks/continuation.h index 666df75..30c2922 100644 --- a/tasks_cpp/include/embb/tasks/continuation.h +++ b/tasks_cpp/include/embb/tasks/continuation.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/execution_policy.h b/tasks_cpp/include/embb/tasks/execution_policy.h index 8a9a019..5248900 100644 --- a/tasks_cpp/include/embb/tasks/execution_policy.h +++ b/tasks_cpp/include/embb/tasks/execution_policy.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/group.h b/tasks_cpp/include/embb/tasks/group.h index 039fe1d..700f09e 100644 --- a/tasks_cpp/include/embb/tasks/group.h +++ b/tasks_cpp/include/embb/tasks/group.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/internal/cmake_config.h.in b/tasks_cpp/include/embb/tasks/internal/cmake_config.h.in index 400139a..bb4ead5 100644 --- a/tasks_cpp/include/embb/tasks/internal/cmake_config.h.in +++ b/tasks_cpp/include/embb/tasks/internal/cmake_config.h.in @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/node.h b/tasks_cpp/include/embb/tasks/node.h index 94290cb..666cab1 100644 --- a/tasks_cpp/include/embb/tasks/node.h +++ b/tasks_cpp/include/embb/tasks/node.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/queue.h b/tasks_cpp/include/embb/tasks/queue.h index df9f303..a4f1479 100644 --- a/tasks_cpp/include/embb/tasks/queue.h +++ b/tasks_cpp/include/embb/tasks/queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/task.h b/tasks_cpp/include/embb/tasks/task.h index fd86b40..c78d6d1 100644 --- a/tasks_cpp/include/embb/tasks/task.h +++ b/tasks_cpp/include/embb/tasks/task.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/task_context.h b/tasks_cpp/include/embb/tasks/task_context.h index ecb416e..9aaa663 100644 --- a/tasks_cpp/include/embb/tasks/task_context.h +++ b/tasks_cpp/include/embb/tasks/task_context.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/include/embb/tasks/tasks.h b/tasks_cpp/include/embb/tasks/tasks.h index 11e8d12..bb3e3d5 100644 --- a/tasks_cpp/include/embb/tasks/tasks.h +++ b/tasks_cpp/include/embb/tasks/tasks.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/continuation.cc b/tasks_cpp/src/continuation.cc index 35b9d65..330fae3 100644 --- a/tasks_cpp/src/continuation.cc +++ b/tasks_cpp/src/continuation.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/continuationstage.h b/tasks_cpp/src/continuationstage.h index 9c1f5b0..79d260f 100644 --- a/tasks_cpp/src/continuationstage.h +++ b/tasks_cpp/src/continuationstage.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/execution_policy.cc b/tasks_cpp/src/execution_policy.cc index f2ec1b6..b7e9b96 100644 --- a/tasks_cpp/src/execution_policy.cc +++ b/tasks_cpp/src/execution_policy.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/group.cc b/tasks_cpp/src/group.cc index 709290f..04971a8 100644 --- a/tasks_cpp/src/group.cc +++ b/tasks_cpp/src/group.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index a3eef48..67a9425 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/queue.cc b/tasks_cpp/src/queue.cc index 098f379..efc574a 100644 --- a/tasks_cpp/src/queue.cc +++ b/tasks_cpp/src/queue.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/task.cc b/tasks_cpp/src/task.cc index eaba40d..518b637 100644 --- a/tasks_cpp/src/task.cc +++ b/tasks_cpp/src/task.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/src/task_context.cc b/tasks_cpp/src/task_context.cc index bba9312..f863715 100644 --- a/tasks_cpp/src/task_context.cc +++ b/tasks_cpp/src/task_context.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/main.cc b/tasks_cpp/test/main.cc index f46b112..2f17af7 100644 --- a/tasks_cpp/test/main.cc +++ b/tasks_cpp/test/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_config.h b/tasks_cpp/test/tasks_cpp_test_config.h index b7244c3..cae2208 100644 --- a/tasks_cpp/test/tasks_cpp_test_config.h +++ b/tasks_cpp/test/tasks_cpp_test_config.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_group.cc b/tasks_cpp/test/tasks_cpp_test_group.cc index 2e12fae..75cab3a 100644 --- a/tasks_cpp/test/tasks_cpp_test_group.cc +++ b/tasks_cpp/test/tasks_cpp_test_group.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_group.h b/tasks_cpp/test/tasks_cpp_test_group.h index cc6c4fe..fe212ea 100644 --- a/tasks_cpp/test/tasks_cpp_test_group.h +++ b/tasks_cpp/test/tasks_cpp_test_group.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_queue.cc b/tasks_cpp/test/tasks_cpp_test_queue.cc index 17514ca..eb6bc87 100644 --- a/tasks_cpp/test/tasks_cpp_test_queue.cc +++ b/tasks_cpp/test/tasks_cpp_test_queue.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_queue.h b/tasks_cpp/test/tasks_cpp_test_queue.h index 88770ca..5c86795 100644 --- a/tasks_cpp/test/tasks_cpp_test_queue.h +++ b/tasks_cpp/test/tasks_cpp_test_queue.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_task.cc b/tasks_cpp/test/tasks_cpp_test_task.cc index 1c51631..69c56db 100644 --- a/tasks_cpp/test/tasks_cpp_test_task.cc +++ b/tasks_cpp/test/tasks_cpp_test_task.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/tasks_cpp/test/tasks_cpp_test_task.h b/tasks_cpp/test/tasks_cpp_test_task.h index cbffac1..16f683b 100644 --- a/tasks_cpp/test/tasks_cpp_test_task.h +++ b/tasks_cpp/test/tasks_cpp_test_task.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: From 86c0dfd3079352ce25159566de2b4b801ee3d22b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 11:38:47 +0100 Subject: [PATCH 23/79] updated license in scripts and other files --- .travis.yml | 2 +- CMakeCommon/CheckEnableTests.cmake | 2 +- CMakeCommon/CopyInstallFiles.cmake | 2 +- CMakeCommon/CreateDoxygenDocumentationTarget.cmake | 2 +- CMakeCommon/GroupSourcesMSVC.cmake | 2 +- CMakeCommon/SetCompilerFlags.cmake | 2 +- CMakeCommon/SetInstallPaths.cmake | 2 +- CMakeLists.txt | 2 +- COPYING.md | 2 +- base_cpp/src/functionN.lua | 2 +- containers_cpp/test/stack_test.h | 2 +- doc/reference/Doxyfile.in | 2 +- scripts/create_tarball.sh | 2 +- scripts/insert_license.sh | 2 +- scripts/license_scripts.txt | 2 +- scripts/remove_license.sh | 2 +- scripts/run_cpplint.sh | 2 +- scripts/run_tests_cygwin.sh.cmake | 2 +- scripts/run_tests_unix.sh.cmake | 2 +- scripts/run_tests_windows.bat.cmake | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index bcf3c95..1a2db19 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # SPDX-License-Identifier: BSD-2-Clause language: cpp diff --git a/CMakeCommon/CheckEnableTests.cmake b/CMakeCommon/CheckEnableTests.cmake index 7a28984..1a58ee2 100644 --- a/CMakeCommon/CheckEnableTests.cmake +++ b/CMakeCommon/CheckEnableTests.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeCommon/CopyInstallFiles.cmake b/CMakeCommon/CopyInstallFiles.cmake index 321b62e..1ecf6b7 100644 --- a/CMakeCommon/CopyInstallFiles.cmake +++ b/CMakeCommon/CopyInstallFiles.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeCommon/CreateDoxygenDocumentationTarget.cmake b/CMakeCommon/CreateDoxygenDocumentationTarget.cmake index b8c2bbc..547a9b8 100644 --- a/CMakeCommon/CreateDoxygenDocumentationTarget.cmake +++ b/CMakeCommon/CreateDoxygenDocumentationTarget.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeCommon/GroupSourcesMSVC.cmake b/CMakeCommon/GroupSourcesMSVC.cmake index e74470b..b16748b 100644 --- a/CMakeCommon/GroupSourcesMSVC.cmake +++ b/CMakeCommon/GroupSourcesMSVC.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeCommon/SetCompilerFlags.cmake b/CMakeCommon/SetCompilerFlags.cmake index b43fc6f..9e18728 100644 --- a/CMakeCommon/SetCompilerFlags.cmake +++ b/CMakeCommon/SetCompilerFlags.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeCommon/SetInstallPaths.cmake b/CMakeCommon/SetInstallPaths.cmake index ae498bb..bd98c78 100644 --- a/CMakeCommon/SetInstallPaths.cmake +++ b/CMakeCommon/SetInstallPaths.cmake @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/CMakeLists.txt b/CMakeLists.txt index 75c30f5..048cb09 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/COPYING.md b/COPYING.md index b3afc05..3459f6f 100644 --- a/COPYING.md +++ b/COPYING.md @@ -13,7 +13,7 @@ license (see file include\embb\mtapi\c\mtapi.h). License ------- -Copyright (c) 2014-2015, Siemens AG. All rights reserved. +Copyright (c) 2014-2016, Siemens AG. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/base_cpp/src/functionN.lua b/base_cpp/src/functionN.lua index 8a311a8..5c62f91 100644 --- a/base_cpp/src/functionN.lua +++ b/base_cpp/src/functionN.lua @@ -1,4 +1,4 @@ --- Copyright (c) 2014-2015, Siemens AG. All rights reserved. +-- Copyright (c) 2014-2016, Siemens AG. All rights reserved. -- -- Redistribution and use in source and binary forms, with or without -- modification, are permitted provided that the following conditions are met: diff --git a/containers_cpp/test/stack_test.h b/containers_cpp/test/stack_test.h index 449ae7e..0ea801d 100644 --- a/containers_cpp/test/stack_test.h +++ b/containers_cpp/test/stack_test.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014-2015, Siemens AG. All rights reserved. + * Copyright (c) 2014-2016, Siemens AG. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: diff --git a/doc/reference/Doxyfile.in b/doc/reference/Doxyfile.in index d6e6ec1..c240844 100644 --- a/doc/reference/Doxyfile.in +++ b/doc/reference/Doxyfile.in @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/create_tarball.sh b/scripts/create_tarball.sh index a91846d..0088e8b 100755 --- a/scripts/create_tarball.sh +++ b/scripts/create_tarball.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/insert_license.sh b/scripts/insert_license.sh index 3239574..973f137 100755 --- a/scripts/insert_license.sh +++ b/scripts/insert_license.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/license_scripts.txt b/scripts/license_scripts.txt index f6c8ca4..800b0ac 100644 --- a/scripts/license_scripts.txt +++ b/scripts/license_scripts.txt @@ -1,4 +1,4 @@ -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/remove_license.sh b/scripts/remove_license.sh index a01d8d4..c1d08de 100755 --- a/scripts/remove_license.sh +++ b/scripts/remove_license.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/run_cpplint.sh b/scripts/run_cpplint.sh index eebfa59..cec5393 100755 --- a/scripts/run_cpplint.sh +++ b/scripts/run_cpplint.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/run_tests_cygwin.sh.cmake b/scripts/run_tests_cygwin.sh.cmake index 2fce866..fbbc568 100755 --- a/scripts/run_tests_cygwin.sh.cmake +++ b/scripts/run_tests_cygwin.sh.cmake @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/run_tests_unix.sh.cmake b/scripts/run_tests_unix.sh.cmake index b668b9b..70c591a 100755 --- a/scripts/run_tests_unix.sh.cmake +++ b/scripts/run_tests_unix.sh.cmake @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2014-2015, Siemens AG. All rights reserved. +# Copyright (c) 2014-2016, Siemens AG. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: diff --git a/scripts/run_tests_windows.bat.cmake b/scripts/run_tests_windows.bat.cmake index c3d4a44..a0a1d74 100644 --- a/scripts/run_tests_windows.bat.cmake +++ b/scripts/run_tests_windows.bat.cmake @@ -1,4 +1,4 @@ -:: Copyright (c) 2014-2015, Siemens AG. All rights reserved. +:: Copyright (c) 2014-2016, Siemens AG. All rights reserved. :: :: Redistribution and use in source and binary forms, with or without :: modification, are permitted provided that the following conditions are met: From f1752cf299326075a5b83d56cd92380d37717819 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 12:35:20 +0100 Subject: [PATCH 24/79] base_c: fixed codesonar warnings --- base_c/src/thread.c | 5 +++++ base_c/test/alloc_test.cc | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/base_c/src/thread.c b/base_c/src/thread.c index a3963aa..01240db 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -236,6 +236,11 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, /* Dynamic allocation of thread arguments. Freed on call of join. */ thread->embb_internal_arg = (embb_internal_thread_arg_t*) embb_alloc(sizeof(embb_internal_thread_arg_t)); + if (thread->embb_internal_arg == NULL) { + thread->embb_internal_handle = NULL; + pthread_attr_destroy(&attr); + return EMBB_NOMEM; + } thread->embb_internal_arg->func = func; thread->embb_internal_arg->arg = arg; diff --git a/base_c/test/alloc_test.cc b/base_c/test/alloc_test.cc index 3ddaf4a..06ee04b 100644 --- a/base_c/test/alloc_test.cc +++ b/base_c/test/alloc_test.cc @@ -152,6 +152,9 @@ void AllocTest::TestMixedAllocs() { void* plain = NULL; plain = embb_alloc(2); PT_EXPECT_NE(plain, static_cast(NULL)); + if (NULL == plain) { + return; + } allocated = embb_get_bytes_allocated(); #ifdef EMBB_DEBUG expected += 2 + 2*sizeof(size_t); @@ -162,6 +165,10 @@ void AllocTest::TestMixedAllocs() { void* aligned = NULL; aligned = embb_alloc_aligned(2*sizeof(void*), 2); PT_EXPECT_NE(aligned, static_cast(NULL)); + if (NULL == aligned) { + embb_free(plain); + return; + } allocated = embb_get_bytes_allocated(); #ifdef EMBB_DEBUG expected += (1 + 1) * 2 * sizeof(void*) + 3 * sizeof(size_t) - 1; @@ -172,6 +179,11 @@ void AllocTest::TestMixedAllocs() { void* cache_aligned = NULL; cache_aligned = embb_alloc_cache_aligned(2); PT_EXPECT_NE(cache_aligned, static_cast(NULL)); + if (NULL == aligned) { + embb_free(plain); + embb_free_aligned(aligned); + return; + } allocated = embb_get_bytes_allocated(); #ifdef EMBB_DEBUG expected += (1 + 1) * EMBB_PLATFORM_CACHE_LINE_SIZE + 3 * sizeof(size_t) - 1; From 5199016b0ec21af8f81575c01ca90485d92b3e5d Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 12:35:28 +0100 Subject: [PATCH 25/79] base_cpp: fixed codesonar warning --- base_cpp/test/log_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/base_cpp/test/log_test.cc b/base_cpp/test/log_test.cc index 6bafe2a..48e90d8 100644 --- a/base_cpp/test/log_test.cc +++ b/base_cpp/test/log_test.cc @@ -56,6 +56,7 @@ void LogTest::Test() { logged_message = null; Log::Trace("chn", test_msg); #ifdef EMBB_DEBUG + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [TRACE] hello")); #else PT_EXPECT_EQ(null, logged_message); @@ -63,15 +64,18 @@ void LogTest::Test() { logged_message = null; Log::Info("chn", test_msg); #ifdef EMBB_DEBUG + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [INFO ] hello")); #else PT_EXPECT_EQ(null, logged_message); #endif logged_message = null; Log::Warning("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); logged_message = null; Log::Error("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); Log::SetLogLevel(EMBB_LOG_LEVEL_INFO); @@ -81,15 +85,18 @@ void LogTest::Test() { logged_message = null; Log::Info("chn", test_msg); #ifdef EMBB_DEBUG + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [INFO ] hello")); #else PT_EXPECT_EQ(null, logged_message); #endif logged_message = null; Log::Warning("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); logged_message = null; Log::Error("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); Log::SetLogLevel(EMBB_LOG_LEVEL_WARNING); @@ -101,9 +108,11 @@ void LogTest::Test() { PT_EXPECT_EQ(null, logged_message); logged_message = null; Log::Warning("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); logged_message = null; Log::Error("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); Log::SetLogLevel(EMBB_LOG_LEVEL_ERROR); @@ -118,6 +127,7 @@ void LogTest::Test() { PT_EXPECT_EQ(null, logged_message); logged_message = null; Log::Error("chn", test_msg); + PT_ASSERT_NE(logged_message, null); PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); Log::SetLogLevel(EMBB_LOG_LEVEL_NONE); From 3ade37c68c2311505dfea4b0226ed54a4f10aef1 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 12:35:43 +0100 Subject: [PATCH 26/79] containers_cpp: fixed codesonar warning --- .../embb/containers/internal/wait_free_array_value_pool-inl.h | 1 + 1 file changed, 1 insertion(+) diff --git a/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h b/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h index 18ef996..2ed6ed1 100644 --- a/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/wait_free_array_value_pool-inl.h @@ -55,6 +55,7 @@ Allocate(Type & element) { return i; } } + element = Type(); return -1; } From 4e1ccfe4aee19c90f25ca4bf8ff8d05c0381a84e Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 13:01:26 +0100 Subject: [PATCH 27/79] base_c: fixed codesonar warning --- base_c/test/alloc_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_c/test/alloc_test.cc b/base_c/test/alloc_test.cc index 06ee04b..7336e39 100644 --- a/base_c/test/alloc_test.cc +++ b/base_c/test/alloc_test.cc @@ -179,7 +179,7 @@ void AllocTest::TestMixedAllocs() { void* cache_aligned = NULL; cache_aligned = embb_alloc_cache_aligned(2); PT_EXPECT_NE(cache_aligned, static_cast(NULL)); - if (NULL == aligned) { + if (NULL == cache_aligned) { embb_free(plain); embb_free_aligned(aligned); return; From d45dc69de1e60edf3c1418ef3b8a16060b531840 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 13:01:39 +0100 Subject: [PATCH 28/79] containers_cpp: fixed codesonar warnings --- .../embb/containers/internal/lock_free_tree_value_pool-inl.h | 5 ++++- containers_cpp/test/hazard_pointer_test.cc | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h index eedc22d..c808e79 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h @@ -113,14 +113,17 @@ allocate_rec(int node, Type& element) { int pool_index = NodeIndexToPoolIndex(node); Type expected = pool_[pool_index]; - if (expected == Undefined) + if (expected == Undefined) { + element = Type(); return -1; + } if (pool_[pool_index].CompareAndSwap(expected, Undefined)) { element = expected; return pool_index; } + element = Type(); return -1; } diff --git a/containers_cpp/test/hazard_pointer_test.cc b/containers_cpp/test/hazard_pointer_test.cc index c005149..b2d2baa 100644 --- a/containers_cpp/test/hazard_pointer_test.cc +++ b/containers_cpp/test/hazard_pointer_test.cc @@ -144,6 +144,7 @@ void HazardPointerTest::HazardPointerTest1ThreadMethod() { for (int i = 0; i != n_elements_per_thread_; ++i) { embb::base::Atomic* allocated_object = object_pool_->Allocate(0); + PT_ASSERT(NULL != allocated_object); hazard_pointer_->Guard(0, allocated_object); @@ -248,6 +249,7 @@ void HazardPointerTest2::HazardPointerTest2Master() { // while the hazard pointer guard array is not full int** allocatedLocal = static_cast( embb::base::Allocation::Allocate(sizeof(int*)*guaranteed_capacity_pool_)); + PT_ASSERT(NULL != allocatedLocal); bool full = false; while (!full) { @@ -295,16 +297,19 @@ void HazardPointerTest2::HazardPointerTest2Pre() { // first the test pool has to be created test_pool_ = embb::base::Allocation::New (pool_size_using_hazard_pointer_); + PT_ASSERT(NULL != test_pool_); // after the pool has been created, we create the hp class hazard_pointer_ = embb::base::Allocation::New < embb::containers::internal::HazardPointer > (delete_pointer_callback_, static_cast(NULL), static_cast(guards_per_phread_count_), n_threads); + PT_ASSERT(NULL != hazard_pointer_); shared_guarded_ = static_cast*>( embb::base::Allocation::Allocate(sizeof(embb::base::Atomic)* guaranteed_capacity_pool_)); + PT_ASSERT(NULL != shared_guarded_); for (unsigned int i = 0; i != guaranteed_capacity_pool_; ++i) { // in-place new for each array cell From 66d70fbfcf8e7edea3034465b598b76dba6eadeb Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 13:14:30 +0100 Subject: [PATCH 29/79] base_c: fixed codesonar warnings --- base_c/src/thread.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/base_c/src/thread.c b/base_c/src/thread.c index 01240db..dc26db5 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -80,7 +80,7 @@ void embb_thread_yield() { int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, embb_thread_start_t func, void *arg) { - assert(thread != NULL); + if (thread == NULL) return EMBB_ERROR; thread->embb_internal_arg = (embb_internal_thread_arg_t*) embb_alloc(sizeof(embb_internal_thread_arg_t)); if (thread->embb_internal_arg == NULL) { @@ -98,6 +98,8 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, 0, /* no creation arguments */ 0); /* no system thread ID */ if (thread->embb_internal_handle == NULL) { + embb_free(thread->embb_internal_arg); + thread->embb_internal_arg = NULL; return EMBB_ERROR; } @@ -121,6 +123,7 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, } int embb_thread_join(embb_thread_t* thread, int* result_code) { + if (thread == NULL) return EMBB_ERROR; BOOL success; DWORD result; result = WaitForSingleObject(thread->embb_internal_handle, INFINITE); @@ -206,6 +209,7 @@ void embb_thread_yield() { int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, embb_thread_start_t func, void* arg) { + if (thread == NULL) return EMBB_ERROR; pthread_attr_t attr; /* Used to set thread affinities */ int status = pthread_attr_init(&attr); if (status != 0) return EMBB_ERROR; @@ -226,7 +230,11 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, } } status = pthread_attr_setaffinity_np(&attr, sizeof(cpuset), &cpuset); - if (status != 0) return EMBB_ERROR; + if (status != 0) { + thread->embb_internal_arg = NULL; + thread->embb_internal_handle = NULL; + return EMBB_ERROR; + } #else embb_log_write("base_c", EMBB_LOG_LEVEL_WARNING, "Could not set thread " "affinity, since no implementation available!\n"); @@ -259,11 +267,14 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, int embb_thread_join(embb_thread_t* thread, int *result_code) { int status = 0; + if (thread == NULL) return EMBB_ERROR; status = pthread_join(thread->embb_internal_handle, NULL); - if (result_code != NULL) { - *result_code = thread->embb_internal_arg->result; + if (thread->embb_internal_arg != NULL) { + if (result_code != NULL) { + *result_code = thread->embb_internal_arg->result; + } + embb_free(thread->embb_internal_arg); } - embb_free(thread->embb_internal_arg); if (status != 0) { return EMBB_ERROR; } From ef7f44c1f006cd02566bb98986758f03e53040fc Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 13:27:07 +0100 Subject: [PATCH 30/79] base_c: fixed codesonar warning --- base_c/src/thread_specific_storage.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/base_c/src/thread_specific_storage.c b/base_c/src/thread_specific_storage.c index fea5d18..f37fb79 100644 --- a/base_c/src/thread_specific_storage.c +++ b/base_c/src/thread_specific_storage.c @@ -68,5 +68,7 @@ void* embb_tss_get(const embb_tss_t* tss) { void embb_tss_delete(embb_tss_t* tss) { assert(tss != NULL); - embb_free_aligned(tss->values); + if (tss->values != NULL) { + embb_free_aligned(tss->values); + } } From f670df7166d3af7f04bab3695abf0274c01bbf1c Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 14:06:07 +0100 Subject: [PATCH 31/79] mtapi_c: fixed codesonar warnings --- mtapi_c/src/embb_mtapi_node_t.c | 68 +++++++++++------- mtapi_c/src/embb_mtapi_scheduler_t.c | 32 ++++++--- mtapi_c/src/embb_mtapi_thread_context_t.c | 86 +++++++++++++++++------ mtapi_c/src/embb_mtapi_thread_context_t.h | 4 +- 4 files changed, 131 insertions(+), 59 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index 9f60cd8..0fdd610 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -115,29 +115,33 @@ void mtapi_initialize( node->attributes.max_tasks); node->queue_pool = embb_mtapi_queue_pool_new( node->attributes.max_queues); + if (MTAPI_NULL == node->job_list || + MTAPI_NULL == node->action_pool || + MTAPI_NULL == node->group_pool || + MTAPI_NULL == node->task_pool || + MTAPI_NULL == node->queue_pool) { + mtapi_finalize(NULL); + local_status = MTAPI_ERR_NODE_INITFAILED; + } - /* initialize scheduler for local node */ - node->scheduler = embb_mtapi_scheduler_new(); - if (MTAPI_NULL != node->scheduler) { - /* fill information structure */ - node->info.hardware_concurrency = embb_core_count_available(); - node->info.used_memory = embb_mtapi_alloc_get_bytes_allocated(); - if (MTAPI_NULL != mtapi_info) { - *mtapi_info = node->info; - } - - /* initialization succeeded, tell workers to start working */ - embb_atomic_store_int(&node->is_scheduler_running, MTAPI_TRUE); - - if (MTAPI_SUCCESS != local_status) { + if (local_status == MTAPI_SUCCESS) { + /* initialize scheduler for local node */ + node->scheduler = embb_mtapi_scheduler_new(); + if (MTAPI_NULL != node->scheduler) { + /* fill information structure */ + node->info.hardware_concurrency = embb_core_count_available(); + node->info.used_memory = embb_mtapi_alloc_get_bytes_allocated(); + if (MTAPI_NULL != mtapi_info) { + *mtapi_info = node->info; + } + + /* initialization succeeded, tell workers to start working */ + embb_atomic_store_int(&node->is_scheduler_running, MTAPI_TRUE); + } else { mtapi_finalize(MTAPI_NULL); local_status = MTAPI_ERR_NODE_INITFAILED; } - } else { - mtapi_finalize(MTAPI_NULL); - local_status = MTAPI_ERR_NODE_INITFAILED; } - } else { embb_mtapi_alloc_deallocate(node); local_status = MTAPI_ERR_PARAMETER; @@ -163,19 +167,29 @@ void mtapi_finalize(MTAPI_OUT mtapi_status_t* status) { } /* finalize storage in reverse order */ - embb_mtapi_queue_pool_delete(node->queue_pool); - node->queue_pool = MTAPI_NULL; + if (MTAPI_NULL != node->queue_pool) { + embb_mtapi_queue_pool_delete(node->queue_pool); + node->queue_pool = MTAPI_NULL; + } - embb_mtapi_task_pool_delete(node->task_pool); - node->task_pool = MTAPI_NULL; + if (MTAPI_NULL != node->task_pool) { + embb_mtapi_task_pool_delete(node->task_pool); + node->task_pool = MTAPI_NULL; + } - embb_mtapi_group_pool_delete(node->group_pool); - node->group_pool = MTAPI_NULL; + if (MTAPI_NULL != node->group_pool) { + embb_mtapi_group_pool_delete(node->group_pool); + node->group_pool = MTAPI_NULL; + } - embb_mtapi_action_pool_delete(node->action_pool); - node->action_pool = MTAPI_NULL; + if (MTAPI_NULL != node->action_pool) { + embb_mtapi_action_pool_delete(node->action_pool); + node->action_pool = MTAPI_NULL; + } - embb_mtapi_job_finalize_list(node); + if (MTAPI_NULL != node->job_list) { + embb_mtapi_job_finalize_list(node); + } /* free system instance */ embb_mtapi_alloc_deallocate(node); diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.c b/mtapi_c/src/embb_mtapi_scheduler_t.c index 7e4d2cf..17bba18 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.c +++ b/mtapi_c/src/embb_mtapi_scheduler_t.c @@ -456,6 +456,10 @@ mtapi_boolean_t embb_mtapi_scheduler_initialize_with_mode( that->worker_contexts = (embb_mtapi_thread_context_t*) embb_mtapi_alloc_allocate( sizeof(embb_mtapi_thread_context_t)*that->worker_count); + if (NULL == that->worker_contexts) { + return MTAPI_FALSE; + } + mtapi_boolean_t isinit = MTAPI_TRUE; for (ii = 0; ii < that->worker_count; ii++) { unsigned int core_num = 0; mtapi_uint_t ll = 0; @@ -467,9 +471,12 @@ mtapi_boolean_t embb_mtapi_scheduler_initialize_with_mode( } core_num++; } - embb_mtapi_thread_context_initialize_with_node_worker_and_core( + isinit &= embb_mtapi_thread_context_initialize_with_node_worker_and_core( &that->worker_contexts[ii], node, ii, core_num); } + if (!isinit) { + return MTAPI_FALSE; + } for (ii = 0; ii < that->worker_count; ii++) { if (MTAPI_FALSE == embb_mtapi_thread_context_start( &that->worker_contexts[ii], that)) { @@ -486,17 +493,19 @@ void embb_mtapi_scheduler_finalize(embb_mtapi_scheduler_t * that) { assert(MTAPI_NULL != that); - /* finalize all workers */ - for (ii = 0; ii < that->worker_count; ii++) { - embb_mtapi_thread_context_stop(&that->worker_contexts[ii]); - } - for (ii = 0; ii < that->worker_count; ii++) { - embb_mtapi_thread_context_finalize(&that->worker_contexts[ii]); - } + if (MTAPI_NULL != that->worker_contexts) { + /* finalize all workers */ + for (ii = 0; ii < that->worker_count; ii++) { + embb_mtapi_thread_context_stop(&that->worker_contexts[ii]); + } + for (ii = 0; ii < that->worker_count; ii++) { + embb_mtapi_thread_context_finalize(&that->worker_contexts[ii]); + } - that->worker_count = 0; - embb_mtapi_alloc_deallocate(that->worker_contexts); - that->worker_contexts = MTAPI_NULL; + that->worker_count = 0; + embb_mtapi_alloc_deallocate(that->worker_contexts); + that->worker_contexts = MTAPI_NULL; + } } embb_mtapi_scheduler_t * embb_mtapi_scheduler_new() { @@ -506,6 +515,7 @@ embb_mtapi_scheduler_t * embb_mtapi_scheduler_new() { if (MTAPI_NULL != that) { if (MTAPI_FALSE == embb_mtapi_scheduler_initialize(that)) { /* on error delete and return MTAPI_NULL */ + embb_mtapi_scheduler_finalize(that); embb_mtapi_scheduler_delete(that); return MTAPI_NULL; } diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.c b/mtapi_c/src/embb_mtapi_thread_context_t.c index 2a7bdc4..14eb2e2 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.c +++ b/mtapi_c/src/embb_mtapi_thread_context_t.c @@ -38,12 +38,13 @@ /* ---- CLASS MEMBERS ------------------------------------------------------ */ -void embb_mtapi_thread_context_initialize_with_node_worker_and_core( +mtapi_boolean_t embb_mtapi_thread_context_initialize_with_node_worker_and_core( embb_mtapi_thread_context_t* that, embb_mtapi_node_t* node, mtapi_uint_t worker_index, mtapi_uint_t core_num) { mtapi_uint_t ii; + mtapi_boolean_t result = MTAPI_TRUE; assert(MTAPI_NULL != that); assert(MTAPI_NULL != node); @@ -52,25 +53,55 @@ void embb_mtapi_thread_context_initialize_with_node_worker_and_core( that->worker_index = worker_index; that->core_num = core_num; that->priorities = node->attributes.max_priorities; + that->is_initialized = MTAPI_FALSE; embb_atomic_store_int(&that->run, 0); + that->queue = (embb_mtapi_task_queue_t**)embb_mtapi_alloc_allocate( sizeof(embb_mtapi_task_queue_t)*that->priorities); - that->private_queue = (embb_mtapi_task_queue_t**)embb_mtapi_alloc_allocate( - sizeof(embb_mtapi_task_queue_t)*that->priorities); + if (that->queue == NULL) { + that->private_queue = NULL; + return MTAPI_FALSE; + } for (ii = 0; ii < that->priorities; ii++) { that->queue[ii] = (embb_mtapi_task_queue_t*) embb_mtapi_alloc_allocate(sizeof(embb_mtapi_task_queue_t)); - embb_mtapi_task_queue_initialize_with_capacity( - that->queue[ii], node->attributes.queue_limit); + if (that->queue[ii] != NULL) { + embb_mtapi_task_queue_initialize_with_capacity( + that->queue[ii], node->attributes.queue_limit); + } else { + result = MTAPI_FALSE; + } + } + if (!result) { + return MTAPI_FALSE; + } + + that->private_queue = (embb_mtapi_task_queue_t**)embb_mtapi_alloc_allocate( + sizeof(embb_mtapi_task_queue_t)*that->priorities); + if (that->private_queue == NULL) { + return MTAPI_FALSE; + } + for (ii = 0; ii < that->priorities; ii++) { that->private_queue[ii] = (embb_mtapi_task_queue_t*) embb_mtapi_alloc_allocate(sizeof(embb_mtapi_task_queue_t)); - embb_mtapi_task_queue_initialize_with_capacity( - that->private_queue[ii], node->attributes.queue_limit); + if (that->private_queue[ii] != NULL) { + embb_mtapi_task_queue_initialize_with_capacity( + that->private_queue[ii], node->attributes.queue_limit); + } else { + result = MTAPI_FALSE; + } + } + if (!result) { + return MTAPI_FALSE; } embb_mutex_init(&that->work_available_mutex, EMBB_MUTEX_PLAIN); embb_condition_init(&that->work_available); embb_atomic_store_int(&that->is_sleeping, 0); + + that->is_initialized = MTAPI_TRUE; + + return MTAPI_TRUE; } mtapi_boolean_t embb_mtapi_thread_context_start( @@ -126,22 +157,37 @@ void embb_mtapi_thread_context_finalize(embb_mtapi_thread_context_t* that) { embb_mtapi_log_trace("embb_mtapi_thread_context_finalize() called\n"); - embb_condition_destroy(&that->work_available); - embb_mutex_destroy(&that->work_available_mutex); + if (that->is_initialized) { + embb_condition_destroy(&that->work_available); + embb_mutex_destroy(&that->work_available_mutex); + } - for (ii = 0; ii < that->priorities; ii++) { - embb_mtapi_task_queue_finalize(that->queue[ii]); - embb_mtapi_alloc_deallocate(that->queue[ii]); - that->queue[ii] = MTAPI_NULL; - embb_mtapi_task_queue_finalize(that->private_queue[ii]); - embb_mtapi_alloc_deallocate(that->private_queue[ii]); - that->private_queue[ii] = MTAPI_NULL; + if (that->queue != NULL) { + for (ii = 0; ii < that->priorities; ii++) { + if (that->queue[ii] != NULL) { + embb_mtapi_task_queue_finalize(that->queue[ii]); + embb_mtapi_alloc_deallocate(that->queue[ii]); + that->queue[ii] = MTAPI_NULL; + } + } + embb_mtapi_alloc_deallocate(that->queue); + that->queue = MTAPI_NULL; } - embb_mtapi_alloc_deallocate(that->queue); - that->queue = MTAPI_NULL; - embb_mtapi_alloc_deallocate(that->private_queue); - that->private_queue = MTAPI_NULL; + + if (that->private_queue != NULL) { + for (ii = 0; ii < that->priorities; ii++) { + if (that->private_queue[ii] != NULL) { + embb_mtapi_task_queue_finalize(that->private_queue[ii]); + embb_mtapi_alloc_deallocate(that->private_queue[ii]); + that->private_queue[ii] = MTAPI_NULL; + } + } + embb_mtapi_alloc_deallocate(that->private_queue); + that->private_queue = MTAPI_NULL; + } + that->priorities = 0; + that->is_initialized = MTAPI_FALSE; that->node = MTAPI_NULL; } diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.h b/mtapi_c/src/embb_mtapi_thread_context_t.h index a207886..ad641ff 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.h +++ b/mtapi_c/src/embb_mtapi_thread_context_t.h @@ -67,6 +67,7 @@ struct embb_mtapi_thread_context_struct { mtapi_uint_t core_num; embb_atomic_int run; mtapi_status_t status; + mtapi_boolean_t is_initialized; }; #include @@ -74,8 +75,9 @@ struct embb_mtapi_thread_context_struct { /** * Constructor using attributes from node and a given core number. * \memberof embb_mtapi_thread_context_struct + * \returns MTAPI_TRUE if successful, MTAPI_FALSE on error */ -void embb_mtapi_thread_context_initialize_with_node_worker_and_core( +mtapi_boolean_t embb_mtapi_thread_context_initialize_with_node_worker_and_core( embb_mtapi_thread_context_t* that, embb_mtapi_node_t* node, mtapi_uint_t worker_index, From 0456ebc82482e6fa4ded48335ff8dd16c2b0cf38 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 14:06:39 +0100 Subject: [PATCH 32/79] mtapi_network_c: removed code for socket reuse altogether --- .../mtapi_network_c/src/embb_mtapi_network_socket.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c index 82b4cbf..4d203cf 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c @@ -71,12 +71,6 @@ int embb_mtapi_network_socket_bind_and_listen( uint16_t port, uint16_t max_connections) { struct sockaddr_in in_addr; - int reuseaddr_on = 1; - - if (SOCKET_ERROR == setsockopt(that->handle, SOL_SOCKET, 0, - (const char *)&reuseaddr_on, sizeof(reuseaddr_on))) { - return 0; - } // bind & listen memset(&in_addr, 0, sizeof(in_addr)); From d405a2af9545b273f9ea2b78a08d6ace26308a83 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 23 Feb 2016 14:58:22 +0100 Subject: [PATCH 33/79] base_cpp: removed redundant assignment in test --- base_cpp/test/atomic_test.cc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/base_cpp/test/atomic_test.cc b/base_cpp/test/atomic_test.cc index 580859c..6ea270e 100644 --- a/base_cpp/test/atomic_test.cc +++ b/base_cpp/test/atomic_test.cc @@ -173,10 +173,6 @@ AtomicTest::TestStressSwap::TestStressSwap( size_t number_threads, size_t number_iterations) : TestUnit("Swap Stress test for Atomics"), swap1_counter(1) , swap2_counter(2) { - bitsets[0] = std::bitset(); - bitsets[1] = std::bitset(); - bitsets[2] = std::bitset(); - PT_ASSERT(number_threads == 1); Pre(&TestStressSwap::Init, this); From 184ceebfe64da7ccad1186feada2d3b230d0f379 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 10:02:23 +0100 Subject: [PATCH 34/79] examples: removed license headers from snippets --- .../algorithms/counting/count-snippet.h | 26 ------------------- .../algorithms/counting/count_if-snippet.h | 26 ------------------- .../algorithms/counting/setup-snippet.h | 26 ------------------- .../algorithms/for_each/doubling-snippet.h | 26 ------------------- .../for_each/doubling_zip-snippet.h | 26 ------------------- .../algorithms/for_each/setup_zip-snippet.h | 26 ------------------- .../algorithms/invoke/invocation-snippet.h | 26 ------------------- .../algorithms/invoke/packages-snippet.h | 26 ------------------- .../invoke/parallel_quick_sort-snippet.h | 26 ------------------- .../algorithms/invoke/quick_sort-snippet.h | 26 ------------------- .../algorithms/reduce/dot_product-snippet.h | 26 ------------------- .../algorithms/reduce/parallel-snippet.h | 26 ------------------- .../algorithms/reduce/range_init-snippet.h | 26 ------------------- .../reduce/second_range_init-snippet.h | 26 ------------------- .../algorithms/reduce/sequential-snippet.h | 26 ------------------- .../algorithms/scan/prefix_sum-snippet.h | 26 ------------------- .../scan/sequential_prefix_sum-snippet.h | 26 ------------------- doc/examples/algorithms/scan/setup-snippet.h | 26 ------------------- .../sorting/merge_sort_preallocated-snippet.h | 26 ------------------- .../algorithms/sorting/quick_sort-snippet.h | 26 ------------------- .../quick_sort_custom_compare-snippet.h | 26 ------------------- .../algorithms/sorting/range_define-snippet.h | 26 ------------------- doc/examples/containers/object_pool-snippet.h | 26 ------------------- .../containers/object_pool_2-snippet.h | 26 ------------------- doc/examples/containers/queues-snippet.h | 26 ------------------- doc/examples/containers/stack-snippet.h | 26 ------------------- doc/examples/dataflow/dataflow_add-snippet.h | 26 ------------------- .../dataflow/dataflow_comparator-snippet.h | 26 ------------------- .../dataflow/dataflow_connect-snippet.h | 26 ------------------- .../dataflow/dataflow_consumer-snippet.h | 26 ------------------- .../dataflow_declare_add_sources-snippet.h | 26 ------------------- .../dataflow_declare_replace-snippet.h | 26 ------------------- .../dataflow/dataflow_declare_sink-snippet.h | 26 ------------------- .../dataflow_declare_source-snippet.h | 26 ------------------- .../dataflow/dataflow_include-snippet.h | 26 ------------------- .../dataflow/dataflow_network-snippet.h | 26 ------------------- .../dataflow/dataflow_producer-snippet.h | 26 ------------------- .../dataflow_replace_function-snippet.h | 26 ------------------- doc/examples/dataflow/dataflow_run-snippet.h | 26 ------------------- .../dataflow/dataflow_sink_function-snippet.h | 26 ------------------- .../dataflow_source_function-snippet.h | 26 ------------------- .../mtapi/mtapi_c_action_signature-snippet.h | 26 ------------------- .../mtapi/mtapi_c_calc_direct-snippet.h | 26 ------------------- .../mtapi/mtapi_c_calc_task-snippet.h | 26 ------------------- .../mtapi/mtapi_c_domain_node_id-snippet.h | 26 ------------------- doc/examples/mtapi/mtapi_c_finalize-snippet.h | 26 ------------------- .../mtapi/mtapi_c_initialize-snippet.h | 26 ------------------- .../mtapi_c_plugin_action_create-snippet.h | 26 ------------------- ...tapi_c_plugin_action_finalize_cb-snippet.h | 26 ------------------- .../mtapi/mtapi_c_plugin_get_job-snippet.h | 26 ------------------- .../mtapi_c_plugin_task_cancel_cb-snippet.h | 26 ------------------- .../mtapi_c_plugin_task_schedule-snippet.h | 26 ------------------- .../mtapi/mtapi_c_plugin_task_start-snippet.h | 26 ------------------- .../mtapi_c_plugin_task_start_cb-snippet.h | 26 ------------------- .../mtapi/mtapi_c_register_action-snippet.h | 26 ------------------- .../mtapi/mtapi_c_start_task-snippet.h | 26 ------------------- .../mtapi_c_validate_arguments-snippet.h | 26 ------------------- .../mtapi_c_validate_result_buffer-snippet.h | 26 ------------------- .../mtapi/mtapi_c_wait_task-snippet.h | 26 ------------------- .../mtapi/mtapi_check_status-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_calc_task-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_domain_node_id-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_finalize-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_get_node-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_initialize-snippet.h | 26 ------------------- doc/examples/mtapi/mtapi_cpp_main-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_register_action-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_start_task-snippet.h | 26 ------------------- .../mtapi/mtapi_cpp_wait_task-snippet.h | 26 ------------------- .../mtapi_network_c_action_function-snippet.h | 26 ------------------- .../mtapi/mtapi_network_c_header-snippet.h | 26 ------------------- ...pi_network_c_local_action_create-snippet.h | 26 ------------------- .../mtapi_network_c_plugin_finalize-snippet.h | 26 ------------------- ...tapi_network_c_plugin_initialize-snippet.h | 26 ------------------- ...i_network_c_remote_action_create-snippet.h | 26 ------------------- .../mtapi_opencl_c_action_create-snippet.h | 26 ------------------- .../mtapi/mtapi_opencl_c_header-snippet.h | 26 ------------------- .../mtapi/mtapi_opencl_c_kernel-snippet.h | 26 ------------------- .../mtapi_opencl_c_plugin_finalize-snippet.h | 26 ------------------- ...mtapi_opencl_c_plugin_initialize-snippet.h | 26 ------------------- .../mtapi_terminating_condition-snippet.h | 26 ------------------- doc/examples/mtapi/mtapi_write_back-snippet.h | 26 ------------------- doc/examples/stl_for_each/function-snippet.h | 26 ------------------- .../stl_for_each/function_define-snippet.h | 26 ------------------- doc/examples/stl_for_each/functor-snippet.h | 26 ------------------- .../stl_for_each/functor_define-snippet.h | 26 ------------------- doc/examples/stl_for_each/lambda-snippet.h | 26 ------------------- doc/examples/stl_for_each/manual-snippet.h | 26 ------------------- doc/examples/stl_for_each/setup-snippet.h | 26 ------------------- .../tasks_cpp_action_signature-snippet.h | 26 ------------------- .../tasks/tasks_cpp_calc_direct-snippet.h | 26 ------------------- .../tasks/tasks_cpp_calc_task-snippet.h | 26 ------------------- .../tasks/tasks_cpp_get_node-snippet.h | 26 ------------------- .../tasks/tasks_cpp_start_task-snippet.h | 26 ------------------- .../tasks/tasks_cpp_wait_task-snippet.h | 26 ------------------- 95 files changed, 2470 deletions(-) diff --git a/doc/examples/algorithms/counting/count-snippet.h b/doc/examples/algorithms/counting/count-snippet.h index d14f295..9b3191d 100644 --- a/doc/examples/algorithms/counting/count-snippet.h +++ b/doc/examples/algorithms/counting/count-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::iterator_traits::difference_type count; using embb::algorithms::Count; count = Count(range, range + 8, 1); diff --git a/doc/examples/algorithms/counting/count_if-snippet.h b/doc/examples/algorithms/counting/count_if-snippet.h index e1b9d1c..68806e8 100644 --- a/doc/examples/algorithms/counting/count_if-snippet.h +++ b/doc/examples/algorithms/counting/count_if-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::CountIf; count = CountIf(range, range + 8, [](const int& value) -> bool { return value > 0; }); diff --git a/doc/examples/algorithms/counting/setup-snippet.h b/doc/examples/algorithms/counting/setup-snippet.h index 42fdffc..f488cbd 100644 --- a/doc/examples/algorithms/counting/setup-snippet.h +++ b/doc/examples/algorithms/counting/setup-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int range[] = {0, 3, 2, 0, 1, 1, 3, 2}; diff --git a/doc/examples/algorithms/for_each/doubling-snippet.h b/doc/examples/algorithms/for_each/doubling-snippet.h index 891ba47..9d16397 100644 --- a/doc/examples/algorithms/for_each/doubling-snippet.h +++ b/doc/examples/algorithms/for_each/doubling-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::ForEach; ForEach(range.begin(), range.end(), [] (int& to_double) { to_double *= 2; }); diff --git a/doc/examples/algorithms/for_each/doubling_zip-snippet.h b/doc/examples/algorithms/for_each/doubling_zip-snippet.h index 3d0788d..0e5ccc4 100644 --- a/doc/examples/algorithms/for_each/doubling_zip-snippet.h +++ b/doc/examples/algorithms/for_each/doubling_zip-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::Zip; using embb::algorithms::ZipPair; ForEach(Zip(input_range.begin(), output_range.begin()), diff --git a/doc/examples/algorithms/for_each/setup_zip-snippet.h b/doc/examples/algorithms/for_each/setup_zip-snippet.h index 9a3557f..311fb4b 100644 --- a/doc/examples/algorithms/for_each/setup_zip-snippet.h +++ b/doc/examples/algorithms/for_each/setup_zip-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector input_range(5); for (size_t i=0; i < input_range.size(); i++) { input_range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/invoke/invocation-snippet.h b/doc/examples/algorithms/invoke/invocation-snippet.h index 29a36a8..2b27930 100644 --- a/doc/examples/algorithms/invoke/invocation-snippet.h +++ b/doc/examples/algorithms/invoke/invocation-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::Invoke; Invoke(WorkPackageA, WorkPackageB, WorkPackageC); diff --git a/doc/examples/algorithms/invoke/packages-snippet.h b/doc/examples/algorithms/invoke/packages-snippet.h index c58ecdc..743db1d 100644 --- a/doc/examples/algorithms/invoke/packages-snippet.h +++ b/doc/examples/algorithms/invoke/packages-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void WorkPackageA(); void WorkPackageB(); void WorkPackageC(); diff --git a/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h b/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h index 28f7dba..f518853 100644 --- a/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h +++ b/doc/examples/algorithms/invoke/parallel_quick_sort-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void ParallelQuickSort(int* first, int* last) { if (last - first <= 1) return; int* mid = Partition(first, last); diff --git a/doc/examples/algorithms/invoke/quick_sort-snippet.h b/doc/examples/algorithms/invoke/quick_sort-snippet.h index ae2e7d4..9d33c89 100644 --- a/doc/examples/algorithms/invoke/quick_sort-snippet.h +++ b/doc/examples/algorithms/invoke/quick_sort-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void QuickSort(int* first, int* last) { if (last - first <= 1) return; int* mid = Partition(first, last); diff --git a/doc/examples/algorithms/reduce/dot_product-snippet.h b/doc/examples/algorithms/reduce/dot_product-snippet.h index f759f25..8d6bbf2 100644 --- a/doc/examples/algorithms/reduce/dot_product-snippet.h +++ b/doc/examples/algorithms/reduce/dot_product-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::Zip; using embb::algorithms::ZipPair; int dot_product = Reduce(Zip(range.begin(), second_range.begin()), diff --git a/doc/examples/algorithms/reduce/parallel-snippet.h b/doc/examples/algorithms/reduce/parallel-snippet.h index 3efd4a0..b28ad55 100644 --- a/doc/examples/algorithms/reduce/parallel-snippet.h +++ b/doc/examples/algorithms/reduce/parallel-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::Reduce; sum = Reduce(range.begin(), range.end(), 0, std::plus()); diff --git a/doc/examples/algorithms/reduce/range_init-snippet.h b/doc/examples/algorithms/reduce/range_init-snippet.h index 0c70054..e3a3ee3 100644 --- a/doc/examples/algorithms/reduce/range_init-snippet.h +++ b/doc/examples/algorithms/reduce/range_init-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector range(5); for (size_t i = 0; i < range.size(); i++) { range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/reduce/second_range_init-snippet.h b/doc/examples/algorithms/reduce/second_range_init-snippet.h index 42ea3e0..0c1f44e 100644 --- a/doc/examples/algorithms/reduce/second_range_init-snippet.h +++ b/doc/examples/algorithms/reduce/second_range_init-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector second_range(5); for (size_t i = 0; i < range.size(); i++) { second_range[i] = static_cast(i) + 5; diff --git a/doc/examples/algorithms/reduce/sequential-snippet.h b/doc/examples/algorithms/reduce/sequential-snippet.h index 7fa639c..c5cca02 100644 --- a/doc/examples/algorithms/reduce/sequential-snippet.h +++ b/doc/examples/algorithms/reduce/sequential-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int sum = 0; for (size_t i = 0; i < range.size(); i++) { sum += range[i]; diff --git a/doc/examples/algorithms/scan/prefix_sum-snippet.h b/doc/examples/algorithms/scan/prefix_sum-snippet.h index e5ec3d7..38fae7d 100644 --- a/doc/examples/algorithms/scan/prefix_sum-snippet.h +++ b/doc/examples/algorithms/scan/prefix_sum-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::Scan; Scan(input_range.begin(), input_range.end(), output_range.begin(), 0, std::plus()); diff --git a/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h b/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h index f975a68..4f42a55 100644 --- a/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h +++ b/doc/examples/algorithms/scan/sequential_prefix_sum-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector output_range(input_range.size()); output_range[0] = input_range[0]; for(size_t i = 1; i < input_range.size(); i++) { diff --git a/doc/examples/algorithms/scan/setup-snippet.h b/doc/examples/algorithms/scan/setup-snippet.h index 08e2678..56c9517 100644 --- a/doc/examples/algorithms/scan/setup-snippet.h +++ b/doc/examples/algorithms/scan/setup-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector input_range(5); for (size_t i = 0; i < input_range.size(); i++) { input_range[i] = static_cast(i) + 1; diff --git a/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h b/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h index 62065d7..7f12c05 100644 --- a/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h +++ b/doc/examples/algorithms/sorting/merge_sort_preallocated-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::MergeSort; std::vector temporary_range(range.size()); MergeSort(range.begin(), range.end(), temporary_range.begin()); diff --git a/doc/examples/algorithms/sorting/quick_sort-snippet.h b/doc/examples/algorithms/sorting/quick_sort-snippet.h index 4409302..a8eeb9b 100644 --- a/doc/examples/algorithms/sorting/quick_sort-snippet.h +++ b/doc/examples/algorithms/sorting/quick_sort-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - using embb::algorithms::QuickSort; QuickSort(range.begin(), range.end()); diff --git a/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h b/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h index 6a182e3..d33307d 100644 --- a/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h +++ b/doc/examples/algorithms/sorting/quick_sort_custom_compare-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - QuickSort(range.begin(), range.end(), std::greater()); diff --git a/doc/examples/algorithms/sorting/range_define-snippet.h b/doc/examples/algorithms/sorting/range_define-snippet.h index cd31890..f9eb29e 100644 --- a/doc/examples/algorithms/sorting/range_define-snippet.h +++ b/doc/examples/algorithms/sorting/range_define-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector range; diff --git a/doc/examples/containers/object_pool-snippet.h b/doc/examples/containers/object_pool-snippet.h index fe6552d..15fe2b0 100644 --- a/doc/examples/containers/object_pool-snippet.h +++ b/doc/examples/containers/object_pool-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::containers::ObjectPool objPool(5); //@\label{lst:object_pool_lst1:line_create}@ int* alloc[5]; diff --git a/doc/examples/containers/object_pool_2-snippet.h b/doc/examples/containers/object_pool_2-snippet.h index e346265..db87c42 100644 --- a/doc/examples/containers/object_pool_2-snippet.h +++ b/doc/examples/containers/object_pool_2-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::containers::ObjectPool> objPool(5); //@\label{lst:object_pool_lst2:line_create}@ diff --git a/doc/examples/containers/queues-snippet.h b/doc/examples/containers/queues-snippet.h index 16a186f..4e3a24b 100644 --- a/doc/examples/containers/queues-snippet.h +++ b/doc/examples/containers/queues-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::containers::LockFreeMPMCQueue queue(10); //@\label{lst:queue_lst1:line_create}@ int i, j; diff --git a/doc/examples/containers/stack-snippet.h b/doc/examples/containers/stack-snippet.h index 29b8f3c..057ebe5 100644 --- a/doc/examples/containers/stack-snippet.h +++ b/doc/examples/containers/stack-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::containers::LockFreeStack stack(10); //@\label{lst:stack_lst1:line_create}@ int i, j; diff --git a/doc/examples/dataflow/dataflow_add-snippet.h b/doc/examples/dataflow/dataflow_add-snippet.h index 80db7a8..ce51ef8 100644 --- a/doc/examples/dataflow/dataflow_add-snippet.h +++ b/doc/examples/dataflow/dataflow_add-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - nw.AddSource(read); diff --git a/doc/examples/dataflow/dataflow_comparator-snippet.h b/doc/examples/dataflow/dataflow_comparator-snippet.h index 08cb559..3630f18 100644 --- a/doc/examples/dataflow/dataflow_comparator-snippet.h +++ b/doc/examples/dataflow/dataflow_comparator-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - template class Comparator { public: diff --git a/doc/examples/dataflow/dataflow_connect-snippet.h b/doc/examples/dataflow/dataflow_connect-snippet.h index 69f126d..7c7537e 100644 --- a/doc/examples/dataflow/dataflow_connect-snippet.h +++ b/doc/examples/dataflow/dataflow_connect-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - read >> replace >> write; diff --git a/doc/examples/dataflow/dataflow_consumer-snippet.h b/doc/examples/dataflow/dataflow_consumer-snippet.h index f51e681..eae4054 100644 --- a/doc/examples/dataflow/dataflow_consumer-snippet.h +++ b/doc/examples/dataflow/dataflow_consumer-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - template class Consumer { public: diff --git a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h index bb32bf9..f1cfcaa 100644 --- a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - Producer producer1(1), producer2(2), diff --git a/doc/examples/dataflow/dataflow_declare_replace-snippet.h b/doc/examples/dataflow/dataflow_declare_replace-snippet.h index 1c028a5..e230807 100644 --- a/doc/examples/dataflow/dataflow_declare_replace-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_replace-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - Network::ParallelProcess< Network::Inputs::Type, Network::Outputs::Type> replace( diff --git a/doc/examples/dataflow/dataflow_declare_sink-snippet.h b/doc/examples/dataflow/dataflow_declare_sink-snippet.h index a7aa85d..dfdd6b2 100644 --- a/doc/examples/dataflow/dataflow_declare_sink-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_sink-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - Network::Sink write( embb::base::MakeFunction(SinkFunction) ); diff --git a/doc/examples/dataflow/dataflow_declare_source-snippet.h b/doc/examples/dataflow/dataflow_declare_source-snippet.h index b9b1b10..470db74 100644 --- a/doc/examples/dataflow/dataflow_declare_source-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_source-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - Network::Source read( embb::base::MakeFunction(SourceFunction) ); diff --git a/doc/examples/dataflow/dataflow_include-snippet.h b/doc/examples/dataflow/dataflow_include-snippet.h index db95ea5..ca47769 100644 --- a/doc/examples/dataflow/dataflow_include-snippet.h +++ b/doc/examples/dataflow/dataflow_include-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #include diff --git a/doc/examples/dataflow/dataflow_network-snippet.h b/doc/examples/dataflow/dataflow_network-snippet.h index 39b6d67..c13ebeb 100644 --- a/doc/examples/dataflow/dataflow_network-snippet.h +++ b/doc/examples/dataflow/dataflow_network-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - typedef embb::dataflow::Network<2> Network; static Network nw; diff --git a/doc/examples/dataflow/dataflow_producer-snippet.h b/doc/examples/dataflow/dataflow_producer-snippet.h index 20e4156..f76065c 100644 --- a/doc/examples/dataflow/dataflow_producer-snippet.h +++ b/doc/examples/dataflow/dataflow_producer-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - template class Producer { public: diff --git a/doc/examples/dataflow/dataflow_replace_function-snippet.h b/doc/examples/dataflow/dataflow_replace_function-snippet.h index bc5a311..21e71d9 100644 --- a/doc/examples/dataflow/dataflow_replace_function-snippet.h +++ b/doc/examples/dataflow/dataflow_replace_function-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void ReplaceFunction(std::string const & istr, std::string & ostr) { ostr = istr; repl(ostr, what, with); diff --git a/doc/examples/dataflow/dataflow_run-snippet.h b/doc/examples/dataflow/dataflow_run-snippet.h index d2d94ee..ff4f083 100644 --- a/doc/examples/dataflow/dataflow_run-snippet.h +++ b/doc/examples/dataflow/dataflow_run-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - nw(); diff --git a/doc/examples/dataflow/dataflow_sink_function-snippet.h b/doc/examples/dataflow/dataflow_sink_function-snippet.h index 91d08e7..66896ea 100644 --- a/doc/examples/dataflow/dataflow_sink_function-snippet.h +++ b/doc/examples/dataflow/dataflow_sink_function-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void SinkFunction(std::string const & str) { std::cout << str << std::endl; } diff --git a/doc/examples/dataflow/dataflow_source_function-snippet.h b/doc/examples/dataflow/dataflow_source_function-snippet.h index a8fe9d1..1afc660 100644 --- a/doc/examples/dataflow/dataflow_source_function-snippet.h +++ b/doc/examples/dataflow/dataflow_source_function-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - bool SourceFunction(std::string & str) { if (!file.eof()) { std::getline(file, str); diff --git a/doc/examples/mtapi/mtapi_c_action_signature-snippet.h b/doc/examples/mtapi/mtapi_c_action_signature-snippet.h index d04cf72..80b8a4f 100644 --- a/doc/examples/mtapi/mtapi_c_action_signature-snippet.h +++ b/doc/examples/mtapi/mtapi_c_action_signature-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void fibonacciActionFunction( const void* args, mtapi_size_t arg_size, diff --git a/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h b/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h index 8cb2304..525f7be 100644 --- a/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h +++ b/doc/examples/mtapi/mtapi_c_calc_direct-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int b = n - 2; int y; fibonacciActionFunction( diff --git a/doc/examples/mtapi/mtapi_c_calc_task-snippet.h b/doc/examples/mtapi/mtapi_c_calc_task-snippet.h index cc84dba..62b352a 100644 --- a/doc/examples/mtapi/mtapi_c_calc_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_calc_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int a = n - 1; int x; mtapi_task_hndl_t task = mtapi_task_start( diff --git a/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h b/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h index a95de9f..b1850d0 100644 --- a/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h +++ b/doc/examples/mtapi/mtapi_c_domain_node_id-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #define THIS_DOMAIN_ID 1 #define THIS_NODE_ID 1 diff --git a/doc/examples/mtapi/mtapi_c_finalize-snippet.h b/doc/examples/mtapi/mtapi_c_finalize-snippet.h index 4e54489..21c5bfa 100644 --- a/doc/examples/mtapi/mtapi_c_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_c_finalize-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* delete action */ mtapi_action_delete(fibonacciAction, 100, &status); MTAPI_CHECK_STATUS(status); diff --git a/doc/examples/mtapi/mtapi_c_initialize-snippet.h b/doc/examples/mtapi/mtapi_c_initialize-snippet.h index 8e97e2e..1269342 100644 --- a/doc/examples/mtapi/mtapi_c_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_c_initialize-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_status_t status; /* initialize node attributes to default values */ diff --git a/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h index ac2a54c..2ec43dd 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_action_create-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - action = mtapi_ext_plugin_action_create( PLUGIN_JOB_ID, plugin_task_start, diff --git a/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h index e1f8564..7c44e30 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_action_finalize_cb-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void plugin_action_finalize( MTAPI_IN mtapi_action_hndl_t action, MTAPI_OUT mtapi_status_t* status diff --git a/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h index 8246569..9e97299 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_get_job-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - job = mtapi_job_get( PLUGIN_JOB_ID, PLUGIN_DOMAIN_ID, diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h index a63d4ff..2a62c5d 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_cancel_cb-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void plugin_task_cancel( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h index 6870f2a..a180edc 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_schedule-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void plugin_task_schedule(embb_mtapi_task_t* local_task) { // here the task might be dispatched to some hardware or separate thread diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h index 99491b1..344330a 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_start-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - task = mtapi_task_start( MTAPI_TASK_ID_NONE, job, diff --git a/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h b/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h index e07da78..8e4d063 100644 --- a/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h +++ b/doc/examples/mtapi/mtapi_c_plugin_task_start_cb-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void plugin_task_start( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { diff --git a/doc/examples/mtapi/mtapi_c_register_action-snippet.h b/doc/examples/mtapi/mtapi_c_register_action-snippet.h index fac8e96..a05aaa7 100644 --- a/doc/examples/mtapi/mtapi_c_register_action-snippet.h +++ b/doc/examples/mtapi/mtapi_c_register_action-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* create action */ mtapi_action_hndl_t fibonacciAction; fibonacciAction = mtapi_action_create( diff --git a/doc/examples/mtapi/mtapi_c_start_task-snippet.h b/doc/examples/mtapi/mtapi_c_start_task-snippet.h index 37c9fdd..79d005e 100644 --- a/doc/examples/mtapi/mtapi_c_start_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_start_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* start task */ int result; task = mtapi_task_start( diff --git a/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h b/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h index 246f00f..44246ab 100644 --- a/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h +++ b/doc/examples/mtapi/mtapi_c_validate_arguments-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* check size of arguments (in this case we only expect one int value)*/ mtapi_status_t status; diff --git a/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h b/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h index bafb072..24e7630 100644 --- a/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h +++ b/doc/examples/mtapi/mtapi_c_validate_result_buffer-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* if the caller is not interested in results, result_buffer may be MTAPI_NULL. Of course, this depends on the application */ int* result = MTAPI_NULL; diff --git a/doc/examples/mtapi/mtapi_c_wait_task-snippet.h b/doc/examples/mtapi/mtapi_c_wait_task-snippet.h index 25934fc..8c3e348 100644 --- a/doc/examples/mtapi/mtapi_c_wait_task-snippet.h +++ b/doc/examples/mtapi/mtapi_c_wait_task-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_task_wait(task, MTAPI_INFINITE, &status); MTAPI_CHECK_STATUS(status); diff --git a/doc/examples/mtapi/mtapi_check_status-snippet.h b/doc/examples/mtapi/mtapi_check_status-snippet.h index 786f461..bf1d1d3 100644 --- a/doc/examples/mtapi/mtapi_check_status-snippet.h +++ b/doc/examples/mtapi/mtapi_check_status-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #include #include #include diff --git a/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h index 10e4331..aad4e1e 100644 --- a/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_calc_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int a = n - 1; int x; embb::mtapi::Task task = node.Start(fibonacciJob, &a, &x); diff --git a/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h b/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h index cca471b..747609d 100644 --- a/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_domain_node_id-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #define THIS_DOMAIN_ID 1 #define THIS_NODE_ID 1 diff --git a/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h b/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h index ead681d..5061b36 100644 --- a/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_finalize-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* finalize the node */ embb::mtapi::Node::Finalize(); diff --git a/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h b/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h index 429365a..b91d187 100644 --- a/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_get_node-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::mtapi::Node& node = embb::mtapi::Node::GetInstance(); diff --git a/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h b/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h index 22add40..859b55a 100644 --- a/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_initialize-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* initialize the node with default attributes */ embb::mtapi::Node::Initialize(THIS_DOMAIN_ID, THIS_NODE_ID); diff --git a/doc/examples/mtapi/mtapi_cpp_main-snippet.h b/doc/examples/mtapi/mtapi_cpp_main-snippet.h index f24bec4..582850a 100644 --- a/doc/examples/mtapi/mtapi_cpp_main-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_main-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - EMBB_TRY { int result = fibonacci(6); std::cout << "result: " << result << std::endl; diff --git a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h index fd2dfe9..beeea5a 100644 --- a/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_register_action-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - /* create action */ embb::mtapi::Action fibonacciAction( FIBONACCI_JOB, /* action ID, defined by the diff --git a/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h index 3431de0..cf1f908 100644 --- a/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_start_task-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int result; embb::mtapi::Task task = node.Start(fibonacciJob, &n, &result); diff --git a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h index ffb4115..9f1f9d7 100644 --- a/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h +++ b/doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_status_t status = task.Wait(MTAPI_INFINITE); if (status != MTAPI_SUCCESS) { printf("task failed with error: %d\n\n", status); diff --git a/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h b/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h index 5e73ccd..9f56102 100644 --- a/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_action_function-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - static void AddVectorAction( void const * arguments, mtapi_size_t arguments_size, diff --git a/doc/examples/mtapi/mtapi_network_c_header-snippet.h b/doc/examples/mtapi/mtapi_network_c_header-snippet.h index ea19d49..c052390 100644 --- a/doc/examples/mtapi/mtapi_network_c_header-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_header-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #include diff --git a/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h b/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h index a8fbe93..c057151 100644 --- a/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_local_action_create-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - network_action = mtapi_network_action_create( NETWORK_DOMAIN, NETWORK_LOCAL_JOB, diff --git a/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h b/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h index c783f33..74d49f3 100644 --- a/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_plugin_finalize-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_network_plugin_finalize(&status); diff --git a/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h b/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h index 4f22a13..b7cc83b 100644 --- a/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_plugin_initialize-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_network_plugin_initialize("127.0.0.1", 12345, 5, kElements * 4 * 3 + 32, &status); diff --git a/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h b/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h index 973c291..31fa6ac 100644 --- a/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_network_c_remote_action_create-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - float node_remote = 1.0f; local_action = mtapi_action_create( NETWORK_REMOTE_JOB, diff --git a/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h index f48468d..c3927a4 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_action_create-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - float node_local = 1.0f; action = mtapi_opencl_action_create( OPENCL_JOB, diff --git a/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h index c18576d..1d3a916 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_header-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - #include diff --git a/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h index c21b050..cfd3e99 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_kernel-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - const char * kernel = "__kernel void AddVector(\n" " __global void* arguments,\n" diff --git a/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h index 5bd01b4..8689937 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_plugin_finalize-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_opencl_plugin_finalize(&status); diff --git a/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h b/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h index 05f901b..c8106fc 100644 --- a/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h +++ b/doc/examples/mtapi/mtapi_opencl_c_plugin_initialize-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_opencl_plugin_initialize(&status); diff --git a/doc/examples/mtapi/mtapi_terminating_condition-snippet.h b/doc/examples/mtapi/mtapi_terminating_condition-snippet.h index 1718f2a..7112b48 100644 --- a/doc/examples/mtapi/mtapi_terminating_condition-snippet.h +++ b/doc/examples/mtapi/mtapi_terminating_condition-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - if (n < 2) { *result = n; } else { diff --git a/doc/examples/mtapi/mtapi_write_back-snippet.h b/doc/examples/mtapi/mtapi_write_back-snippet.h index 03254fc..bca08c7 100644 --- a/doc/examples/mtapi/mtapi_write_back-snippet.h +++ b/doc/examples/mtapi/mtapi_write_back-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - *result = x + y; } } diff --git a/doc/examples/stl_for_each/function-snippet.h b/doc/examples/stl_for_each/function-snippet.h index 6371b44..d870d31 100644 --- a/doc/examples/stl_for_each/function-snippet.h +++ b/doc/examples/stl_for_each/function-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::for_each(range.begin(), range.end(), &DoubleFunction); diff --git a/doc/examples/stl_for_each/function_define-snippet.h b/doc/examples/stl_for_each/function_define-snippet.h index a20bd68..0bb8d2b 100644 --- a/doc/examples/stl_for_each/function_define-snippet.h +++ b/doc/examples/stl_for_each/function_define-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void DoubleFunction(int& to_double) { to_double *= 2; } diff --git a/doc/examples/stl_for_each/functor-snippet.h b/doc/examples/stl_for_each/functor-snippet.h index b7a52fd..e282b10 100644 --- a/doc/examples/stl_for_each/functor-snippet.h +++ b/doc/examples/stl_for_each/functor-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::for_each(range.begin(), range.end(), DoubleFunctor()); diff --git a/doc/examples/stl_for_each/functor_define-snippet.h b/doc/examples/stl_for_each/functor_define-snippet.h index 7da7d08..d5e34d1 100644 --- a/doc/examples/stl_for_each/functor_define-snippet.h +++ b/doc/examples/stl_for_each/functor_define-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - struct DoubleFunctor { void operator()(int& to_double) { to_double *= 2; diff --git a/doc/examples/stl_for_each/lambda-snippet.h b/doc/examples/stl_for_each/lambda-snippet.h index 5094582..e8c545a 100644 --- a/doc/examples/stl_for_each/lambda-snippet.h +++ b/doc/examples/stl_for_each/lambda-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::for_each(range.begin(), range.end(), [] (int& to_double) { to_double *= 2; }); diff --git a/doc/examples/stl_for_each/manual-snippet.h b/doc/examples/stl_for_each/manual-snippet.h index 50965bb..22b72cc 100644 --- a/doc/examples/stl_for_each/manual-snippet.h +++ b/doc/examples/stl_for_each/manual-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - for (size_t i=0; i < range.size(); i++) { range[i] *= 2; } diff --git a/doc/examples/stl_for_each/setup-snippet.h b/doc/examples/stl_for_each/setup-snippet.h index fc24873..0e78cc8 100644 --- a/doc/examples/stl_for_each/setup-snippet.h +++ b/doc/examples/stl_for_each/setup-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - std::vector range(5); for (size_t i=0; i < range.size(); i++) { range[i] = static_cast(i) + 1; diff --git a/doc/examples/tasks/tasks_cpp_action_signature-snippet.h b/doc/examples/tasks/tasks_cpp_action_signature-snippet.h index d9bdbdf..24aa989 100644 --- a/doc/examples/tasks/tasks_cpp_action_signature-snippet.h +++ b/doc/examples/tasks/tasks_cpp_action_signature-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - void fibonacciActionFunction( int n, int* result, diff --git a/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h b/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h index 0a3683d..eb08e75 100644 --- a/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h +++ b/doc/examples/tasks/tasks_cpp_calc_direct-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int b = n - 2; int y; fibonacciActionFunction( diff --git a/doc/examples/tasks/tasks_cpp_calc_task-snippet.h b/doc/examples/tasks/tasks_cpp_calc_task-snippet.h index 47d5bfc..cfe5664 100644 --- a/doc/examples/tasks/tasks_cpp_calc_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_calc_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int a = n - 1; int x; embb::tasks::Task task = node.Spawn( diff --git a/doc/examples/tasks/tasks_cpp_get_node-snippet.h b/doc/examples/tasks/tasks_cpp_get_node-snippet.h index c40696d..f644ec5 100644 --- a/doc/examples/tasks/tasks_cpp_get_node-snippet.h +++ b/doc/examples/tasks/tasks_cpp_get_node-snippet.h @@ -1,27 +1 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - embb::tasks::Node& node = embb::tasks::Node::GetInstance(); diff --git a/doc/examples/tasks/tasks_cpp_start_task-snippet.h b/doc/examples/tasks/tasks_cpp_start_task-snippet.h index 35471a9..507e634 100644 --- a/doc/examples/tasks/tasks_cpp_start_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_start_task-snippet.h @@ -1,29 +1,3 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - int result; embb::tasks::Task task = node.Spawn( embb::base::Bind( diff --git a/doc/examples/tasks/tasks_cpp_wait_task-snippet.h b/doc/examples/tasks/tasks_cpp_wait_task-snippet.h index d683b42..21637fd 100644 --- a/doc/examples/tasks/tasks_cpp_wait_task-snippet.h +++ b/doc/examples/tasks/tasks_cpp_wait_task-snippet.h @@ -1,28 +1,2 @@ -/* - * Copyright (c) 2014-2016, Siemens AG. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - mtapi_status_t status = task.Wait(MTAPI_INFINITE); MTAPI_CHECK_STATUS(status); From 3891cb15b7b07fd0b7822203451fcfd4d272517e Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 15:15:03 +0100 Subject: [PATCH 35/79] base_c: changed assertions on user input into checks with error code return --- base_c/src/condition_variable.c | 59 ++++++++++++++++++---------- base_c/src/counter.c | 16 ++++++-- base_c/src/duration.c | 52 +++++++++++++++--------- base_c/src/memory_allocation.c | 18 +++++++-- base_c/src/mutex.c | 42 ++++++++++++++++++++ base_c/src/thread.c | 19 ++++++++- base_c/src/thread_specific_storage.c | 20 +++++++--- base_c/src/time.c | 20 ++++++---- 8 files changed, 186 insertions(+), 60 deletions(-) diff --git a/base_c/src/condition_variable.c b/base_c/src/condition_variable.c index 575bb33..60782b7 100644 --- a/base_c/src/condition_variable.c +++ b/base_c/src/condition_variable.c @@ -33,8 +33,9 @@ int embb_condition_wait_for(embb_condition_t* condition_var, embb_mutex_t* mutex, const embb_duration_t* duration) { - assert(condition_var != NULL); - assert(mutex != NULL); + if (condition_var == NULL || mutex == NULL) { + return EMBB_ERROR; + } embb_time_t time; int status = embb_time_in(&time, duration); if (status != EMBB_SUCCESS) { @@ -46,27 +47,34 @@ int embb_condition_wait_for(embb_condition_t* condition_var, #ifdef EMBB_PLATFORM_THREADING_WINTHREADS int embb_condition_init(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } InitializeConditionVariable(condition_var); return EMBB_SUCCESS; } int embb_condition_notify_one(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } WakeConditionVariable(condition_var); return EMBB_SUCCESS; } int embb_condition_notify_all(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } WakeAllConditionVariable(condition_var); return EMBB_SUCCESS; } int embb_condition_wait(embb_condition_t* condition_var, embb_mutex_t* mutex) { - assert(condition_var != NULL); - assert(mutex != NULL); + if (condition_var == NULL || mutex == NULL) { + return EMBB_ERROR; + } if (SleepConditionVariableCS(condition_var, mutex, INFINITE)) { return EMBB_SUCCESS; } @@ -75,9 +83,9 @@ int embb_condition_wait(embb_condition_t* condition_var, int embb_condition_wait_until(embb_condition_t* condition_var, embb_mutex_t* mutex, const embb_time_t* time) { - assert(condition_var != NULL); - assert(mutex != NULL); - assert(time != NULL); + if (condition_var == NULL || mutex == NULL || time == NULL) { + return EMBB_ERROR; + } /* The Windows API needs a time duration, so we need to convert the given time by using the time now. */ embb_time_t now; @@ -103,7 +111,9 @@ int embb_condition_wait_until(embb_condition_t* condition_var, } int embb_condition_destroy(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } EMBB_UNUSED_IN_RELEASE(condition_var); return EMBB_SUCCESS; } @@ -113,35 +123,42 @@ int embb_condition_destroy(embb_condition_t* condition_var) { #ifdef EMBB_PLATFORM_THREADING_POSIXTHREADS int embb_condition_init(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } int result = pthread_cond_init(condition_var, NULL); return result == 0 ? EMBB_SUCCESS : EMBB_ERROR; } int embb_condition_notify_one(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } int result = pthread_cond_signal(condition_var); return result == 0 ? EMBB_SUCCESS : EMBB_ERROR; } int embb_condition_notify_all(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } int result = pthread_cond_broadcast(condition_var); return result == 0 ? EMBB_SUCCESS : EMBB_ERROR; } int embb_condition_wait(embb_condition_t* condition_var, embb_mutex_t* mutex) { - assert(condition_var != NULL); - assert(mutex != NULL); + if (condition_var == NULL || mutex == NULL) { + return EMBB_ERROR; + } int result = pthread_cond_wait(condition_var, mutex); return result == 0 ? EMBB_SUCCESS : EMBB_ERROR; } int embb_condition_wait_until(embb_condition_t* condition_var, embb_mutex_t* mutex, const embb_time_t* time) { - assert(condition_var != NULL); - assert(mutex != NULL); - assert(time != NULL); + if (condition_var == NULL || mutex == NULL || time == NULL) { + return EMBB_ERROR; + } /* Convert EMBB time to Unix time format */ struct timespec unix_time; unix_time.tv_sec = time->seconds; @@ -157,7 +174,9 @@ int embb_condition_wait_until(embb_condition_t* condition_var, } int embb_condition_destroy(embb_condition_t* condition_var) { - assert(condition_var != NULL); + if (condition_var == NULL) { + return EMBB_ERROR; + } int status = pthread_cond_destroy(condition_var); if (status != 0) { return EMBB_ERROR; diff --git a/base_c/src/counter.c b/base_c/src/counter.c index d71eb4d..5ebbe86 100644 --- a/base_c/src/counter.c +++ b/base_c/src/counter.c @@ -30,23 +30,31 @@ #include int embb_counter_init(embb_counter_t* counter) { - assert(counter != NULL); + if (counter == NULL) { + return EMBB_ERROR; + } embb_atomic_store_unsigned_int(&(counter->value), 0); return EMBB_SUCCESS; } unsigned int embb_counter_get(embb_counter_t* counter) { - assert(counter != NULL); + if (counter == NULL) { + return EMBB_ERROR; + } return embb_atomic_load_unsigned_int(&(counter->value)); } unsigned int embb_counter_increment(embb_counter_t* counter) { - assert(counter != NULL); + if (counter == NULL) { + return EMBB_ERROR; + } return embb_atomic_fetch_and_add_unsigned_int(&(counter->value), 1); } unsigned int embb_counter_decrement(embb_counter_t* counter) { - assert(counter != NULL); + if (counter == NULL) { + return EMBB_ERROR; + } return embb_atomic_fetch_and_add_unsigned_int(&(counter->value), (unsigned int)-1); } diff --git a/base_c/src/duration.c b/base_c/src/duration.c index 8db8c7c..26a539f 100644 --- a/base_c/src/duration.c +++ b/base_c/src/duration.c @@ -46,7 +46,9 @@ const embb_duration_t* embb_duration_zero() { int embb_duration_set_nanoseconds(embb_duration_t* duration, unsigned long long nanoseconds) { - assert(duration != NULL); + if (duration == NULL) { + return EMBB_ERROR; + } if (nanoseconds > 0) { if (embb_duration_min()->nanoseconds > nanoseconds) { return EMBB_UNDERFLOW; @@ -63,7 +65,9 @@ int embb_duration_set_nanoseconds(embb_duration_t* duration, int embb_duration_set_microseconds(embb_duration_t* duration, unsigned long long microseconds) { - assert(duration != NULL); + if (duration == NULL) { + return EMBB_ERROR; + } if (microseconds > 0) { if (embb_duration_min()->nanoseconds > microseconds*1000) { return EMBB_UNDERFLOW; @@ -80,7 +84,9 @@ int embb_duration_set_microseconds(embb_duration_t* duration, int embb_duration_set_milliseconds(embb_duration_t* duration, unsigned long long milliseconds) { - assert(duration != NULL); + if (duration == NULL) { + return EMBB_ERROR; + } if (milliseconds > 0) { if (embb_duration_min()->nanoseconds > milliseconds*1000000) { return EMBB_UNDERFLOW; @@ -97,7 +103,9 @@ int embb_duration_set_milliseconds(embb_duration_t* duration, int embb_duration_set_seconds(embb_duration_t* duration, unsigned long long seconds) { - assert(duration != NULL); + if (duration == NULL) { + return EMBB_ERROR; + } if (seconds > 0) { if (embb_duration_min()->nanoseconds > seconds*1000000000) { return EMBB_UNDERFLOW; @@ -113,8 +121,9 @@ int embb_duration_set_seconds(embb_duration_t* duration, } int embb_duration_add(embb_duration_t* lhs, const embb_duration_t* rhs) { - assert(lhs != NULL); - assert(rhs != NULL); + if (lhs == NULL || rhs == NULL) { + return EMBB_ERROR; + } int carry = (int)((lhs->nanoseconds + rhs->nanoseconds) / 1000000000); if (lhs->seconds + rhs->seconds + carry > EMBB_DURATION_MAX_SECONDS) { return EMBB_OVERFLOW; @@ -126,8 +135,9 @@ int embb_duration_add(embb_duration_t* lhs, const embb_duration_t* rhs) { int embb_duration_as_nanoseconds(const embb_duration_t* duration, unsigned long long* nanoseconds) { - assert(duration != NULL); - assert(nanoseconds != NULL); + if (duration == NULL || nanoseconds == NULL) { + return EMBB_ERROR; + } if (duration->seconds*1000000000 + duration->nanoseconds > ULLONG_MAX) { return EMBB_OVERFLOW; } @@ -137,8 +147,9 @@ int embb_duration_as_nanoseconds(const embb_duration_t* duration, int embb_duration_as_microseconds(const embb_duration_t* duration, unsigned long long* microseconds) { - assert(duration != NULL); - assert(microseconds != NULL); + if (duration == NULL || microseconds == NULL) { + return EMBB_ERROR; + } if (duration->nanoseconds % 1000 > 0) { return EMBB_UNDERFLOW; } @@ -151,8 +162,9 @@ int embb_duration_as_microseconds(const embb_duration_t* duration, int embb_duration_as_milliseconds(const embb_duration_t* duration, unsigned long long* milliseconds) { - assert(duration != NULL); - assert(milliseconds != NULL); + if (duration == NULL || milliseconds == NULL) { + return EMBB_ERROR; + } if (duration->nanoseconds % 1000000 > 0) { return EMBB_UNDERFLOW; } @@ -165,8 +177,9 @@ int embb_duration_as_milliseconds(const embb_duration_t* duration, int embb_duration_as_seconds(const embb_duration_t* duration, unsigned long long* seconds) { - assert(duration != NULL); - assert(seconds != NULL); + if (duration == NULL || seconds == NULL) { + return EMBB_ERROR; + } if (duration->nanoseconds % 1000000000 > 0) { return EMBB_UNDERFLOW; } @@ -180,11 +193,12 @@ int embb_duration_as_seconds(const embb_duration_t* duration, int embb_duration_compare(const embb_duration_t* lhs, const embb_duration_t* rhs) { - assert(lhs != NULL); - assert(rhs != NULL); - assert(lhs->nanoseconds < 1000000000); - assert(rhs->nanoseconds < 1000000000); - + if (lhs == NULL || rhs == NULL) { + return EMBB_ERROR; + } + if (lhs->nanoseconds >= 1000000000 || rhs->nanoseconds >= 1000000000) { + return EMBB_ERROR; + } if (lhs->seconds > rhs->seconds) { return 1; } else if (lhs->seconds < rhs->seconds) { diff --git a/base_c/src/memory_allocation.c b/base_c/src/memory_allocation.c index e1462db..7c009c0 100644 --- a/base_c/src/memory_allocation.c +++ b/base_c/src/memory_allocation.c @@ -62,7 +62,9 @@ void* embb_alloc(size_t bytes) { } void embb_free(void * ptr) { - assert(ptr != NULL); + if (ptr == NULL) { + return; + } size_t * alloc_type = (size_t*)ptr - 1; size_t * bytes_allocated = (size_t*)ptr - 2; @@ -134,7 +136,10 @@ void* embb_alloc_aligned(size_t alignment, size_t size) { } void embb_free_aligned(void* ptr) { - assert(ptr != NULL); + if (ptr == NULL) { + return; + } + size_t* ptr_conv = (size_t*)ptr; // If embb_free_aligned is called, the memory block should have been allocated @@ -160,7 +165,10 @@ void * embb_alloc(size_t bytes) { } void embb_free(void * ptr) { - assert(ptr != NULL); + if (ptr == NULL) { + return; + } + free(ptr); } @@ -193,6 +201,10 @@ void *embb_alloc_aligned(size_t alignment, size_t size) { } void embb_free_aligned(void* ptr) { + if (ptr == NULL) { + return; + } + #ifdef EMBB_PLATFORM_COMPILER_MSVC _aligned_free(ptr); #else diff --git a/base_c/src/mutex.c b/base_c/src/mutex.c index 601e16b..e1914ff 100644 --- a/base_c/src/mutex.c +++ b/base_c/src/mutex.c @@ -33,6 +33,9 @@ #ifdef EMBB_PLATFORM_THREADING_WINTHREADS int embb_mutex_init(embb_mutex_t* mutex, int type) { + if (NULL == mutex) { + return EMBB_ERROR; + } /* Critical sections in Windows are always recursive */ InitializeCriticalSection(mutex); EMBB_UNUSED(type); @@ -40,11 +43,17 @@ int embb_mutex_init(embb_mutex_t* mutex, int type) { } int embb_mutex_lock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } EnterCriticalSection(mutex); return EMBB_SUCCESS; } int embb_mutex_try_lock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } BOOL success; success = TryEnterCriticalSection(mutex); if (success == FALSE) return EMBB_ERROR; @@ -52,11 +61,17 @@ int embb_mutex_try_lock(embb_mutex_t* mutex) { } int embb_mutex_unlock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } LeaveCriticalSection(mutex); return EMBB_SUCCESS; } void embb_mutex_destroy(embb_mutex_t* mutex) { + if (NULL == mutex) { + return; + } DeleteCriticalSection(mutex); } @@ -65,6 +80,9 @@ void embb_mutex_destroy(embb_mutex_t* mutex) { #ifdef EMBB_PLATFORM_THREADING_POSIXTHREADS int embb_mutex_init(embb_mutex_t* mutex, int type) { + if (NULL == mutex) { + return EMBB_ERROR; + } if (type == EMBB_MUTEX_PLAIN) { if (pthread_mutex_init(mutex, NULL) != 0) return EMBB_ERROR; } else { @@ -85,6 +103,9 @@ int embb_mutex_init(embb_mutex_t* mutex, int type) { } int embb_mutex_lock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } int result = pthread_mutex_lock(mutex); if (result != 0) { return EMBB_ERROR; @@ -93,6 +114,9 @@ int embb_mutex_lock(embb_mutex_t* mutex) { } int embb_mutex_try_lock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } int result = pthread_mutex_trylock(mutex); if (result == 0) { return EMBB_SUCCESS; @@ -104,6 +128,9 @@ int embb_mutex_try_lock(embb_mutex_t* mutex) { } int embb_mutex_unlock(embb_mutex_t* mutex) { + if (NULL == mutex) { + return EMBB_ERROR; + } int result = pthread_mutex_unlock(mutex); if (result != 0) { return EMBB_ERROR; @@ -112,12 +139,18 @@ int embb_mutex_unlock(embb_mutex_t* mutex) { } void embb_mutex_destroy(embb_mutex_t* mutex) { + if (NULL == mutex) { + return; + } pthread_mutex_destroy(mutex); } #endif /* EMBB_PLATFORM_THREADING_POSIXTHREADS */ int embb_spin_init(embb_spinlock_t* spinlock) { + if (NULL == spinlock) { + return EMBB_ERROR; + } // For now, store the initial value. In the future will use atomic init // function (as soon as available). embb_atomic_store_int(&spinlock->atomic_spin_variable_, 0); @@ -125,6 +158,9 @@ int embb_spin_init(embb_spinlock_t* spinlock) { } int embb_spin_lock(embb_spinlock_t* spinlock) { + if (NULL == spinlock) { + return EMBB_ERROR; + } int expected = 0; int spins = 1; @@ -143,6 +179,9 @@ int embb_spin_lock(embb_spinlock_t* spinlock) { int embb_spin_try_lock(embb_spinlock_t* spinlock, unsigned int max_number_spins) { + if (NULL == spinlock) { + return EMBB_ERROR; + } if (max_number_spins == 0) return EMBB_BUSY; @@ -161,6 +200,9 @@ int embb_spin_try_lock(embb_spinlock_t* spinlock, } int embb_spin_unlock(embb_spinlock_t* spinlock) { + if (NULL == spinlock) { + return EMBB_ERROR; + } int expected = 1; return embb_atomic_compare_and_swap_int(&spinlock->atomic_spin_variable_, &expected, 0) ? diff --git a/base_c/src/thread.c b/base_c/src/thread.c index e7abb40..0cfddf8 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -80,7 +80,9 @@ void embb_thread_yield() { int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, embb_thread_start_t func, void *arg) { - assert(thread != NULL); + if (thread == NULL) { + return EMBB_ERROR; + } thread->embb_internal_arg = (embb_internal_thread_arg_t*) embb_alloc(sizeof(embb_internal_thread_arg_t)); if (thread->embb_internal_arg == NULL) return EMBB_NOMEM; @@ -118,6 +120,9 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, } int embb_thread_join(embb_thread_t* thread, int* result_code) { + if (thread == NULL) { + return EMBB_ERROR; + } BOOL success; DWORD result; result = WaitForSingleObject(thread->embb_internal_handle, INFINITE); @@ -143,6 +148,9 @@ int embb_thread_join(embb_thread_t* thread, int* result_code) { } int embb_thread_equal(const embb_thread_t* lhs, const embb_thread_t* rhs) { + if (lhs == NULL || rhs == NULL) { + return 0; + } embb_thread_id_t idLhs = GetThreadId(lhs->embb_internal_handle); embb_thread_id_t idRhs = GetThreadId(rhs->embb_internal_handle); if (idLhs == idRhs) { @@ -203,6 +211,9 @@ void embb_thread_yield() { int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, embb_thread_start_t func, void* arg) { + if (thread == NULL) { + return EMBB_ERROR; + } pthread_attr_t attr; /* Used to set thread affinities */ int status = pthread_attr_init(&attr); if (status != 0) return EMBB_ERROR; @@ -250,6 +261,9 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, } int embb_thread_join(embb_thread_t* thread, int *result_code) { + if (thread == NULL) { + return EMBB_ERROR; + } int status = 0; status = pthread_join(thread->embb_internal_handle, NULL); if (result_code != NULL) { @@ -263,6 +277,9 @@ int embb_thread_join(embb_thread_t* thread, int *result_code) { } int embb_thread_equal(const embb_thread_t* lhs, const embb_thread_t* rhs) { + if (lhs == NULL || rhs == NULL) { + return 0; + } return pthread_equal(lhs->embb_internal_handle, rhs->embb_internal_handle); } diff --git a/base_c/src/thread_specific_storage.c b/base_c/src/thread_specific_storage.c index fea5d18..1b6e563 100644 --- a/base_c/src/thread_specific_storage.c +++ b/base_c/src/thread_specific_storage.c @@ -32,7 +32,9 @@ #include int embb_tss_create(embb_tss_t* tss) { - assert(tss != NULL); + if (tss == NULL) { + return EMBB_ERROR; + } tss->size = embb_thread_get_max_count(); tss->values = (void**) embb_alloc_cache_aligned(tss->size * sizeof(void*)); if (tss->values == NULL) { @@ -45,7 +47,9 @@ int embb_tss_create(embb_tss_t* tss) { } int embb_tss_set(embb_tss_t* tss, void* value) { - assert(tss != NULL); + if (tss == NULL) { + return EMBB_ERROR; + } unsigned int index = 0; int status = embb_internal_thread_index(&index); if ((status != EMBB_SUCCESS) || (index >= tss->size)) { @@ -56,8 +60,12 @@ int embb_tss_set(embb_tss_t* tss, void* value) { } void* embb_tss_get(const embb_tss_t* tss) { - assert(tss != NULL); - assert(tss->values != NULL); + if (tss == NULL) { + return NULL; + } + if (tss->values == NULL) { + return NULL; + } unsigned int index = 0; int status = embb_internal_thread_index(&index); if ((status != EMBB_SUCCESS) || (index >= tss->size)) { @@ -67,6 +75,8 @@ void* embb_tss_get(const embb_tss_t* tss) { } void embb_tss_delete(embb_tss_t* tss) { - assert(tss != NULL); + if (tss == NULL) { + return; + } embb_free_aligned(tss->values); } diff --git a/base_c/src/time.c b/base_c/src/time.c index bc92363..93e979b 100644 --- a/base_c/src/time.c +++ b/base_c/src/time.c @@ -33,10 +33,12 @@ void embb_time_now(embb_time_t* time) { } int embb_time_compare(const embb_time_t* lhs, const embb_time_t* rhs) { - assert(lhs != NULL); - assert(rhs != NULL); - assert(lhs->nanoseconds < 1000000000); - assert(rhs->nanoseconds < 1000000000); + if (lhs == NULL || rhs == NULL) { + return EMBB_ERROR; + } + if (lhs->nanoseconds >= 1000000000 || rhs->nanoseconds >= 1000000000) { + return EMBB_ERROR; + } if (lhs->seconds > rhs->seconds) { return 1; @@ -56,8 +58,9 @@ int embb_time_compare(const embb_time_t* lhs, const embb_time_t* rhs) { #ifdef EMBB_PLATFORM_THREADING_WINTHREADS int embb_time_in(embb_time_t* time, const embb_duration_t* duration) { - assert(time != NULL); - assert(duration != NULL); + if (time == NULL || duration == NULL) { + return EMBB_ERROR; + } /* Get system time */ SYSTEMTIME system_time; GetLocalTime(&system_time); @@ -87,8 +90,9 @@ int embb_time_in(embb_time_t* time, const embb_duration_t* duration) { #ifdef EMBB_PLATFORM_THREADING_POSIXTHREADS int embb_time_in(embb_time_t* time, const embb_duration_t* duration) { - assert(time != NULL); - assert(duration != NULL); + if (time == NULL || duration == NULL) { + return EMBB_ERROR; + } struct timespec unix_time; clock_gettime(CLOCK_REALTIME, &unix_time); time->seconds = unix_time.tv_sec; From 6a0eb53ffd801cfc7fc3ff4f723a5b17b6a56455 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 15:28:48 +0100 Subject: [PATCH 36/79] dataflow_cpp: changed internal exceptions to asserts --- dataflow_cpp/include/embb/dataflow/internal/in.h | 8 ++------ .../include/embb/dataflow/internal/inputs.h | 15 +++------------ .../include/embb/dataflow/internal/process.h | 5 +---- .../include/embb/dataflow/internal/select.h | 4 +--- .../include/embb/dataflow/internal/sink.h | 6 ++---- .../include/embb/dataflow/internal/switch.h | 4 +--- dataflow_cpp/include/embb/dataflow/network.h | 4 +--- 7 files changed, 11 insertions(+), 35 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index 60b4024..d5989f3 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -57,9 +57,7 @@ class In { Type GetValue(int clock) const { SignalType const & signal = GetSignal(clock); - if (signal.IsBlank()) - EMBB_THROW(embb::base::ErrorException, - "Signal is blank, cannot get a value.") + assert(!signal.IsBlank()); return signal.GetValue(); } @@ -86,9 +84,7 @@ class In { void Receive(SignalType const & value) { const int idx = value.GetClock() % Slices; - if (values_[idx].GetClock() >= value.GetClock()) - EMBB_THROW(embb::base::ErrorException, - "Received signal does not increase clock."); + assert(values_[idx].GetClock() < value.GetClock()); values_[idx] = value; listener_->OnClock(value.GetClock()); #if EMBB_DATAFLOW_TRACE_SIGNAL_HISTORY diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 7fc87b6..28c2dd8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -143,10 +143,7 @@ class InputsOnClock(clock); @@ -260,10 +257,7 @@ class Inputs } virtual void OnClock(int clock) { const int idx = clock % Slices; - if (count_[idx] == 0) { - EMBB_THROW(embb::base::ErrorException, - "All inputs already fired for this clock."); - } + assert(count_[idx] == 0); if (--count_[idx] == 0) { count_[idx] = 4; listener_->OnClock(clock); @@ -325,10 +319,7 @@ class Inputs } virtual void OnClock(int clock) { const int idx = clock % Slices; - if (count_[idx] == 0) { - EMBB_THROW(embb::base::ErrorException, - "All inputs already fired for this clock."); - } + assert(count_[idx] == 0); if (--count_[idx] == 0) { count_[idx] = 5; listener_->OnClock(clock); diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index e6f001a..214fbb8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -108,10 +108,7 @@ class Process< Slices, Serial, Inputs, } virtual void OnClock(int clock) { - if (!inputs_.AreAtClock(clock)) { - EMBB_THROW(embb::base::ErrorException, - "Some inputs are not at expected clock.") - } + assert(inputs_.AreAtClock(clock)); bool ordered = Serial; if (ordered) { diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index e184e2b..f4d4383 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -112,9 +112,7 @@ class Select virtual void OnClock(int clock) { //const int idx = clock % Slices; - if (!inputs_.AreAtClock(clock)) - EMBB_THROW(embb::base::ErrorException, - "Some inputs are not at expected clock.") + assert(inputs_.AreAtClock(clock)); Run(clock); } diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index 2c835ed..61bfc33 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -88,10 +88,8 @@ class Sink< Slices, Inputs > } virtual void OnClock(int clock) { - if (!inputs_.AreAtClock(clock)) { - EMBB_THROW(embb::base::ErrorException, - "Some inputs are not at expected clock.") - } + EMBB_UNUSED_IN_RELEASE(clock); + assert(inputs_.AreAtClock(clock)); bool retry = true; while (retry) { diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 0015ad9..2f23482 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -110,9 +110,7 @@ class Switch virtual void OnClock(int clock) { //const int idx = clock % Slices; - if (!inputs_.AreAtClock(clock)) - EMBB_THROW(embb::base::ErrorException, - "Some inputs are not at expected clock.") + assert(inputs_.AreAtClock(clock)); Run(clock); } diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 33dbaff..371a7ec 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -843,9 +843,7 @@ class Network : public internal::ClockListener { virtual void OnClock(int clock) { const int idx = clock % Slices; const int cnt = --sink_counter_[idx]; - if (cnt < 0) - EMBB_THROW(embb::base::ErrorException, - "More sinks than expected signaled reception of given clock.") + assert(cnt == 0); } /** From 54508d87c354bc16819dbf5d49aeecf600c89e53 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 15:36:47 +0100 Subject: [PATCH 37/79] base_cpp: added exceptions when errors dependent on user input occur --- base_cpp/src/mutex.cc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/base_cpp/src/mutex.cc b/base_cpp/src/mutex.cc index be387f1..f340709 100644 --- a/base_cpp/src/mutex.cc +++ b/base_cpp/src/mutex.cc @@ -32,7 +32,10 @@ namespace base { namespace internal { MutexBase::MutexBase(int mutex_type) : mutex_() { - embb_mutex_init(&mutex_, mutex_type); + int result = embb_mutex_init(&mutex_, mutex_type); + if (EMBB_SUCCESS != result) { + EMBB_THROW(ErrorException, "Could not initialize mutex."); + } } MutexBase::~MutexBase() { @@ -40,7 +43,10 @@ MutexBase::~MutexBase() { } void MutexBase::Lock() { - embb_mutex_lock(&mutex_); + int result = embb_mutex_lock(&mutex_); + if (EMBB_SUCCESS != result) { + EMBB_THROW(ErrorException, "Could not lock mutex."); + } } bool MutexBase::TryLock() { @@ -49,7 +55,10 @@ bool MutexBase::TryLock() { } void MutexBase::Unlock() { - embb_mutex_unlock(&mutex_); + int result = embb_mutex_unlock(&mutex_); + if (EMBB_SUCCESS != result) { + EMBB_THROW(ErrorException, "Could not unlock mutex."); + } } } // namespace internal From 356f023c5e7af35a9626f26fbb1ea8cbab57d995 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 15:56:23 +0100 Subject: [PATCH 38/79] dataflow_cpp: removed gcc warning --- dataflow_cpp/include/embb/dataflow/network.h | 1 + 1 file changed, 1 insertion(+) diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 371a7ec..b10b910 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -844,6 +844,7 @@ class Network : public internal::ClockListener { const int idx = clock % Slices; const int cnt = --sink_counter_[idx]; assert(cnt == 0); + EMBB_UNUSED_IN_RELEASE(cnt); } /** From 418d014312d4054ce625da1c07db3fc447a1492d Mon Sep 17 00:00:00 2001 From: Tobias Schuele Date: Wed, 24 Feb 2016 22:14:15 +0100 Subject: [PATCH 39/79] Changed year in tutorial.tex --- doc/tutorial/tutorial.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/tutorial/tutorial.tex b/doc/tutorial/tutorial.tex index 4e969e1..39e3c12 100644 --- a/doc/tutorial/tutorial.tex +++ b/doc/tutorial/tutorial.tex @@ -81,7 +81,7 @@ % 1st paramter: a square(!) picture % 2nd parameter: short tile (one line) % 3rd parameter: long title (up to two lines) -\gentitlepage{pics/chicago-square.jpg}{\LARGE Siemens Corporate Technology | \monthword{\month} 2015}{\scalebox{0.9}{Embedded Multicore Building Blocks}\\\scalebox{0.9}{Introduction and Tutorial}} +\gentitlepage{pics/chicago-square.jpg}{\LARGE Siemens Corporate Technology | \monthword{\month} 2016}{\scalebox{0.9}{Embedded Multicore Building Blocks}\\\scalebox{0.9}{Introduction and Tutorial}} % List the authors and contributors on the second page, right after the cover page % 1st parameter: contributors (optional) From 8ca94138b45f1df7807a45e9faa2b6b5c873fe7c Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 24 Feb 2016 16:06:13 +0100 Subject: [PATCH 40/79] dataflow_cpp: missed some exceptions, fixed wrong asserts --- .../include/embb/dataflow/internal/inputs.h | 16 +++++----------- dataflow_cpp/include/embb/dataflow/network.h | 5 ++--- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 28c2dd8..5792354 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -90,10 +90,7 @@ class Inputs 0); if (--count_[idx] == 0) { count_[idx] = 1; listener_->OnClock(clock); @@ -143,7 +140,7 @@ class Inputs 0); if (--count_[idx] == 0) { count_[idx] = 2; listener_->OnClock(clock); @@ -197,10 +194,7 @@ class Inputs 0); if (--count_[idx] == 0) { count_[idx] = 3; listener_->OnClock(clock); @@ -257,7 +251,7 @@ class Inputs } virtual void OnClock(int clock) { const int idx = clock % Slices; - assert(count_[idx] == 0); + assert(count_[idx] > 0); if (--count_[idx] == 0) { count_[idx] = 4; listener_->OnClock(clock); @@ -319,7 +313,7 @@ class Inputs } virtual void OnClock(int clock) { const int idx = clock % Slices; - assert(count_[idx] == 0); + assert(count_[idx] > 0); if (--count_[idx] == 0) { count_[idx] = 5; listener_->OnClock(clock); diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index b10b910..4297b87 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -842,9 +842,8 @@ class Network : public internal::ClockListener { */ virtual void OnClock(int clock) { const int idx = clock % Slices; - const int cnt = --sink_counter_[idx]; - assert(cnt == 0); - EMBB_UNUSED_IN_RELEASE(cnt); + assert(sink_counter_[idx] > 0); + --sink_counter_[idx]; } /** From fdbf2f949d8bf8b93c8967a8c7c57e4fcc832214 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 3 Mar 2016 11:59:01 +0100 Subject: [PATCH 41/79] containers_cpp: fixed codesonar warning --- .../embb/containers/internal/lock_free_tree_value_pool-inl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h index c808e79..6965fe1 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_tree_value_pool-inl.h @@ -136,8 +136,10 @@ allocate_rec(int node, Type& element) { do { current = tree_[node]; desired = current - 1; - if (desired < 0) + if (desired < 0) { + element = Type(); return -1; + } } while (!tree_[node].CompareAndSwap(current, desired)); int leftResult = allocate_rec(GetLeftChildIndex(node), element); From 5f59e812ce0ffa2a889fca59467f50579d4caf1a Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 3 Mar 2016 12:11:45 +0100 Subject: [PATCH 42/79] dataflow_cpp: fixed codesonar warning --- .../include/embb/containers/internal/lock_free_stack-inl.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h index 572aa32..b5ff2c5 100644 --- a/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h +++ b/containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h @@ -123,8 +123,10 @@ bool LockFreeStack< Type, ValuePool >::TryPop(Type & element) { top_cached = top; // Stack empty, cannot pop - if (top_cached == NULL) + if (top_cached == NULL) { + element = Type(); return false; + } // Guard top_cached hazardPointer.Guard(0, top_cached); From 5e2f3132125576c5018cb7ae93fba72832250bb5 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 3 Mar 2016 20:12:32 +0100 Subject: [PATCH 43/79] base_c: functions without error code return only assert the validity of their arguments, documentation changed accordingly --- base_c/include/embb/base/c/core_set.h | 35 ++++++++++++++----- base_c/include/embb/base/c/counter.h | 10 ++++-- .../include/embb/base/c/memory_allocation.h | 4 +++ base_c/include/embb/base/c/mutex.h | 4 +-- .../embb/base/c/thread_specific_storage.h | 2 +- base_c/src/core_set.c | 5 +++ base_c/src/counter.c | 12 ++----- base_c/src/memory_allocation.c | 17 +++------ base_c/src/mutex.c | 9 ++--- base_c/src/thread_specific_storage.c | 4 +-- 10 files changed, 57 insertions(+), 45 deletions(-) diff --git a/base_c/include/embb/base/c/core_set.h b/base_c/include/embb/base/c/core_set.h index 0980fef..0c9b22d 100644 --- a/base_c/include/embb/base/c/core_set.h +++ b/base_c/include/embb/base/c/core_set.h @@ -81,6 +81,8 @@ unsigned int embb_core_count_available(); * The second parameter specifies whether the set is initially empty or contains * all cores. * + * \pre \c core_set is not NULL. + * * \notthreadsafe */ void embb_core_set_init( @@ -96,6 +98,9 @@ void embb_core_set_init( * * If the core is already contained in the set, the operation has no effect. * + * \pre \c core_set is not NULL and \c core_number is smaller than + * embb_core_count_available(). + * * \notthreadsafe * \see embb_core_set_remove() */ @@ -107,13 +112,16 @@ void embb_core_set_add( ); /** -* Removes a core from the specified set. -* -* If the core is not in the set, the operation has no effect. -* -* \notthreadsafe -* \see embb_core_set_add() -*/ + * Removes a core from the specified set. + * + * If the core is not in the set, the operation has no effect. + * + * \pre \c core_set is not NULL and \c core_number is smaller than + * embb_core_count_available(). + * + * \notthreadsafe + * \see embb_core_set_add() + */ void embb_core_set_remove( embb_core_set_t* core_set, /**< [IN/OUT] Core set to be manipulated */ @@ -124,8 +132,11 @@ void embb_core_set_remove( /** * Determines whether a core is contained in the specified set. * - * \return 0 if the core is not contained in the set, otherwise a number greater - * than zero. + * \pre \c core_set is not NULL and \c core_number is smaller than + * embb_core_count_available(). + * + * \return 0 if the core is not contained in the set, otherwise a number + * greater than zero. * \notthreadsafe */ int embb_core_set_contains( @@ -140,6 +151,8 @@ int embb_core_set_contains( * * The result is stored in \c set1. * + * \pre \c set1 and \c set2 are not NULL. + * * \notthreadsafe * \see embb_core_set_union() */ @@ -155,6 +168,8 @@ void embb_core_set_intersection( * * The result is stored in \c set1. * +* \pre \c set1 and \c set2 are not NULL. +* * \notthreadsafe * \see embb_core_set_intersection() */ @@ -168,6 +183,8 @@ void embb_core_set_union( /** * Returns the number of cores contained in the specified set. * + * \pre \c core_set is not NULL. + * * \notthreadsafe * \return Number of cores in \c core_set */ diff --git a/base_c/include/embb/base/c/counter.h b/base_c/include/embb/base/c/counter.h index 05536a2..9a7861e 100644 --- a/base_c/include/embb/base/c/counter.h +++ b/base_c/include/embb/base/c/counter.h @@ -67,6 +67,8 @@ int embb_counter_init( /** * Returns the current value of \c counter. * + * \pre \c counter is not NULL. + * * \return Current value * * \waitfree @@ -79,6 +81,8 @@ unsigned int embb_counter_get( /** * Increments \c counter and returns the old value. * + * \pre \c counter is not NULL. + * * \return Old, non-incremented value * \waitfree */ @@ -90,6 +94,8 @@ unsigned int embb_counter_increment( /** * Decrements \c counter and returns the old value. * + * \pre \c counter is not NULL. + * * \return Old, non-decremented value * \waitfree */ @@ -101,8 +107,8 @@ unsigned int embb_counter_decrement( /** * Destroys an initialized counter. * - * \pre Counter is initialized - * \post Counter is invalid and cannot be used anymore + * \pre \c counter is initialized and not NULL. + * \post \c counter is invalid and cannot be used anymore * \waitfree */ void embb_counter_destroy( diff --git a/base_c/include/embb/base/c/memory_allocation.h b/base_c/include/embb/base/c/memory_allocation.h index c9d797d..fbc0bda 100644 --- a/base_c/include/embb/base/c/memory_allocation.h +++ b/base_c/include/embb/base/c/memory_allocation.h @@ -73,6 +73,8 @@ extern "C" { * * Keeps track of freed memory in debug mode. * + * \pre \c ptr is not NULL. + * * \threadsafe * * \see embb_get_bytes_allocated() @@ -161,6 +163,8 @@ extern "C" { * * Keeps track of freed memory in debug mode. * + * \pre \c ptr is not NULL and was allocated by an aligned method. + * * \threadsafe * * \see embb_alloc_aligned(), embb_alloc_cache_aligned(), diff --git a/base_c/include/embb/base/c/mutex.h b/base_c/include/embb/base/c/mutex.h index dd15c89..5ecfa70 100644 --- a/base_c/include/embb/base/c/mutex.h +++ b/base_c/include/embb/base/c/mutex.h @@ -150,7 +150,7 @@ int embb_mutex_unlock( /** * Destroys a mutex and frees its resources. * - * \pre \c mutex has been initialized + * \pre \c mutex has been initialized and is not NULL. * \post \c mutex is uninitialized * \notthreadsafe * \see embb_mutex_init() @@ -233,7 +233,7 @@ int embb_spin_unlock( /** * Destroys a spinlock and frees its resources. * - * \pre \c spinlock has been initialized + * \pre \c spinlock has been initialized and is not NULL. * \post \c spinlock is uninitialized * \notthreadsafe * \see embb_spin_init() diff --git a/base_c/include/embb/base/c/thread_specific_storage.h b/base_c/include/embb/base/c/thread_specific_storage.h index 3b70bed..b9165dc 100644 --- a/base_c/include/embb/base/c/thread_specific_storage.h +++ b/base_c/include/embb/base/c/thread_specific_storage.h @@ -112,7 +112,7 @@ void* embb_tss_get( * * Does not delete the values pointed to. * - * \pre TSS has been created successfully + * \pre \c tss has been created successfully and is not NULL. * \post All slots are deleted * \notthreadsafe * \see embb_tss_create() diff --git a/base_c/src/core_set.c b/base_c/src/core_set.c index aa142f3..644aeaf 100644 --- a/base_c/src/core_set.c +++ b/base_c/src/core_set.c @@ -146,13 +146,18 @@ int embb_core_set_contains(const embb_core_set_t* core_set, void embb_core_set_intersection(embb_core_set_t* set1, const embb_core_set_t* set2) { + assert(set1 != NULL); + assert(set2 != NULL); embb_bitset_intersect(&set1->rep, set2->rep); } void embb_core_set_union(embb_core_set_t* set1, const embb_core_set_t* set2) { + assert(set1 != NULL); + assert(set2 != NULL); embb_bitset_union(&set1->rep, set2->rep); } unsigned int embb_core_set_count(const embb_core_set_t* core_set) { + assert(core_set != NULL); return embb_bitset_count(&core_set->rep); } diff --git a/base_c/src/counter.c b/base_c/src/counter.c index 5ebbe86..7521214 100644 --- a/base_c/src/counter.c +++ b/base_c/src/counter.c @@ -38,23 +38,17 @@ int embb_counter_init(embb_counter_t* counter) { } unsigned int embb_counter_get(embb_counter_t* counter) { - if (counter == NULL) { - return EMBB_ERROR; - } + assert(counter != NULL); return embb_atomic_load_unsigned_int(&(counter->value)); } unsigned int embb_counter_increment(embb_counter_t* counter) { - if (counter == NULL) { - return EMBB_ERROR; - } + assert(counter != NULL); return embb_atomic_fetch_and_add_unsigned_int(&(counter->value), 1); } unsigned int embb_counter_decrement(embb_counter_t* counter) { - if (counter == NULL) { - return EMBB_ERROR; - } + assert(counter != NULL); return embb_atomic_fetch_and_add_unsigned_int(&(counter->value), (unsigned int)-1); } diff --git a/base_c/src/memory_allocation.c b/base_c/src/memory_allocation.c index 7c009c0..8adb004 100644 --- a/base_c/src/memory_allocation.c +++ b/base_c/src/memory_allocation.c @@ -62,9 +62,7 @@ void* embb_alloc(size_t bytes) { } void embb_free(void * ptr) { - if (ptr == NULL) { - return; - } + assert(ptr != NULL); size_t * alloc_type = (size_t*)ptr - 1; size_t * bytes_allocated = (size_t*)ptr - 2; @@ -136,9 +134,7 @@ void* embb_alloc_aligned(size_t alignment, size_t size) { } void embb_free_aligned(void* ptr) { - if (ptr == NULL) { - return; - } + assert(ptr != NULL); size_t* ptr_conv = (size_t*)ptr; @@ -165,10 +161,7 @@ void * embb_alloc(size_t bytes) { } void embb_free(void * ptr) { - if (ptr == NULL) { - return; - } - + assert(ptr != NULL); free(ptr); } @@ -201,9 +194,7 @@ void *embb_alloc_aligned(size_t alignment, size_t size) { } void embb_free_aligned(void* ptr) { - if (ptr == NULL) { - return; - } + assert(ptr != NULL); #ifdef EMBB_PLATFORM_COMPILER_MSVC _aligned_free(ptr); diff --git a/base_c/src/mutex.c b/base_c/src/mutex.c index e1914ff..06851d7 100644 --- a/base_c/src/mutex.c +++ b/base_c/src/mutex.c @@ -69,9 +69,7 @@ int embb_mutex_unlock(embb_mutex_t* mutex) { } void embb_mutex_destroy(embb_mutex_t* mutex) { - if (NULL == mutex) { - return; - } + assert(NULL != mutex); DeleteCriticalSection(mutex); } @@ -139,9 +137,7 @@ int embb_mutex_unlock(embb_mutex_t* mutex) { } void embb_mutex_destroy(embb_mutex_t* mutex) { - if (NULL == mutex) { - return; - } + assert(NULL != mutex); pthread_mutex_destroy(mutex); } @@ -210,6 +206,7 @@ int embb_spin_unlock(embb_spinlock_t* spinlock) { } void embb_spin_destroy(embb_spinlock_t* spinlock) { + assert(NULL != spinlock); // for now, doing nothing here... in future, will call the respective // destroy function for atomics... EMBB_UNUSED(spinlock); diff --git a/base_c/src/thread_specific_storage.c b/base_c/src/thread_specific_storage.c index 1b6e563..3b05b59 100644 --- a/base_c/src/thread_specific_storage.c +++ b/base_c/src/thread_specific_storage.c @@ -75,8 +75,6 @@ void* embb_tss_get(const embb_tss_t* tss) { } void embb_tss_delete(embb_tss_t* tss) { - if (tss == NULL) { - return; - } + assert(tss != NULL); embb_free_aligned(tss->values); } From 27706c21b25e86e12ad72d7f5212112475b99caa Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Fri, 4 Mar 2016 09:56:29 +0100 Subject: [PATCH 44/79] base_c: created defines for version mtapi_c: added organization ids, used version defines from base_c to fill info structure --- base_c/include/embb/base/c/internal/cmake_config.h.in | 6 ++++++ mtapi_c/include/embb/mtapi/c/mtapi.h | 11 +++++++++++ mtapi_c/src/embb_mtapi_node_t.c | 7 +++++-- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/base_c/include/embb/base/c/internal/cmake_config.h.in b/base_c/include/embb/base/c/internal/cmake_config.h.in index 21b3048..f86d3e6 100644 --- a/base_c/include/embb/base/c/internal/cmake_config.h.in +++ b/base_c/include/embb/base/c/internal/cmake_config.h.in @@ -53,4 +53,10 @@ */ #cmakedefine EMBB_PLATFORM_HAS_GLIB_CPU + +#define EMBB_BASE_VERSION_MAJOR ${EMBB_BASE_VERSION_MAJOR} +#define EMBB_BASE_VERSION_MINOR ${EMBB_BASE_VERSION_MINOR} +#define EMBB_BASE_VERSION_PATCH ${EMBB_BASE_VERSION_PATCH} + + #endif /* EMBB_BASE_INTERNAL_CMAKE_CONFIG_H_ */ diff --git a/mtapi_c/include/embb/mtapi/c/mtapi.h b/mtapi_c/include/embb/mtapi/c/mtapi.h index a146def..0de84bb 100644 --- a/mtapi_c/include/embb/mtapi/c/mtapi.h +++ b/mtapi_c/include/embb/mtapi/c/mtapi.h @@ -250,6 +250,17 @@ extern "C" { #endif +/* ---- MCA ORGANIZATION IDS ----------------------------------------------- */ + +#define MCA_ORG_ID_PSI 0 /* PolyCore Software, Inc. */ +#define MCA_ORG_ID_FSL 1 /* Freescale, Inc. */ +#define MCA_ORG_ID_MGC 2 /* Mentor Graphics, Corp. */ +#define MCA_ORG_ID_ADI 3 /* Analog Devices */ +#define MCA_ORG_ID_SIE 4 /* Siemens */ +#define MCA_ORG_ID_EMB 5 /* EMB2 project */ +#define MCA_ORG_ID_TBD 6 /* TBD */ + + /* ---- BASIC DEFINITIONS -------------------------------------------------- */ /** marks input parameters */ diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index 75acf4a..c0bf58c 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -39,6 +39,8 @@ #include #include +#include + static embb_mtapi_node_t* embb_mtapi_node_instance = NULL; @@ -121,8 +123,9 @@ void mtapi_initialize( if (MTAPI_NULL != node->scheduler) { /* fill information structure */ node->info.mtapi_version = 0x1000; // mtapi version 1.0 - node->info.organization_id = 'LYH '; // siemens fcc prefix - node->info.implementation_version = 0x0003; // implementation version 0.3 + node->info.organization_id = MCA_ORG_ID_EMB; + node->info.implementation_version = + EMBB_BASE_VERSION_MAJOR * 0x1000 + EMBB_BASE_VERSION_MINOR; node->info.number_of_domains = 1; node->info.number_of_nodes = 1; node->info.hardware_concurrency = embb_core_count_available(); From 964110133fb26086d2ebfd31985900c08d4fab4c Mon Sep 17 00:00:00 2001 From: Tobias Schuele Date: Fri, 4 Mar 2016 12:38:27 +0100 Subject: [PATCH 45/79] Changed Doxygen documentation --- base_c/include/embb/base/c/mutex.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_c/include/embb/base/c/mutex.h b/base_c/include/embb/base/c/mutex.h index 5ecfa70..2d6c000 100644 --- a/base_c/include/embb/base/c/mutex.h +++ b/base_c/include/embb/base/c/mutex.h @@ -150,7 +150,7 @@ int embb_mutex_unlock( /** * Destroys a mutex and frees its resources. * - * \pre \c mutex has been initialized and is not NULL. + * \pre \c mutex is initialized and is not NULL. * \post \c mutex is uninitialized * \notthreadsafe * \see embb_mutex_init() @@ -233,7 +233,7 @@ int embb_spin_unlock( /** * Destroys a spinlock and frees its resources. * - * \pre \c spinlock has been initialized and is not NULL. + * \pre \c spinlock is initialized and is not NULL. * \post \c spinlock is uninitialized * \notthreadsafe * \see embb_spin_init() From b9ca6dc90637713ea3ca8301f24994a76d7f2a63 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 7 Mar 2016 10:39:28 +0100 Subject: [PATCH 46/79] base_c: fixed implementation of atomic store to ensure sequential consistency --- base_c/src/atomicfunc_32.asm | 2 +- base_c/src/atomicfunc_64.asm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base_c/src/atomicfunc_32.asm b/base_c/src/atomicfunc_32.asm index c485ee5..3174b40 100644 --- a/base_c/src/atomicfunc_32.asm +++ b/base_c/src/atomicfunc_32.asm @@ -114,7 +114,7 @@ define_or_assign @embb_internal__atomic_or_assign_1_asm@8, byte, dl define_store macro name, size, value public name name proc - mov size ptr [ecx], value + xchg size ptr [ecx], value ret name endp endm diff --git a/base_c/src/atomicfunc_64.asm b/base_c/src/atomicfunc_64.asm index 55e0567..8e5e658 100644 --- a/base_c/src/atomicfunc_64.asm +++ b/base_c/src/atomicfunc_64.asm @@ -107,7 +107,7 @@ define_or_assign embb_internal__atomic_or_assign_1_asm, byte, dl define_store macro name, size, value public name name proc - mov size ptr [rcx], value + xchg size ptr [rcx], value ret name endp endm From f9cb0a92ff41fb37ec3cbe4933f651757b2fae90 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 7 Mar 2016 11:23:25 +0100 Subject: [PATCH 47/79] base_c: fixed checks and documentation in time, duration and log --- base_c/include/embb/base/c/duration.h | 2 ++ base_c/include/embb/base/c/log.h | 1 + base_c/include/embb/base/c/time.h | 2 ++ base_c/src/duration.c | 9 ++------- base_c/src/log.c | 2 ++ base_c/src/time.c | 9 ++------- 6 files changed, 11 insertions(+), 14 deletions(-) diff --git a/base_c/include/embb/base/c/duration.h b/base_c/include/embb/base/c/duration.h index 1af05db..7f943fb 100644 --- a/base_c/include/embb/base/c/duration.h +++ b/base_c/include/embb/base/c/duration.h @@ -249,6 +249,8 @@ int embb_duration_as_seconds( /** * Compares two durations. * + * \pre \c lhs and \c rhs are not NULL and properly initialized. + * * \return -1 if \c lhs < \c rhs \n * 0 if \c lhs == \c rhs \n * 1 if \c lhs > \c rhs diff --git a/base_c/include/embb/base/c/log.h b/base_c/include/embb/base/c/log.h index 31c5128..bf73dc5 100644 --- a/base_c/include/embb/base/c/log.h +++ b/base_c/include/embb/base/c/log.h @@ -67,6 +67,7 @@ typedef void(*embb_log_function_t)(void * context, char const * message); /** * Default logging function. * Writes to the given file (context needs to be a FILE*). + * \pre \c context is not NULL. * \ingroup C_LOG * \threadsafe */ diff --git a/base_c/include/embb/base/c/time.h b/base_c/include/embb/base/c/time.h index 3316253..e4f1d18 100644 --- a/base_c/include/embb/base/c/time.h +++ b/base_c/include/embb/base/c/time.h @@ -89,6 +89,8 @@ int embb_time_in( /** * Compares two time points. * + * \pre \c lhs and \c rhs are not NULL and properly initialized. + * * \return -1 if \c lhs < \c rhs \n * 0 if \c lhs == \c rhs \n * 1 if \c lhs > \c rhs diff --git a/base_c/src/duration.c b/base_c/src/duration.c index 565b6f3..a8d376d 100644 --- a/base_c/src/duration.c +++ b/base_c/src/duration.c @@ -183,7 +183,6 @@ int embb_duration_as_seconds(const embb_duration_t* duration, if (duration->nanoseconds % 1000000000 > 0) { return EMBB_UNDERFLOW; } - assert(duration->nanoseconds % 1000000000 == 0); if (duration->seconds > ULLONG_MAX) { return EMBB_OVERFLOW; } @@ -193,12 +192,8 @@ int embb_duration_as_seconds(const embb_duration_t* duration, int embb_duration_compare(const embb_duration_t* lhs, const embb_duration_t* rhs) { - if (lhs == NULL || rhs == NULL) { - return EMBB_ERROR; - } - if (lhs->nanoseconds >= 1000000000 || rhs->nanoseconds >= 1000000000) { - return EMBB_ERROR; - } + assert(lhs != NULL && rhs != NULL); + assert(lhs->nanoseconds < 1000000000 && rhs->nanoseconds < 1000000000); if (lhs->seconds > rhs->seconds) { return 1; } else if (lhs->seconds < rhs->seconds) { diff --git a/base_c/src/log.c b/base_c/src/log.c index a622275..bf733e9 100644 --- a/base_c/src/log.c +++ b/base_c/src/log.c @@ -27,6 +27,7 @@ #include #include #include +#include #include @@ -35,6 +36,7 @@ void embb_log_write_file( void * context, char const * message) { + assert(context != NULL); FILE * ff = (FILE*)context; fprintf(ff, "%s", message); fflush(ff); diff --git a/base_c/src/time.c b/base_c/src/time.c index 045fa13..0b0d3fe 100644 --- a/base_c/src/time.c +++ b/base_c/src/time.c @@ -33,13 +33,8 @@ void embb_time_now(embb_time_t* time) { } int embb_time_compare(const embb_time_t* lhs, const embb_time_t* rhs) { - if (lhs == NULL || rhs == NULL) { - return EMBB_ERROR; - } - if (lhs->nanoseconds >= 1000000000 || rhs->nanoseconds >= 1000000000) { - return EMBB_ERROR; - } - + assert(lhs != NULL && rhs != NULL); + assert(lhs->nanoseconds < 1000000000 && rhs->nanoseconds < 1000000000); if (lhs->seconds > rhs->seconds) { return 1; } else if (lhs->seconds < rhs->seconds) { From 25efcf878276909ea597220aa1988b83709d564a Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 8 Mar 2016 09:29:53 +0100 Subject: [PATCH 48/79] base_c: removed double code introduced by automerge --- base_c/src/thread.c | 1 - 1 file changed, 1 deletion(-) diff --git a/base_c/src/thread.c b/base_c/src/thread.c index 1388075..784276f 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -279,7 +279,6 @@ int embb_thread_join(embb_thread_t* thread, int *result_code) { return EMBB_ERROR; } int status = 0; - if (thread == NULL) return EMBB_ERROR; status = pthread_join(thread->embb_internal_handle, NULL); if (thread->embb_internal_arg != NULL) { if (result_code != NULL) { From 900bc329d62ae3a0ccf34c22056250c79342b04b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 8 Mar 2016 17:19:11 +0100 Subject: [PATCH 49/79] mtapi_c: report "unlimited" number of domains and nodes --- mtapi_c/src/embb_mtapi_node_t.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_node_t.c b/mtapi_c/src/embb_mtapi_node_t.c index fc17af6..da6a8b3 100644 --- a/mtapi_c/src/embb_mtapi_node_t.c +++ b/mtapi_c/src/embb_mtapi_node_t.c @@ -135,8 +135,8 @@ void mtapi_initialize( node->info.organization_id = MCA_ORG_ID_EMB; node->info.implementation_version = EMBB_BASE_VERSION_MAJOR * 0x1000 + EMBB_BASE_VERSION_MINOR; - node->info.number_of_domains = 1; - node->info.number_of_nodes = 1; + node->info.number_of_domains = ~0u; + node->info.number_of_nodes = ~0u; node->info.hardware_concurrency = embb_core_count_available(); node->info.used_memory = embb_mtapi_alloc_get_bytes_allocated(); if (MTAPI_NULL != mtapi_info) { From f3c23332d5ba04fc2f4be529d1630079f37e43e4 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 9 Mar 2016 13:01:50 +0100 Subject: [PATCH 50/79] base_cpp: fixed log test --- base_cpp/test/log_test.cc | 101 +++++++++++++++++--------------------- 1 file changed, 45 insertions(+), 56 deletions(-) diff --git a/base_cpp/test/log_test.cc b/base_cpp/test/log_test.cc index bb68181..fe8fde8 100644 --- a/base_cpp/test/log_test.cc +++ b/base_cpp/test/log_test.cc @@ -28,7 +28,7 @@ #include #include -#include +#include namespace embb { namespace base { @@ -38,7 +38,7 @@ LogTest::LogTest() { CreateUnit("Test all").Add(&LogTest::Test, this); } -static char const * logged_message; +static std::string logged_message; static void test_log_function(void * context, char const * msg) { EMBB_UNUSED(context); @@ -48,101 +48,90 @@ static void test_log_function(void * context, char const * msg) { void LogTest::Test() { using embb::base::Log; char const * test_msg = "hello"; - char const * null = 0; Log::SetLogFunction(0, test_log_function); Log::SetLogLevel(EMBB_LOG_LEVEL_TRACE); - logged_message = null; + logged_message = "none"; Log::Trace("chn", test_msg); #ifdef EMBB_DEBUG - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [TRACE] hello")); + PT_EXPECT(logged_message == "[chn] - [TRACE] hello"); #else - PT_EXPECT_EQ(null, logged_message); + PT_EXPECT(logged_message == "none"); #endif - logged_message = null; + logged_message = "none"; Log::Info("chn", test_msg); #ifdef EMBB_DEBUG - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [INFO ] hello")); + PT_EXPECT(logged_message == "[chn] - [INFO ] hello"); #else - PT_EXPECT_EQ(null, logged_message); + PT_EXPECT(logged_message == "none"); #endif - logged_message = null; + logged_message = "none"; Log::Warning("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); - logged_message = null; + PT_EXPECT(logged_message == "[chn] - [WARN ] hello"); + logged_message = "none"; Log::Error("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); + PT_EXPECT(logged_message == "[chn] - [ERROR] hello"); Log::SetLogLevel(EMBB_LOG_LEVEL_INFO); - logged_message = null; + logged_message = "none"; Log::Trace("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Info("chn", test_msg); #ifdef EMBB_DEBUG - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [INFO ] hello")); + PT_EXPECT(logged_message == "[chn] - [INFO ] hello"); #else - PT_EXPECT_EQ(null, logged_message); + PT_EXPECT(logged_message == "none"); #endif - logged_message = null; + logged_message = "none"; Log::Warning("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); - logged_message = null; + PT_EXPECT(logged_message == "[chn] - [WARN ] hello"); + logged_message = "none"; Log::Error("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); + PT_EXPECT(logged_message == "[chn] - [ERROR] hello"); Log::SetLogLevel(EMBB_LOG_LEVEL_WARNING); - logged_message = null; + logged_message = "none"; Log::Trace("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Info("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Warning("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [WARN ] hello")); - logged_message = null; + PT_EXPECT(logged_message == "[chn] - [WARN ] hello"); + logged_message = "none"; Log::Error("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); + PT_EXPECT(logged_message == "[chn] - [ERROR] hello"); Log::SetLogLevel(EMBB_LOG_LEVEL_ERROR); - logged_message = null; + logged_message = "none"; Log::Trace("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Info("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Warning("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Error("chn", test_msg); - PT_ASSERT_NE(logged_message, null); - PT_EXPECT(0 == strcmp(logged_message, "[chn] - [ERROR] hello")); + PT_EXPECT(logged_message == "[chn] - [ERROR] hello"); Log::SetLogLevel(EMBB_LOG_LEVEL_NONE); - logged_message = null; + logged_message = "none"; Log::Trace("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Info("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Warning("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); - logged_message = null; + PT_EXPECT(logged_message == "none"); + logged_message = "none"; Log::Error("chn", test_msg); - PT_EXPECT_EQ(null, logged_message); + PT_EXPECT(logged_message == "none"); } } // namespace test From 87cee4dd9573c39697ef792634dbd2278a3b9af1 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 10 Mar 2016 09:26:29 +0100 Subject: [PATCH 51/79] base_c: fixed compiler warning on linux --- base_c/src/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_c/src/thread.c b/base_c/src/thread.c index 784276f..f88b2ab 100644 --- a/base_c/src/thread.c +++ b/base_c/src/thread.c @@ -241,7 +241,7 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, status = pthread_attr_setaffinity_np(&attr, sizeof(cpuset), &cpuset); if (status != 0) { thread->embb_internal_arg = NULL; - thread->embb_internal_handle = NULL; + thread->embb_internal_handle = 0; return EMBB_ERROR; } #else @@ -254,7 +254,7 @@ int embb_thread_create(embb_thread_t* thread, const embb_core_set_t* core_set, thread->embb_internal_arg = (embb_internal_thread_arg_t*) embb_alloc(sizeof(embb_internal_thread_arg_t)); if (thread->embb_internal_arg == NULL) { - thread->embb_internal_handle = NULL; + thread->embb_internal_handle = 0; pthread_attr_destroy(&attr); return EMBB_NOMEM; } From 4dadd0cdcedc0cc97d9281d249520bf489cad687 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 10 Mar 2016 17:00:18 +0100 Subject: [PATCH 52/79] dataflow_cpp: removed Network::Make for simpler usage, added Network:IsValid to check network for errors tutorial: adapted to reflect changes to dataflow_cpp examples: adapted to reflect changes to dataflow_cpp --- .../embb/dataflow/internal/clock_listener.h | 10 - .../embb/dataflow/internal/constant_source.h | 10 +- .../include/embb/dataflow/internal/in.h | 5 - .../include/embb/dataflow/internal/inputs.h | 148 +++++++------- .../include/embb/dataflow/internal/node.h | 2 +- .../include/embb/dataflow/internal/out.h | 10 +- .../include/embb/dataflow/internal/outputs.h | 10 + .../include/embb/dataflow/internal/process.h | 31 ++- .../embb/dataflow/internal/process_executor.h | 50 ----- .../include/embb/dataflow/internal/select.h | 18 +- .../include/embb/dataflow/internal/sink.h | 33 ++-- .../include/embb/dataflow/internal/source.h | 8 +- .../embb/dataflow/internal/source_executor.h | 33 ---- .../include/embb/dataflow/internal/switch.h | 17 +- dataflow_cpp/include/embb/dataflow/network.h | 184 +++++++++--------- dataflow_cpp/test/dataflow_cpp_test_simple.cc | 39 ++-- doc/examples/dataflow/dataflow_add-snippet.h | 1 - .../dataflow_declare_add_sources-snippet.h | 9 +- .../dataflow_declare_replace-snippet.h | 6 +- .../dataflow/dataflow_declare_sink-snippet.h | 2 +- .../dataflow_declare_source-snippet.h | 2 +- .../dataflow/dataflow_linear-fragmented.cc | 3 +- doc/examples/dataflow/dataflow_make-snippet.h | 2 +- .../dataflow/dataflow_network-snippet.h | 1 - .../dataflow/dataflow_nonlinear-fragmented.cc | 23 ++- doc/examples/dataflow/dataflow_run-snippet.h | 2 +- doc/tutorial/content/dataflow.tex | 13 +- tasks_cpp/src/node.cc | 6 +- 28 files changed, 290 insertions(+), 388 deletions(-) delete mode 100644 doc/examples/dataflow/dataflow_add-snippet.h diff --git a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h index 35b27e2..f814d5b 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h +++ b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h @@ -31,20 +31,10 @@ namespace embb { namespace dataflow { namespace internal { -class Scheduler; -class ClockListener; - -struct InitData { - int slices; - Scheduler * sched; - ClockListener * sink_listener; -}; - class ClockListener { public: virtual ~ClockListener() {} virtual void OnClock(int /*clock*/) = 0; - virtual void OnInit(InitData * /*sched*/) = 0; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h index 4830b5d..6b11039 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h @@ -46,7 +46,10 @@ class ConstantSource Type value_; public: - explicit ConstantSource(Type value) : value_(value) {} + explicit ConstantSource(Network & network, Type value) + : value_(value) { + SetScheduler(network.GetScheduler()); + } virtual bool HasOutputs() const { return outputs_.Size() > 0; @@ -56,9 +59,8 @@ class ConstantSource GetOutput<0>().Send(Signal(clock, value_)); } - virtual void Init(InitData * init_data) { - SetScheduler(init_data->sched); - GetOutput<0>().SendInit(init_data); + virtual bool IsFullyConnected() { + return outputs_.IsFullyConnected(); } virtual bool Start(int clock) { diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index efc5f8a..ec3d476 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -113,11 +113,6 @@ class In { lock_.Unlock(); #endif } - - void ReceiveInit(InitData * init_data) { - SetSlices(init_data->slices); - listener_->OnInit(init_data); - } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index c8262e3..aef0df4 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -56,7 +56,9 @@ class Inputs @@ -67,8 +69,14 @@ class Inputs , public ClockListener { public: - Inputs() : count_(NULL) { - test_count_ = 1; + explicit Inputs(int slices) : count_(NULL), slices_(slices) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 1; + } + this->template Get<0>().SetSlices(slices_); } ~Inputs() { if (NULL != count_) { @@ -98,21 +106,11 @@ class InputsOnClock(clock); } } - virtual void OnInit(InitData * init_data) { - if (--test_count_ == 0) { - slices_ = init_data->slices; - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 1; - } - listener_->OnInit(init_data); - } + bool IsFullyConnected() { + return this->template Get<0>().IsConnected(); } private: embb::base::Atomic * count_; - int test_count_; ClockListener * listener_; int slices_; }; @@ -124,8 +122,15 @@ class Inputs , public ClockListener { public: - Inputs() : count_(NULL) { - test_count_ = 2; + explicit Inputs(int slices) : count_(NULL), slices_(slices) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 2; + } + this->template Get<0>().SetSlices(slices_); + this->template Get<1>().SetSlices(slices_); } ~Inputs() { if (NULL != count_) { @@ -159,21 +164,12 @@ class InputsOnClock(clock); } } - virtual void OnInit(InitData * init_data) { - if (--test_count_ == 0) { - slices_ = init_data->slices; - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 2; - } - listener_->OnInit(init_data); - } + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() & + this->template Get<1>().IsConnected(); } - private: +private: embb::base::Atomic * count_; - int test_count_; ClockListener * listener_; int slices_; }; @@ -185,8 +181,16 @@ class Inputs , public ClockListener { public: - Inputs() : count_(NULL) { - test_count_ = 3; + explicit Inputs(int slices) : count_(NULL), slices_(slices) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 3; + } + this->template Get<0>().SetSlices(slices_); + this->template Get<1>().SetSlices(slices_); + this->template Get<2>().SetSlices(slices_); } ~Inputs() { if (NULL != count_) { @@ -224,21 +228,13 @@ class InputsOnClock(clock); } } - virtual void OnInit(InitData * init_data) { - if (--test_count_ == 0) { - slices_ = init_data->slices; - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 3; - } - listener_->OnInit(init_data); - } + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() & + this->template Get<1>().IsConnected() & + this->template Get<2>().IsConnected(); } - private: +private: embb::base::Atomic * count_; - int test_count_; ClockListener * listener_; int slices_; }; @@ -249,8 +245,17 @@ class Inputs In, embb::base::internal::Nil> , public ClockListener { public: - Inputs() : count_(NULL) { - test_count_ = 4; + explicit Inputs(int slices) : count_(NULL), slices_(slices) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 4; + } + this->template Get<0>().SetSlices(slices_); + this->template Get<1>().SetSlices(slices_); + this->template Get<2>().SetSlices(slices_); + this->template Get<3>().SetSlices(slices_); } ~Inputs() { if (NULL != count_) { @@ -292,21 +297,14 @@ class Inputs listener_->OnClock(clock); } } - virtual void OnInit(InitData * init_data) { - if (--test_count_ == 0) { - slices_ = init_data->slices; - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 4; - } - listener_->OnInit(init_data); - } + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() & + this->template Get<1>().IsConnected() & + this->template Get<2>().IsConnected() & + this->template Get<3>().IsConnected(); } private: embb::base::Atomic * count_; - int test_count_; ClockListener * listener_; int slices_; }; @@ -318,8 +316,18 @@ class Inputs In, In > , public ClockListener { public: - Inputs() : count_(NULL) { - test_count_ = 5; + explicit Inputs(int slices) : count_(NULL), slices_(slices) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 5; + } + this->template Get<0>().SetSlices(slices_); + this->template Get<1>().SetSlices(slices_); + this->template Get<2>().SetSlices(slices_); + this->template Get<3>().SetSlices(slices_); + this->template Get<4>().SetSlices(slices_); } ~Inputs() { if (NULL != count_) { @@ -365,21 +373,15 @@ class Inputs listener_->OnClock(clock); } } - virtual void OnInit(InitData * init_data) { - if (--test_count_ == 0) { - slices_ = init_data->slices; - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 5; - } - listener_->OnInit(init_data); - } + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() && + this->template Get<1>().IsConnected() & + this->template Get<2>().IsConnected() & + this->template Get<3>().IsConnected() & + this->template Get<4>().IsConnected(); } private: embb::base::Atomic * count_; - int test_count_; ClockListener * listener_; int slices_; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index 55c5526..5dfebd8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -43,11 +43,11 @@ class Node { virtual bool HasInputs() const { return false; } virtual bool HasOutputs() const { return false; } virtual void Run(int clock) = 0; + virtual bool IsFullyConnected() = 0; virtual bool Start(int /*clock*/) { EMBB_THROW(embb::base::ErrorException, "Nodes are started implicitly."); } - virtual void Init(InitData * init_data) = 0; protected: Scheduler * sched_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/out.h b/dataflow_cpp/include/embb/dataflow/internal/out.h index 9268780..3f5aea4 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/out.h +++ b/dataflow_cpp/include/embb/dataflow/internal/out.h @@ -52,12 +52,6 @@ class Out { } } - void SendInit(InitData * init_data) { - for (size_t ii = 0; ii < targets_.size(); ii++) { - targets_[ii]->ReceiveInit(init_data); - } - } - void Connect(InType & input) { if (input.IsConnected()) { EMBB_THROW(embb::base::ErrorException, @@ -72,6 +66,10 @@ class Out { Connect(input); } + bool IsConnected() const { + return targets_.size() > 0; + } + private: std::vector< InType * > targets_; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/outputs.h b/dataflow_cpp/include/embb/dataflow/internal/outputs.h index a4a45cc..2fce315 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/outputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/outputs.h @@ -50,6 +50,9 @@ class Outputs { public: + bool IsFullyConnected() { + return true; + } }; template @@ -59,6 +62,9 @@ class Outputs { public: + bool IsFullyConnected() { + return this->template Get<0>().IsConnected(); + } }; template @@ -67,6 +73,10 @@ class Outputs, Out, embb::base::internal::Nil, embb::base::internal::Nil, embb::base::internal::Nil> { public: + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() && + this->template Get<1>().IsConnected(); + } }; template diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 800cfe4..9d05881 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -53,10 +53,11 @@ class Process< Serial, Inputs, typedef ProcessExecutor< InputsType, OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Process(FunctionType function) - : executor_(function) + explicit Process(Network & network, FunctionType function) + : inputs_(network.GetSlices()) + , executor_(function) , action_(NULL) - , slices_(0) { + , slices_(network.GetSlices()) { next_clock_ = 0; queued_clock_ = 0; bool ordered = Serial; @@ -66,6 +67,13 @@ class Process< Serial, Inputs, queue_id_ = 0; } inputs_.SetListener(this); + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } + SetScheduler(network.GetScheduler()); } ~Process() { @@ -86,17 +94,8 @@ class Process< Serial, Inputs, executor_.Execute(clock, inputs_, outputs_); } - virtual void Init(InitData * init_data) { - slices_ = init_data->slices; - //inputs_.SetSlices(init_data->slices); - action_ = reinterpret_cast( - embb::base::Allocation::Allocate( - sizeof(Action)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - action_[ii] = Action(); - } - SetScheduler(init_data->sched); - executor_.Init(init_data, outputs_); + virtual bool IsFullyConnected() { + return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } InputsType & GetInputs() { @@ -161,10 +160,6 @@ class Process< Serial, Inputs, } } - virtual void OnInit(InitData * init_data) { - Init(init_data); - } - private: InputsType inputs_; OutputsType outputs_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h index bb25a3e..5b82634 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process_executor.h @@ -62,10 +62,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -95,11 +91,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -133,12 +124,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -176,13 +161,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - outputs.template Get<3>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -211,10 +189,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -246,11 +220,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -286,12 +255,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -321,10 +284,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -358,11 +317,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -394,10 +348,6 @@ class ProcessExecutor< Inputs, Outputs > { } } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - } - private: FunctionType function_; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index f0cff63..8cc28a0 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -34,6 +34,9 @@ namespace embb { namespace dataflow { + +class Network; + namespace internal { template @@ -44,8 +47,10 @@ class Select typedef Inputs InputsType; typedef Outputs OutputsType; - Select() { + Select(Network & network) : inputs_(network.GetSlices()) { inputs_.SetListener(this); + slices_ = network.GetSlices(); + SetScheduler(network.GetScheduler()); } virtual bool HasInputs() const { @@ -80,11 +85,8 @@ class Select } } - virtual void Init(InitData * init_data) { - slices_ = init_data->slices; - //inputs_.SetSlices(slices_); - SetScheduler(init_data->sched); - GetOutput<0>().SendInit(init_data); + virtual bool IsFullyConnected() { + return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } InputsType & GetInputs() { @@ -117,10 +119,6 @@ class Select Run(clock); } - virtual void OnInit(InitData * init_data) { - Init(init_data); - } - private: InputsType inputs_; OutputsType outputs_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index bfbb5bb..6ff367e 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -48,13 +48,23 @@ class Sink< Inputs > typedef SinkExecutor< InputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Sink(FunctionType function) - : executor_(function) - , action_(NULL) { + explicit Sink(Network & network, FunctionType function) + : inputs_(network.GetSlices()) + , executor_(function) + , action_(NULL) + , slices_(network.GetSlices()) { next_clock_ = 0; queued_clock_ = 0; queue_id_ = GetNextProcessID(); inputs_.SetListener(this); + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } + SetListener(&network); + SetScheduler(network.GetScheduler()); } ~Sink() { @@ -78,17 +88,8 @@ class Sink< Inputs > listener_->OnClock(clock); } - virtual void Init(InitData * init_data) { - slices_ = init_data->slices; - action_ = reinterpret_cast( - embb::base::Allocation::Allocate( - sizeof(Action)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - action_[ii] = Action(); - } - SetListener(init_data->sink_listener); - SetScheduler(init_data->sched); - listener_->OnInit(init_data); + virtual bool IsFullyConnected() { + return inputs_.IsFullyConnected(); } InputsType & GetInputs() { @@ -132,10 +133,6 @@ class Sink< Inputs > } } - virtual void OnInit(InitData * init_data) { - Init(init_data); - } - private: InputsType inputs_; ExecutorType executor_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/source.h b/dataflow_cpp/include/embb/dataflow/internal/source.h index d8fb85b..067a85e 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source.h @@ -48,8 +48,9 @@ class Source< Outputs > typedef SourceExecutor< OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Source(FunctionType function) + explicit Source(Network & network, FunctionType function) : executor_(function), not_done_(true) { + SetScheduler(network.GetScheduler()); } virtual bool HasOutputs() const { @@ -60,9 +61,8 @@ class Source< Outputs > not_done_ = executor_.Execute(clock, outputs_); } - virtual void Init(InitData * init_data) { - SetScheduler(init_data->sched); - executor_.Init(init_data, outputs_); + virtual bool IsFullyConnected() { + return outputs_.IsFullyConnected(); } virtual bool Start(int clock) { diff --git a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h index 876ea5b..309b9c9 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source_executor.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source_executor.h @@ -36,8 +36,6 @@ namespace embb { namespace dataflow { namespace internal { -class Scheduler; - template class SourceExecutor; @@ -59,10 +57,6 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -87,11 +81,6 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -118,12 +107,6 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -152,13 +135,6 @@ class SourceExecutor< Outputs > { return result; } - void Init(InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - outputs.template Get<3>().SendInit(init_data); - } - private: FunctionType function_; }; @@ -190,15 +166,6 @@ class SourceExecutor< Outputs > { return result; } - void Init( - InitData * init_data, Outputs & outputs) { - outputs.template Get<0>().SendInit(init_data); - outputs.template Get<1>().SendInit(init_data); - outputs.template Get<2>().SendInit(init_data); - outputs.template Get<3>().SendInit(init_data); - outputs.template Get<4>().SendInit(init_data); - } - private: FunctionType function_; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 14108d6..55d4110 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -34,6 +34,9 @@ namespace embb { namespace dataflow { + +class Network; + namespace internal { template @@ -44,8 +47,9 @@ class Switch typedef Inputs InputsType; typedef Outputs OutputsType; - Switch() { + Switch(Network & network) : inputs_(network.GetSlices()) { inputs_.SetListener(this); + SetScheduler(network.GetScheduler()); } virtual bool HasInputs() const { @@ -77,11 +81,8 @@ class Switch } } - virtual void Init(InitData * init_data) { - //inputs_.SetSlices(init_data->slices); - SetScheduler(init_data->sched); - GetOutput<0>().SendInit(init_data); - GetOutput<1>().SendInit(init_data); + virtual bool IsFullyConnected() { + return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } InputsType & GetInputs() { @@ -114,10 +115,6 @@ class Switch Run(clock); } - virtual void OnInit(InitData * init_data) { - Init(init_data); - } - private: InputsType inputs_; OutputsType outputs_; diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 296db6d..0719e3b 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -58,8 +58,9 @@ class Network { public: /** * Constructs an empty network. + * \param slices Number of concurrent tokens allowed in the network. */ - Network() {} + Network(int slices) {} /** * Input port class. @@ -196,9 +197,10 @@ class Network { /** * Constructs a SerialProcess with a user specified processing function. + * \param network The network this node is going to be part of. * \param function The Function to call to process a token. */ - explicit SerialProcess(FunctionType function); + explicit SerialProcess(Network & network, FunctionType function); /** * \returns \c true if the SerialProcess has any inputs, \c false @@ -277,9 +279,10 @@ class Network { /** * Constructs a ParallelProcess with a user specified processing function. + * \param network The network this node is going to be part of. * \param function The Function to call to process a token. */ - explicit ParallelProcess(FunctionType function); + explicit ParallelProcess(Network & network, FunctionType function); /** * \returns \c true if the ParallelProcess has any inputs, \c false @@ -339,6 +342,7 @@ class Network { */ template class Switch { + public: /** * Function type to use when processing tokens. */ @@ -354,6 +358,12 @@ class Network { */ typedef Outputs OutputsType; + /** + * Constructs a Switch process. + * \param network The network this node is going to be part of. + */ + explicit Select(Network & network); + /** * \returns Always \c true. */ @@ -410,6 +420,7 @@ class Network { */ template class Select { + public: /** * Function type to use when processing tokens. */ @@ -425,6 +436,12 @@ class Network { */ typedef Outputs OutputsType; + /** + * Constructs a Select process. + * \param network The network this node is going to be part of. + */ + explicit Select(Network & network); + /** * \returns Always \c true. */ @@ -500,9 +517,10 @@ class Network { /** * Constructs a Sink with a user specified processing function. + * \param network The network this node is going to be part of. * \param function The Function to call to process a token. */ - explicit Sink(FunctionType function); + explicit Sink(Network & network, FunctionType function); /** * \returns Always \c true. @@ -559,9 +577,10 @@ class Network { /** * Constructs a Source with a user specified processing function. + * \param network The network this node is going to be part of. * \param function The Function to call to emit a token. */ - explicit Source(FunctionType function); + explicit Source(Network & network, FunctionType function); /** * \returns Always \c false. @@ -593,13 +612,6 @@ class Network { void operator >> (T & target); }; - /** - * Adds a new source process to the network. - * \param source The source process to add. - */ - template - void AddSource(Source & source); - /** * Constant source process template. * @@ -618,9 +630,10 @@ class Network { /** * Constructs a ConstantSource with a value to emit on each token. + * \param network The network this node is going to be part of. * \param value The value to emit. */ - explicit ConstantSource(Type value); + explicit ConstantSource(Network & network, Type value); /** * \returns Always \c false. @@ -653,19 +666,10 @@ class Network { }; /** - * Adds a new constant source process to the network. - * \param source The constant source process to add. + * Checks whether the network is completely connected and free of cycles. + * \returns \c true if everything is in order, \c false if not. */ - template - void AddSource(ConstantSource & source); - - /** - * Builds the network for usage with \c slices concurrent tokens. This - * function needs to be called after adding all sources and before - * executing the network. - * \param slices Number of concurrent tokens allowed in the network. - */ - void Make(int slices); + bool IsValid(); /** * Executes the network until one of the the sources returns \c false. @@ -677,12 +681,25 @@ class Network { class Network : public internal::ClockListener { public: - Network() : sched_(NULL) {} + Network(int slices) : sink_counter_(NULL), slices_(slices), sched_(NULL) { + sched_ = embb::base::Allocation::New(slices_); + sink_counter_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + sink_counter_[ii] = 0; + } + sink_count_ = 0; + } ~Network() { if (NULL != sched_) { - embb::base::Allocation::Delete(sched_); + embb::base::Allocation::Delete(sched_); + sched_ = NULL; + } + if (NULL != sink_counter_) { embb::base::Allocation::Free(sink_counter_); + sink_counter_ = NULL; } } @@ -690,16 +707,18 @@ class Network : public internal::ClockListener { typename T3 = embb::base::internal::Nil, typename T4 = embb::base::internal::Nil, typename T5 = embb::base::internal::Nil> - struct Inputs { - typedef internal::Inputs Type; + class Inputs : public internal::Inputs { + public: + explicit Inputs(int slices) : internal::Inputs(slices) {} }; template - struct Outputs { - typedef internal::Outputs Type; + class Outputs : public internal::Outputs { + public: + explicit Outputs() : internal::Outputs() {} }; template class SerialProcess; @@ -707,8 +726,8 @@ class Network : public internal::ClockListener { template < typename I1, typename I2, typename I3, typename I4, typename I5, typename O1, typename O2, typename O3, typename O4, typename O5> - class SerialProcess< internal::Inputs, - internal::Outputs > + class SerialProcess< Inputs, + Outputs > : public internal::Process< true, internal::Inputs, internal::Outputs > { @@ -717,11 +736,11 @@ class Network : public internal::ClockListener { internal::Inputs, internal::Outputs >::FunctionType FunctionType; - explicit SerialProcess(FunctionType function) + explicit SerialProcess(Network & network, FunctionType function) : internal::Process< true, internal::Inputs, - internal::Outputs >(function) { - //empty + internal::Outputs >(network, function) { + network.processes_.push_back(this); } }; @@ -730,8 +749,8 @@ class Network : public internal::ClockListener { template < typename I1, typename I2, typename I3, typename I4, typename I5, typename O1, typename O2, typename O3, typename O4, typename O5> - class ParallelProcess< internal::Inputs, - internal::Outputs > + class ParallelProcess< Inputs, + Outputs > : public internal::Process< false, internal::Inputs, internal::Outputs >{ @@ -740,22 +759,30 @@ class Network : public internal::ClockListener { internal::Inputs, internal::Outputs >::FunctionType FunctionType; - explicit ParallelProcess(FunctionType function) + explicit ParallelProcess(Network & network, FunctionType function) : internal::Process< false, internal::Inputs, - internal::Outputs >(function) { - //empty + internal::Outputs >(network, function) { + network.processes_.push_back(this); } }; template class Switch : public internal::Switch { public: + explicit Switch(Network & network) + : internal::Switch(network) { + network.processes_.push_back(this); + } }; template class Select : public internal::Select { public: + explicit Select(Network & network) + : internal::Select(network) { + network.processes_.push_back(this); + } }; template >::FunctionType FunctionType; - explicit Sink(FunctionType function) + explicit Sink(Network & network, FunctionType function) : internal::Sink< - internal::Inputs >(function) { - //empty + internal::Inputs >(network, function) { + network.sinks_.push_back(this); + network.sink_count_++; } }; @@ -786,62 +814,45 @@ class Network : public internal::ClockListener { internal::Outputs >::FunctionType FunctionType; - explicit Source(FunctionType function) + explicit Source(Network & network, FunctionType function) : internal::Source< - internal::Outputs >(function) { - //empty + internal::Outputs >(network, function) { + network.sources_.push_back(this); } }; - template - void AddSource(Source & source) { - sources_.push_back(&source); - } - template class ConstantSource : public internal::ConstantSource { public: - explicit ConstantSource(Type value) - : internal::ConstantSource(value) { - //empty + explicit ConstantSource(Network & network, Type value) + : internal::ConstantSource(network, value) { + network.sources_.push_back(this); } }; - template - void AddSource(ConstantSource & source) { - sources_.push_back(&source); + int GetSlices() const { + return slices_; } - void Make(int slices) { - slices_ = slices; - sched_ = embb::base::Allocation::New(slices_); - - internal::InitData init_data; - init_data.slices = slices_; - init_data.sched = sched_; - init_data.sink_listener = this; + internal::Scheduler * GetScheduler() const { + return sched_; + } - sink_counter_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - sink_counter_[ii] = 0; + bool IsValid() { + bool valid = true; + for (size_t ii = 0; ii < sources_.size(); ii++) { + valid = valid & sources_[ii]->IsFullyConnected(); } - - sink_count_ = 0; - for (size_t it = 0; it < sources_.size(); it++) - sources_[it]->Init(&init_data); - - for (int ii = 0; ii < slices_; ii++) { - sink_counter_[ii] = 0; + for (size_t ii = 0; ii < processes_.size(); ii++) { + valid = valid & processes_[ii]->IsFullyConnected(); + } + for (size_t ii = 0; ii < sinks_.size(); ii++) { + valid = valid & sinks_[ii]->IsFullyConnected(); } + return valid; } void operator () () { - if (NULL == sched_) { - throw embb::base::ErrorException("Network was not properly prepared"); - } - int clock = 0; while (clock >= 0) { const int idx = clock % slices_; @@ -873,15 +884,6 @@ class Network : public internal::ClockListener { --sink_counter_[idx]; } - /** - * Internal. - * \internal - * Gets called when an init token has reached all sinks. - */ - virtual void OnInit(internal::InitData * /*sched*/) { - sink_count_++; - } - private: std::vector processes_; std::vector sources_; diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index 5d30d35..da96399 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -42,12 +42,12 @@ typedef embb::dataflow::Network MyNetwork; typedef MyNetwork::ConstantSource< int > MyConstantSource; typedef MyNetwork::Source< int > MySource; -typedef MyNetwork::SerialProcess< MyNetwork::Inputs::Type, - MyNetwork::Outputs::Type > MyPred; -typedef MyNetwork::ParallelProcess< MyNetwork::Inputs::Type, - MyNetwork::Outputs::Type > MyFilter; -typedef MyNetwork::ParallelProcess< MyNetwork::Inputs::Type, - MyNetwork::Outputs::Type > MyMult; +typedef MyNetwork::SerialProcess< MyNetwork::Inputs, + MyNetwork::Outputs > MyPred; +typedef MyNetwork::ParallelProcess< MyNetwork::Inputs, + MyNetwork::Outputs > MyFilter; +typedef MyNetwork::ParallelProcess< MyNetwork::Inputs, + MyNetwork::Outputs > MyMult; typedef MyNetwork::Sink< int > MySink; typedef MyNetwork::Switch< int > MySwitch; typedef MyNetwork::Select< int > MySelect; @@ -165,15 +165,15 @@ void SimpleTest::TestBasic() { for (int ii = 0; ii < 10000; ii++) { ArraySink asink; - MyNetwork network; - MyConstantSource constant(4); - MySource source(embb::base::MakeFunction(sourceFunc)); - MyFilter filter(embb::base::MakeFunction(filterFunc)); - MyMult mult(embb::base::MakeFunction(multFunc)); - MySink sink(embb::base::MakeFunction(asink, &ArraySink::Run)); - MyPred pred(embb::base::MakeFunction(predFunc)); - MySwitch sw; - MySelect sel; + MyNetwork network(NUM_SLICES); + MyConstantSource constant(network, 4); + MySource source(network, embb::base::MakeFunction(sourceFunc)); + MyFilter filter(network, embb::base::MakeFunction(filterFunc)); + MyMult mult(network, embb::base::MakeFunction(multFunc)); + MySink sink(network, embb::base::MakeFunction(asink, &ArraySink::Run)); + MyPred pred(network, embb::base::MakeFunction(predFunc)); + MySwitch sw(network); + MySelect sel(network); for (int kk = 0; kk < TEST_COUNT; kk++) { source_array[kk] = -1; @@ -208,12 +208,15 @@ void SimpleTest::TestBasic() { sel.GetOutput<0>() >> sink.GetInput<0>(); - network.AddSource(constant); - network.AddSource(source); +// network.AddSource(constant); +// network.AddSource(source); - network.Make(NUM_SLICES); +// network.Initialize(NUM_SLICES); try { + if (!network.IsValid()) { + EMBB_THROW(embb::base::ErrorException, "network is invalid"); + } network(); } catch (embb::base::ErrorException & e) { PT_ASSERT_MSG(false, e.What()); diff --git a/doc/examples/dataflow/dataflow_add-snippet.h b/doc/examples/dataflow/dataflow_add-snippet.h deleted file mode 100644 index ce51ef8..0000000 --- a/doc/examples/dataflow/dataflow_add-snippet.h +++ /dev/null @@ -1 +0,0 @@ - nw.AddSource(read); diff --git a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h index f1cfcaa..dd94cc0 100644 --- a/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_add_sources-snippet.h @@ -6,15 +6,14 @@ Network::Source source1( + network, embb::base::MakeFunction(producer1, &Producer::Run) ), source2( + network, embb::base::MakeFunction(producer2, &Producer::Run) ), source3( + network, embb::base::MakeFunction(producer3, &Producer::Run) ), source4( + network, embb::base::MakeFunction(producer4, &Producer::Run) ); - - nw.AddSource(source1); - nw.AddSource(source2); - nw.AddSource(source3); - nw.AddSource(source4); diff --git a/doc/examples/dataflow/dataflow_declare_replace-snippet.h b/doc/examples/dataflow/dataflow_declare_replace-snippet.h index e230807..4276ecb 100644 --- a/doc/examples/dataflow/dataflow_declare_replace-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_replace-snippet.h @@ -1,5 +1,5 @@ Network::ParallelProcess< - Network::Inputs::Type, - Network::Outputs::Type> replace( - embb::base::MakeFunction(ReplaceFunction) + Network::Inputs, + Network::Outputs > replace( + network, embb::base::MakeFunction(ReplaceFunction) ); diff --git a/doc/examples/dataflow/dataflow_declare_sink-snippet.h b/doc/examples/dataflow/dataflow_declare_sink-snippet.h index dfdd6b2..3bf8a2d 100644 --- a/doc/examples/dataflow/dataflow_declare_sink-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_sink-snippet.h @@ -1,3 +1,3 @@ Network::Sink write( - embb::base::MakeFunction(SinkFunction) + network, embb::base::MakeFunction(SinkFunction) ); diff --git a/doc/examples/dataflow/dataflow_declare_source-snippet.h b/doc/examples/dataflow/dataflow_declare_source-snippet.h index 470db74..4d028a8 100644 --- a/doc/examples/dataflow/dataflow_declare_source-snippet.h +++ b/doc/examples/dataflow/dataflow_declare_source-snippet.h @@ -1,3 +1,3 @@ Network::Source read( - embb::base::MakeFunction(SourceFunction) + network, embb::base::MakeFunction(SourceFunction) ); diff --git a/doc/examples/dataflow/dataflow_linear-fragmented.cc b/doc/examples/dataflow/dataflow_linear-fragmented.cc index 8de4c0b..a3d7ea4 100644 --- a/doc/examples/dataflow/dataflow_linear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_linear-fragmented.cc @@ -52,11 +52,10 @@ std::string with("hello"); #include "dataflow/dataflow_sink_function-snippet.h" void RunDataflowLinear() { +#include "dataflow/dataflow_make-snippet.h" #include "dataflow/dataflow_declare_source-snippet.h" #include "dataflow/dataflow_declare_replace-snippet.h" #include "dataflow/dataflow_declare_sink-snippet.h" #include "dataflow/dataflow_connect-snippet.h" -#include "dataflow/dataflow_add-snippet.h" -#include "dataflow/dataflow_make-snippet.h" #include "dataflow/dataflow_run-snippet.h" } diff --git a/doc/examples/dataflow/dataflow_make-snippet.h b/doc/examples/dataflow/dataflow_make-snippet.h index 19f9aab..8e3ce7f 100644 --- a/doc/examples/dataflow/dataflow_make-snippet.h +++ b/doc/examples/dataflow/dataflow_make-snippet.h @@ -1 +1 @@ - nw.Make(4); + Network network(4); diff --git a/doc/examples/dataflow/dataflow_network-snippet.h b/doc/examples/dataflow/dataflow_network-snippet.h index 3e36693..de219d9 100644 --- a/doc/examples/dataflow/dataflow_network-snippet.h +++ b/doc/examples/dataflow/dataflow_network-snippet.h @@ -1,2 +1 @@ typedef embb::dataflow::Network Network; -static Network nw; diff --git a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc index b2590ee..ed30ed0 100644 --- a/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc +++ b/doc/examples/dataflow/dataflow_nonlinear-fragmented.cc @@ -48,22 +48,28 @@ static int SimpleRand(int & seed) { #include "dataflow/dataflow_network-snippet.h" void RunDataflowNonLinear() { +#include "dataflow/dataflow_make-snippet.h" #include "dataflow/dataflow_declare_add_sources-snippet.h" Comparator comparator; Network::ParallelProcess< - Network::Inputs::Type, Network::Outputs::Type> - process1( embb::base::MakeFunction(comparator, &Comparator::Run) ), - process2( embb::base::MakeFunction(comparator, &Comparator::Run) ), - process3( embb::base::MakeFunction(comparator, &Comparator::Run) ), - process4( embb::base::MakeFunction(comparator, &Comparator::Run) ), - process5( embb::base::MakeFunction(comparator, &Comparator::Run) ); + Network::Inputs, Network::Outputs > + process1(network, + embb::base::MakeFunction(comparator, &Comparator::Run)), + process2(network, + embb::base::MakeFunction(comparator, &Comparator::Run)), + process3(network, + embb::base::MakeFunction(comparator, &Comparator::Run)), + process4(network, + embb::base::MakeFunction(comparator, &Comparator::Run)), + process5(network, + embb::base::MakeFunction(comparator, &Comparator::Run)); Consumer consumer; Network::Sink - sink1(embb::base::MakeFunction(consumer, &Consumer::Run)); + sink1(network, embb::base::MakeFunction(consumer, &Consumer::Run)); source1.GetOutput<0>() >> process1.GetInput<0>(); source2.GetOutput<0>() >> process2.GetInput<0>(); @@ -83,6 +89,5 @@ void RunDataflowNonLinear() { process5.GetOutput<1>() >> sink1.GetInput<2>(); process4.GetOutput<1>() >> sink1.GetInput<3>(); - nw.Make(4); - nw(); +#include "dataflow/dataflow_run-snippet.h" } diff --git a/doc/examples/dataflow/dataflow_run-snippet.h b/doc/examples/dataflow/dataflow_run-snippet.h index ff4f083..a0c3bfe 100644 --- a/doc/examples/dataflow/dataflow_run-snippet.h +++ b/doc/examples/dataflow/dataflow_run-snippet.h @@ -1 +1 @@ - nw(); + network(); diff --git a/doc/tutorial/content/dataflow.tex b/doc/tutorial/content/dataflow.tex index 6aba46d..16b9842 100644 --- a/doc/tutorial/content/dataflow.tex +++ b/doc/tutorial/content/dataflow.tex @@ -108,6 +108,10 @@ \section{Linear Pipelines} % \\\inputlisting{../examples/dataflow/dataflow_network-snippet.h} % +We need to prepare the network for the desired maximum number of elements that can be in the network at a time. The number of elements is limited to avoid that the network is flooded with new elements before the previous elements have been processed. In a linear pipeline, for example, this may happen if the source is faster than the sink. In our example, at most four elements may be processed simultaneously: one in the source, one in the sink, and two in the middle stage (see below). Finding an optimal value depends on the application and usually requires some experimentation. In general, large values boost the throughput but also increase the latency. Conversely, small values reduce the latency but may lead to a drop of performance in terms of throughput: +% +\\\inputlisting{../examples/dataflow/dataflow_make-snippet.h} +% As the next step, we have to construct the processes shown in Figure~\ref{fig:replace_par}. The easiest way to construct a process is to wrap the user-defined code in a lambda function and to pass it to the network. The network constructs an object for that process and executes the lambda function whenever new data is available. There are several methods for constructing processes depending on their type. The process \textbf{read} is a \emph{source} process, since it produces data (by reading it from the specified file) but does not consume any data. Source processes are constructed from a function object % \\\inputlisting{../examples/dataflow/dataflow_source_function-snippet.h} @@ -142,19 +146,10 @@ \section{Linear Pipelines} \emph{\textbf{Note:} If you parallelize your own application using \embb and your compiler emits a lengthy error message containing lots of templates, it is very likely that for at least one process, the ports and their directions do not match the signature of the given function.} -The network needs to know about the source declared above, so we add it to our network: -% -\\\inputlisting{../examples/dataflow/dataflow_add-snippet.h} -% - As the last step, we have to connect the processes (ports). This is straightforward using the C++ stream operator: % \\\inputlisting{../examples/dataflow/dataflow_connect-snippet.h} % -Once all connections have been established, we need to prepare the network for the desired maximum number of elements that can be in the network at a time. The number of elements is limited to avoid that the network is flooded with new elements before the previous elements have been processed. In a linear pipeline, for example, this may happen if the source is faster than the sink. In our example, at most four elements may be processed simultaneously: one in the source, one in the sink, and two in the middle stage (see above). Finding an optimal value depends on the application and usually requires some experimentation. In general, large values boost the throughput but also increase the latency. Conversely, small values reduce the latency but may lead to a drop of performance in terms of throughput: -% -\\\inputlisting{../examples/dataflow/dataflow_make-snippet.h} -% Then we can start the network: % \\\inputlisting{../examples/dataflow/dataflow_run-snippet.h} diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index 7aa10b2..409510f 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -41,7 +41,7 @@ namespace { static embb::tasks::Node * node_instance = NULL; #if TASKS_CPP_AUTOMATIC_INITIALIZE -static embb::base::Mutex init_mutex; +static embb_spinlock_t init_mutex = { 0 }; #endif } @@ -207,13 +207,13 @@ bool Node::IsInitialized() { Node & Node::GetInstance() { #if TASKS_CPP_AUTOMATIC_INITIALIZE if (!IsInitialized()) { - init_mutex.Lock(); + embb_spin_lock(&init_mutex); if (!IsInitialized()) { Node::Initialize( TASKS_CPP_AUTOMATIC_DOMAIN_ID, TASKS_CPP_AUTOMATIC_NODE_ID); atexit(Node::Finalize); } - init_mutex.Unlock(); + embb_spin_unlock(&init_mutex); } return *node_instance; #else From 582bb5a15ff244c9062a5a9e69cac0a0e5605fc7 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 10 Mar 2016 18:39:39 +0100 Subject: [PATCH 53/79] dataflow_cpp: linux fixes --- .../embb/dataflow/internal/constant_source.h | 4 +-- .../include/embb/dataflow/internal/inputs.h | 4 +-- .../include/embb/dataflow/internal/process.h | 8 ++--- .../embb/dataflow/internal/scheduler_mtapi.h | 2 +- .../include/embb/dataflow/internal/select.h | 8 ++--- .../include/embb/dataflow/internal/sink.h | 11 +++--- .../include/embb/dataflow/internal/source.h | 4 +-- .../include/embb/dataflow/internal/switch.h | 7 ++-- dataflow_cpp/include/embb/dataflow/network.h | 36 +++++++++---------- dataflow_cpp/test/dataflow_cpp_test_simple.cc | 8 ++--- tasks_cpp/src/node.cc | 2 +- 11 files changed, 41 insertions(+), 53 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h index 6b11039..6cf2260 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/constant_source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/constant_source.h @@ -46,9 +46,9 @@ class ConstantSource Type value_; public: - explicit ConstantSource(Network & network, Type value) + ConstantSource(Scheduler * sched, Type value) : value_(value) { - SetScheduler(network.GetScheduler()); + SetScheduler(sched); } virtual bool HasOutputs() const { diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index aef0df4..81282dd 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -168,7 +168,7 @@ class Inputstemplate Get<0>().IsConnected() & this->template Get<1>().IsConnected(); } -private: + private: embb::base::Atomic * count_; ClockListener * listener_; int slices_; @@ -233,7 +233,7 @@ class Inputstemplate Get<1>().IsConnected() & this->template Get<2>().IsConnected(); } -private: + private: embb::base::Atomic * count_; ClockListener * listener_; int slices_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 9d05881..1dfade2 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -53,11 +53,11 @@ class Process< Serial, Inputs, typedef ProcessExecutor< InputsType, OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Process(Network & network, FunctionType function) - : inputs_(network.GetSlices()) + Process(int slices, Scheduler * sched, FunctionType function) + : inputs_(slices) , executor_(function) , action_(NULL) - , slices_(network.GetSlices()) { + , slices_(slices) { next_clock_ = 0; queued_clock_ = 0; bool ordered = Serial; @@ -73,7 +73,7 @@ class Process< Serial, Inputs, for (int ii = 0; ii < slices_; ii++) { action_[ii] = Action(); } - SetScheduler(network.GetScheduler()); + SetScheduler(sched); } ~Process() { diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 14b559f..856b4a2 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -40,7 +40,7 @@ namespace internal { class SchedulerMTAPI : public Scheduler { public: - SchedulerMTAPI(int slices) + explicit SchedulerMTAPI(int slices) : slices_(slices) { embb::tasks::Node & node = embb::tasks::Node::GetInstance(); diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index 8cc28a0..c90758f 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -34,9 +34,6 @@ namespace embb { namespace dataflow { - -class Network; - namespace internal { template @@ -47,10 +44,9 @@ class Select typedef Inputs InputsType; typedef Outputs OutputsType; - Select(Network & network) : inputs_(network.GetSlices()) { + Select(int slices, Scheduler * sched) : inputs_(slices), slices_(slices) { inputs_.SetListener(this); - slices_ = network.GetSlices(); - SetScheduler(network.GetScheduler()); + SetScheduler(sched); } virtual bool HasInputs() const { diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index 6ff367e..1f59464 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -48,11 +48,12 @@ class Sink< Inputs > typedef SinkExecutor< InputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Sink(Network & network, FunctionType function) - : inputs_(network.GetSlices()) + Sink(int slices, Scheduler * sched, ClockListener * listener, + FunctionType function) + : inputs_(slices) , executor_(function) , action_(NULL) - , slices_(network.GetSlices()) { + , slices_(slices) { next_clock_ = 0; queued_clock_ = 0; queue_id_ = GetNextProcessID(); @@ -63,8 +64,8 @@ class Sink< Inputs > for (int ii = 0; ii < slices_; ii++) { action_[ii] = Action(); } - SetListener(&network); - SetScheduler(network.GetScheduler()); + SetListener(listener); + SetScheduler(sched); } ~Sink() { diff --git a/dataflow_cpp/include/embb/dataflow/internal/source.h b/dataflow_cpp/include/embb/dataflow/internal/source.h index 067a85e..26d3734 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/source.h +++ b/dataflow_cpp/include/embb/dataflow/internal/source.h @@ -48,9 +48,9 @@ class Source< Outputs > typedef SourceExecutor< OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - explicit Source(Network & network, FunctionType function) + Source(Scheduler * sched, FunctionType function) : executor_(function), not_done_(true) { - SetScheduler(network.GetScheduler()); + SetScheduler(sched); } virtual bool HasOutputs() const { diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 55d4110..db02058 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -34,9 +34,6 @@ namespace embb { namespace dataflow { - -class Network; - namespace internal { template @@ -47,9 +44,9 @@ class Switch typedef Inputs InputsType; typedef Outputs OutputsType; - Switch(Network & network) : inputs_(network.GetSlices()) { + Switch(int slices, Scheduler * sched) : inputs_(slices) { inputs_.SetListener(this); - SetScheduler(network.GetScheduler()); + SetScheduler(sched); } virtual bool HasInputs() const { diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 0719e3b..9b54d7e 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -60,7 +60,7 @@ class Network { * Constructs an empty network. * \param slices Number of concurrent tokens allowed in the network. */ - Network(int slices) {} + explicit Network(int slices) {} /** * Input port class. @@ -681,7 +681,8 @@ class Network { class Network : public internal::ClockListener { public: - Network(int slices) : sink_counter_(NULL), slices_(slices), sched_(NULL) { + explicit Network(int slices) + : sink_counter_(NULL), slices_(slices), sched_(NULL) { sched_ = embb::base::Allocation::New(slices_); sink_counter_ = reinterpret_cast*>( embb::base::Allocation::Allocate( @@ -709,7 +710,8 @@ class Network : public internal::ClockListener { typename T5 = embb::base::internal::Nil> class Inputs : public internal::Inputs { public: - explicit Inputs(int slices) : internal::Inputs(slices) {} + explicit Inputs(int slices) + : internal::Inputs(slices) {} }; template class Outputs : public internal::Outputs { public: - explicit Outputs() : internal::Outputs() {} + explicit Outputs() + : internal::Outputs() {} }; template class SerialProcess; @@ -739,7 +742,8 @@ class Network : public internal::ClockListener { explicit SerialProcess(Network & network, FunctionType function) : internal::Process< true, internal::Inputs, - internal::Outputs >(network, function) { + internal::Outputs >( + network.slices_, network.sched_, function) { network.processes_.push_back(this); } }; @@ -762,7 +766,8 @@ class Network : public internal::ClockListener { explicit ParallelProcess(Network & network, FunctionType function) : internal::Process< false, internal::Inputs, - internal::Outputs >(network, function) { + internal::Outputs >( + network.slices_, network.sched_, function) { network.processes_.push_back(this); } }; @@ -771,7 +776,7 @@ class Network : public internal::ClockListener { class Switch : public internal::Switch { public: explicit Switch(Network & network) - : internal::Switch(network) { + : internal::Switch(network.slices_, network.sched_) { network.processes_.push_back(this); } }; @@ -780,7 +785,7 @@ class Network : public internal::ClockListener { class Select : public internal::Select { public: explicit Select(Network & network) - : internal::Select(network) { + : internal::Select(network.slices_, network.sched_) { network.processes_.push_back(this); } }; @@ -797,7 +802,8 @@ class Network : public internal::ClockListener { explicit Sink(Network & network, FunctionType function) : internal::Sink< - internal::Inputs >(network, function) { + internal::Inputs >( + network.slices_, network.sched_, &network, function) { network.sinks_.push_back(this); network.sink_count_++; } @@ -816,7 +822,7 @@ class Network : public internal::ClockListener { explicit Source(Network & network, FunctionType function) : internal::Source< - internal::Outputs >(network, function) { + internal::Outputs >(network.sched_, function) { network.sources_.push_back(this); } }; @@ -825,19 +831,11 @@ class Network : public internal::ClockListener { class ConstantSource : public internal::ConstantSource { public: explicit ConstantSource(Network & network, Type value) - : internal::ConstantSource(network, value) { + : internal::ConstantSource(network.sched_, value) { network.sources_.push_back(this); } }; - int GetSlices() const { - return slices_; - } - - internal::Scheduler * GetScheduler() const { - return sched_; - } - bool IsValid() { bool valid = true; for (size_t ii = 0; ii < sources_.size(); ii++) { diff --git a/dataflow_cpp/test/dataflow_cpp_test_simple.cc b/dataflow_cpp/test/dataflow_cpp_test_simple.cc index da96399..c73a0f1 100644 --- a/dataflow_cpp/test/dataflow_cpp_test_simple.cc +++ b/dataflow_cpp/test/dataflow_cpp_test_simple.cc @@ -170,7 +170,8 @@ void SimpleTest::TestBasic() { MySource source(network, embb::base::MakeFunction(sourceFunc)); MyFilter filter(network, embb::base::MakeFunction(filterFunc)); MyMult mult(network, embb::base::MakeFunction(multFunc)); - MySink sink(network, embb::base::MakeFunction(asink, &ArraySink::Run)); + MySink sink(network, + embb::base::MakeFunction(asink, &ArraySink::Run)); MyPred pred(network, embb::base::MakeFunction(predFunc)); MySwitch sw(network); MySelect sel(network); @@ -208,11 +209,6 @@ void SimpleTest::TestBasic() { sel.GetOutput<0>() >> sink.GetInput<0>(); -// network.AddSource(constant); -// network.AddSource(source); - -// network.Initialize(NUM_SLICES); - try { if (!network.IsValid()) { EMBB_THROW(embb::base::ErrorException, "network is invalid"); diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index 409510f..8dc49b0 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -41,7 +41,7 @@ namespace { static embb::tasks::Node * node_instance = NULL; #if TASKS_CPP_AUTOMATIC_INITIALIZE -static embb_spinlock_t init_mutex = { 0 }; +static embb_spinlock_t init_mutex = { { 0 } }; #endif } From 5bbc63a1c9e724451a9e464f57ee96fc78095e83 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Fri, 11 Mar 2016 08:49:21 +0100 Subject: [PATCH 54/79] dataflow_cpp: removed cpplint warning --- dataflow_cpp/include/embb/dataflow/network.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 9b54d7e..7a20c58 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -720,7 +720,7 @@ class Network : public internal::ClockListener { typename T5 = embb::base::internal::Nil> class Outputs : public internal::Outputs { public: - explicit Outputs() + Outputs() : internal::Outputs() {} }; From 253edaf245a3d66259d5820347d0871e9d5c84ce Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 21 Mar 2016 14:32:10 +0100 Subject: [PATCH 55/79] mtapi_network_c: improved error handling --- .../mtapi_network_c/src/embb_mtapi_network.c | 664 +++++++++++------- .../src/embb_mtapi_network_buffer.c | 5 +- .../src/embb_mtapi_network_buffer.h | 2 +- .../src/embb_mtapi_network_socket.c | 3 +- 4 files changed, 399 insertions(+), 275 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index 73a5585..ee908c3 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -84,6 +84,8 @@ struct embb_mtapi_network_plugin_struct { embb_mutex_t send_mutex; embb_mtapi_network_buffer_t send_buffer; + + embb_mtapi_network_buffer_t recv_buffer; }; typedef struct embb_mtapi_network_plugin_struct embb_mtapi_network_plugin_t; @@ -185,15 +187,215 @@ static void embb_mtapi_network_task_complete( mtapi_status_set(status, local_status); } +static mtapi_status_t embb_mtapi_network_handle_start_task( + embb_mtapi_network_socket_t * socket, + embb_mtapi_network_buffer_t * buffer) { + + int32_t domain_id; + int32_t job_id; + int32_t results_size; + void * results; + int err; + + int32_t arguments_size; + mtapi_uint_t priority = 0; + mtapi_job_hndl_t job_hndl; + mtapi_task_attributes_t task_attr; + void * arguments; + mtapi_task_complete_function_t func = embb_mtapi_network_task_complete; + void * func_void; + embb_mtapi_network_task_t * network_task = + (embb_mtapi_network_task_t*)embb_alloc( + sizeof(embb_mtapi_network_task_t)); + mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; + + err = embb_mtapi_network_socket_recvbuffer_sized( + socket, buffer, 28); + + // check if we really got 28 bytes + if (err == 28) { + + // domain id + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &domain_id); + assert(err == 4); + // job id + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &job_id); + assert(err == 4); + // priority + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, (int32_t*)&priority); + assert(err == 4); + // remote task handle + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &network_task->remote_task_id); + assert(err == 4); + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &network_task->remote_task_tag); + assert(err == 4); + // result size + err = embb_mtapi_network_buffer_pop_front_int32(buffer, + &results_size); + assert(err == 4); + results = embb_alloc((size_t)results_size); + assert(results != NULL); + // arguments size + embb_mtapi_network_buffer_pop_front_int32(buffer, &arguments_size); + assert(err == 4); + arguments = embb_alloc((size_t)arguments_size); + assert(arguments != NULL); + + embb_mtapi_network_buffer_clear(buffer); + + // arguments + err = embb_mtapi_network_socket_recvbuffer_sized( + socket, buffer, arguments_size); + assert(err == arguments_size); + err = embb_mtapi_network_buffer_pop_front_rawdata( + buffer, arguments_size, arguments); + assert(err == arguments_size); + + embb_mtapi_network_buffer_clear(buffer); + + network_task->socket = *socket; + mtapi_taskattr_init(&task_attr, &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA, + (void*)network_task, 0, &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_boolean_t task_detached = MTAPI_TRUE; + mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, + (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, + (void*)&priority, sizeof(mtapi_uint_t), &local_status); + assert(local_status == MTAPI_SUCCESS); + memcpy(&func_void, &func, sizeof(void*)); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, + func_void, 0, &local_status); + assert(local_status == MTAPI_SUCCESS); + job_hndl = mtapi_job_get((mtapi_job_id_t)job_id, + (mtapi_domain_t)domain_id, &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_task_start( + MTAPI_TASK_ID_NONE, job_hndl, + arguments, (mtapi_size_t)arguments_size, + results, (mtapi_size_t)results_size, + &task_attr, MTAPI_GROUP_NONE, + &local_status); + assert(local_status == MTAPI_SUCCESS); + + // send back result of task creation + //embb_mtapi_network_buffer_push_back_int32( + // &buffer, local_status); + //embb_mtapi_network_socket_sendbuffer( + // socket, &buffer); + } + + embb_mtapi_network_buffer_clear(buffer); + + return local_status; +} + +static mtapi_status_t embb_mtapi_network_handle_return_result( + embb_mtapi_network_socket_t * socket, + embb_mtapi_network_buffer_t * buffer) { + + int task_status; + int task_id; + int task_tag; + + int32_t results_size; + int err; + mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; + + if (embb_mtapi_node_is_initialized()) { + embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); + mtapi_task_hndl_t task; + + err = embb_mtapi_network_socket_recvbuffer_sized( + socket, buffer, 16); + + // did we really receive 16 bytes? + if (err == 16) { + + // local task id + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_id); + assert(err == 4); + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_tag); + assert(err == 4); + // task status + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &task_status); + assert(err == 4); + // result size + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &results_size); + assert(err == 4); + + embb_mtapi_network_buffer_clear(buffer); + + err = embb_mtapi_network_socket_recvbuffer_sized( + socket, buffer, results_size); + + // did we get the whole resultbuffer? + if (err == results_size) { + + task.id = (mtapi_task_id_t)task_id; + task.tag = (mtapi_uint_t)task_tag; + + if (embb_mtapi_task_pool_is_handle_valid(node->task_pool, task)) { + embb_mtapi_task_t * local_task = + embb_mtapi_task_pool_get_storage_for_handle( + node->task_pool, task); + + if (embb_mtapi_action_pool_is_handle_valid( + node->action_pool, local_task->action)) { + embb_mtapi_action_t * local_action = + embb_mtapi_action_pool_get_storage_for_handle( + node->action_pool, local_task->action); + + /* not needed right now + embb_mtapi_network_action_t * network_action = + (embb_mtapi_network_action_t*)local_action->plugin_data;*/ + + err = embb_mtapi_network_buffer_pop_front_rawdata( + buffer, results_size, local_task->result_buffer); + assert(err == results_size); + + local_task->error_code = (mtapi_status_t)task_status; + embb_atomic_store_int(&local_task->state, MTAPI_TASK_COMPLETED); + embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); + + /* is task associated with a group? */ + if (embb_mtapi_group_pool_is_handle_valid( + node->group_pool, local_task->group)) { + embb_mtapi_group_t* local_group = + embb_mtapi_group_pool_get_storage_for_handle( + node->group_pool, local_task->group); + embb_mtapi_task_queue_push(&local_group->queue, local_task); + } + + local_status = MTAPI_SUCCESS; + } + } + + } + + } + } + + embb_mtapi_network_buffer_clear(buffer); + + return local_status; +} + static int embb_mtapi_network_thread(void * args) { embb_mtapi_network_plugin_t * plugin = &embb_mtapi_network_plugin; - embb_mtapi_network_buffer_t buffer; + embb_mtapi_network_buffer_t * buffer = &plugin->recv_buffer; int err; EMBB_UNUSED(args); - embb_mtapi_network_buffer_initialize(&buffer, (int)plugin->buffer_size); - while (embb_atomic_load_int(&plugin->run)) { err = embb_mtapi_network_socket_select( plugin->sockets, plugin->socket_count, 100); @@ -208,197 +410,36 @@ static int embb_mtapi_network_thread(void * args) { plugin->socket_count++; } } else if (0 < err) { - int32_t domain_id; - int32_t job_id; - int32_t results_size; - void * results; int8_t operation; embb_mtapi_network_socket_t * socket = &plugin->sockets[err]; - embb_mtapi_network_buffer_clear(&buffer); + embb_mtapi_network_buffer_clear(buffer); err = embb_mtapi_network_socket_recvbuffer_sized( - socket, &buffer, 1); - if (err == 0) { - // there was some socket error, ignore - continue; - } - assert(err == 1); - err = embb_mtapi_network_buffer_pop_front_int8( - &buffer, &operation); - assert(err == 1); - - embb_mtapi_network_buffer_clear(&buffer); - - if (operation == EMBB_MTAPI_NETWORK_START_TASK) { - int32_t arguments_size; - mtapi_uint_t priority = 0; - mtapi_job_hndl_t job_hndl; - mtapi_task_attributes_t task_attr; - void * arguments; - mtapi_task_complete_function_t func = embb_mtapi_network_task_complete; - void * func_void; - embb_mtapi_network_task_t * network_task = - (embb_mtapi_network_task_t*)embb_alloc( - sizeof(embb_mtapi_network_task_t)); - mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; - - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, &buffer, 28); - assert(err == 28); - // domain id - err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &domain_id); - assert(err == 4); - // job id - err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &job_id); - assert(err == 4); - // priority - err = embb_mtapi_network_buffer_pop_front_int32( - &buffer, (int32_t*)&priority); - assert(err == 4); - // remote task handle - err = embb_mtapi_network_buffer_pop_front_int32( - &buffer, &network_task->remote_task_id); - assert(err == 4); - err = embb_mtapi_network_buffer_pop_front_int32( - &buffer, &network_task->remote_task_tag); - assert(err == 4); - // result size - err = embb_mtapi_network_buffer_pop_front_int32(&buffer, - &results_size); - assert(err == 4); - results = embb_alloc((size_t)results_size); - assert(results != NULL); - // arguments size - embb_mtapi_network_buffer_pop_front_int32(&buffer, &arguments_size); - assert(err == 4); - arguments = embb_alloc((size_t)arguments_size); - assert(arguments != NULL); - - embb_mtapi_network_buffer_clear(&buffer); - - // arguments - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, &buffer, arguments_size); - assert(err == arguments_size); - err = embb_mtapi_network_buffer_pop_front_rawdata( - &buffer, arguments_size, arguments); - assert(err == arguments_size); - - embb_mtapi_network_buffer_clear(&buffer); - - network_task->socket = *socket; - mtapi_taskattr_init(&task_attr, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA, - (void*)network_task, 0, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_boolean_t task_detached = MTAPI_TRUE; - mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, - (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, - (void*)&priority, sizeof(mtapi_uint_t), &local_status); - assert(local_status == MTAPI_SUCCESS); - memcpy(&func_void, &func, sizeof(void*)); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, - func_void, 0, &local_status); - assert(local_status == MTAPI_SUCCESS); - job_hndl = mtapi_job_get((mtapi_job_id_t)job_id, - (mtapi_domain_t)domain_id, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_task_start( - MTAPI_TASK_ID_NONE, job_hndl, - arguments, (mtapi_size_t)arguments_size, - results, (mtapi_size_t)results_size, - &task_attr, MTAPI_GROUP_NONE, - &local_status); - assert(local_status == MTAPI_SUCCESS); - - // send back result of task creation - //embb_mtapi_network_buffer_push_back_int32( - // &buffer, local_status); - //embb_mtapi_network_socket_sendbuffer( - // socket, &buffer); - - embb_mtapi_network_buffer_clear(&buffer); - } else if (operation == EMBB_MTAPI_NETWORK_RETURN_RESULT) { - int task_status; - int task_id; - int task_tag; - - embb_mtapi_network_buffer_clear(&buffer); - - if (embb_mtapi_node_is_initialized()) { - embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); - mtapi_task_hndl_t task; - - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, &buffer, 16); - assert(err == 16); - // local task id - err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &task_id); - assert(err == 4); - err = embb_mtapi_network_buffer_pop_front_int32(&buffer, &task_tag); - assert(err == 4); - // task status - err = embb_mtapi_network_buffer_pop_front_int32( - &buffer, &task_status); - assert(err == 4); - // result size - err = embb_mtapi_network_buffer_pop_front_int32( - &buffer, &results_size); - assert(err == 4); - - embb_mtapi_network_buffer_clear(&buffer); - - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, &buffer, results_size); - assert(err == results_size); - - task.id = (mtapi_task_id_t)task_id; - task.tag = (mtapi_uint_t)task_tag; - - if (embb_mtapi_task_pool_is_handle_valid(node->task_pool, task)) { - embb_mtapi_task_t * local_task = - embb_mtapi_task_pool_get_storage_for_handle( - node->task_pool, task); - - if (embb_mtapi_action_pool_is_handle_valid( - node->action_pool, local_task->action)) { - embb_mtapi_action_t * local_action = - embb_mtapi_action_pool_get_storage_for_handle( - node->action_pool, local_task->action); - - /* not needed right now - embb_mtapi_network_action_t * network_action = - (embb_mtapi_network_action_t*)local_action->plugin_data;*/ - - err = embb_mtapi_network_buffer_pop_front_rawdata( - &buffer, results_size, local_task->result_buffer); - assert(err == results_size); - - local_task->error_code = (mtapi_status_t)task_status; - embb_atomic_store_int(&local_task->state, MTAPI_TASK_COMPLETED); - embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); + socket, buffer, 1); + // did we receive one byte? + if (err == 1) { + err = embb_mtapi_network_buffer_pop_front_int8( + buffer, &operation); + assert(err == 1); - /* is task associated with a group? */ - if (embb_mtapi_group_pool_is_handle_valid( - node->group_pool, local_task->group)) { - embb_mtapi_group_t* local_group = - embb_mtapi_group_pool_get_storage_for_handle( - node->group_pool, local_task->group); - embb_mtapi_task_queue_push(&local_group->queue, local_task); - } - } - } + embb_mtapi_network_buffer_clear(buffer); + + switch (operation) { + case EMBB_MTAPI_NETWORK_START_TASK: + embb_mtapi_network_handle_start_task(socket, buffer); + break; + case EMBB_MTAPI_NETWORK_RETURN_RESULT: + embb_mtapi_network_handle_return_result(socket, buffer); + break; + default: + // eh? + break; } } } } - embb_mtapi_network_buffer_finalize(&buffer); - return EMBB_SUCCESS; } @@ -408,42 +449,106 @@ void mtapi_network_plugin_initialize( MTAPI_IN mtapi_uint16_t max_connections, MTAPI_IN mtapi_size_t buffer_size, MTAPI_OUT mtapi_status_t* status) { - mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; embb_mtapi_network_plugin_t * plugin = &embb_mtapi_network_plugin; int err; + mtapi_status_set(status, MTAPI_ERR_UNKNOWN); + + plugin->socket_count = 0; + plugin->buffer_size = 0; + plugin->sockets = NULL; + embb_atomic_store_int(&plugin->run, 0); + err = embb_mtapi_network_initialize(); - if (err) { - embb_atomic_store_int(&plugin->run, 1); - plugin->buffer_size = buffer_size; - - plugin->socket_count = 1; - // 1 listening socket and max_connections connections - // (2 sockets each if local) - plugin->sockets = (embb_mtapi_network_socket_t*)embb_alloc( - sizeof(embb_mtapi_network_socket_t) * (1 + max_connections * 2)); - - embb_mtapi_network_buffer_initialize( - &plugin->send_buffer, (int)plugin->buffer_size); - embb_mutex_init(&plugin->send_mutex, 0); - - if (NULL != plugin->sockets) { - err = embb_mtapi_network_socket_initialize(&plugin->sockets[0]); - if (err) { - err = embb_mtapi_network_socket_bind_and_listen( - &plugin->sockets[0], host, port, max_connections); - if (err) { - err = embb_thread_create( - &plugin->thread, NULL, embb_mtapi_network_thread, NULL); - if (EMBB_SUCCESS == err) { - local_status = MTAPI_SUCCESS; - } - } - } - } + if (0 == err) return; + + err = embb_mtapi_network_buffer_initialize( + &plugin->recv_buffer, (int)buffer_size); + if (0 == err) { + embb_mtapi_network_finalize(); + return; } - mtapi_status_set(status, local_status); + err = embb_mtapi_network_buffer_initialize( + &plugin->send_buffer, (int)buffer_size); + if (0 == err) { + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + embb_mtapi_network_finalize(); + return; + } + + plugin->buffer_size = buffer_size; + + // 1 listening socket and max_connections connections + // (2 sockets each if local) + plugin->sockets = (embb_mtapi_network_socket_t*)embb_alloc( + sizeof(embb_mtapi_network_socket_t) * (1 + max_connections * 2)); + if (NULL == plugin->sockets) { + embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + plugin->buffer_size = 0; + embb_mtapi_network_finalize(); + return; + } + + err = embb_mutex_init(&plugin->send_mutex, 0); + if (EMBB_SUCCESS != err) { + embb_free(plugin->sockets); + plugin->sockets = NULL; + embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + plugin->buffer_size = 0; + embb_mtapi_network_finalize(); + return; + } + + err = embb_mtapi_network_socket_initialize(&plugin->sockets[0]); + if (0 == err) { + embb_mutex_destroy(&plugin->send_mutex); + embb_free(plugin->sockets); + plugin->sockets = NULL; + embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + plugin->buffer_size = 0; + embb_mtapi_network_finalize(); + return; + } + plugin->socket_count = 1; + + err = embb_mtapi_network_socket_bind_and_listen( + &plugin->sockets[0], host, port, max_connections); + if (0 == err) { + embb_mtapi_network_socket_finalize(&plugin->sockets[0]); + plugin->socket_count = 0; + embb_mutex_destroy(&plugin->send_mutex); + embb_free(plugin->sockets); + plugin->sockets = NULL; + embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + plugin->buffer_size = 0; + embb_mtapi_network_finalize(); + return; + } + + embb_atomic_store_int(&plugin->run, 1); + + err = embb_thread_create( + &plugin->thread, NULL, embb_mtapi_network_thread, NULL); + if (EMBB_SUCCESS != err) { + embb_atomic_store_int(&plugin->run, 0); + embb_mtapi_network_socket_finalize(&plugin->sockets[0]); + plugin->socket_count = 0; + embb_mutex_destroy(&plugin->send_mutex); + embb_free(plugin->sockets); + plugin->sockets = NULL; + embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + plugin->buffer_size = 0; + embb_mtapi_network_finalize(); + return; + } + + mtapi_status_set(status, MTAPI_SUCCESS); } void mtapi_network_plugin_finalize( @@ -458,6 +563,8 @@ void mtapi_network_plugin_finalize( embb_mutex_destroy(&plugin->send_mutex); embb_mtapi_network_buffer_finalize(&plugin->send_buffer); + embb_mtapi_network_buffer_finalize(&plugin->recv_buffer); + embb_mtapi_network_socket_finalize(&plugin->sockets[0]); embb_free(plugin->sockets); embb_mtapi_network_finalize(); @@ -468,9 +575,9 @@ void mtapi_network_plugin_finalize( static void network_task_start( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { - mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; - int err; - EMBB_UNUSED_IN_RELEASE(err); + + // assume failure + mtapi_status_set(status, MTAPI_ERR_UNKNOWN); if (embb_mtapi_node_is_initialized()) { embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); @@ -491,59 +598,70 @@ static void network_task_start( // serialize sending embb_mutex_lock(&network_action->send_mutex); + embb_mtapi_network_buffer_clear(send_buf); + + // actual counts bytes actually put into the buffer + int actual = 0; + // expected counts bytes we intended to put into the buffer + int expected = 0; // operation is "start task" - err = embb_mtapi_network_buffer_push_back_int8( + actual += embb_mtapi_network_buffer_push_back_int8( send_buf, EMBB_MTAPI_NETWORK_START_TASK); - assert(err == 1); + expected += 1; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)network_action->domain_id); - assert(err == 4); + expected += 4; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)network_action->job_id); - assert(err == 4); + expected += 4; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->attributes.priority); - assert(err == 4); + expected += 4; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->handle.id); - assert(err == 4); - err = embb_mtapi_network_buffer_push_back_int32( + expected += 4; + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->handle.tag); - assert(err == 4); + expected += 4; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->result_size); - assert(err == 4); + expected += 4; - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->arguments_size); - assert(err == 4); - err = embb_mtapi_network_buffer_push_back_rawdata( + expected += 4; + actual += embb_mtapi_network_buffer_push_back_rawdata( send_buf, (int32_t)local_task->arguments_size, local_task->arguments); - assert(err == (int)local_task->arguments_size); - - err = embb_mtapi_network_socket_sendbuffer( - &network_action->socket, send_buf); - assert(err == send_buf->size); - - embb_atomic_fetch_and_add_int(&local_action->num_tasks, 1); - embb_atomic_store_int(&local_task->state, MTAPI_TASK_RUNNING); + expected += (int)local_task->arguments_size; + + // check if everything fit into the buffer + if (actual == expected) { + int sent = embb_mtapi_network_socket_sendbuffer( + &network_action->socket, send_buf); + // was everything sent? + if (sent == send_buf->size) { + embb_atomic_fetch_and_add_int(&local_action->num_tasks, 1); + embb_atomic_store_int(&local_task->state, MTAPI_TASK_RUNNING); + // we've done it, success! + mtapi_status_set(status, MTAPI_SUCCESS); + } else { + // could not send the whole task, this will fail on the remote side, + // so we can safely assume that the task is in error + embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); + } + } embb_mtapi_network_buffer_clear(send_buf); - embb_mutex_unlock(&network_action->send_mutex); - - local_status = MTAPI_SUCCESS; } } } - - mtapi_status_set(status, local_status); } static void network_task_cancel( @@ -602,34 +720,36 @@ mtapi_action_hndl_t mtapi_network_action_create( action->domain_id = domain_id; action->job_id = remote_job_id; - embb_mtapi_network_buffer_initialize( + err = embb_mtapi_network_buffer_initialize( &action->send_buffer, (int)plugin->buffer_size); - embb_mutex_init(&action->send_mutex, 0); - - action->host = host; - action->port = port; - embb_mtapi_network_socket_initialize(&action->socket); - err = embb_mtapi_network_socket_connect(&action->socket, host, port); - if (0 != err) { - // store socket for select - plugin->sockets[plugin->socket_count] = action->socket; - plugin->socket_count++; - - action_hndl = mtapi_ext_plugin_action_create( - local_job_id, - network_task_start, - network_task_cancel, - network_action_finalize, - action, - NULL, 0, // no node local data obviously - MTAPI_NULL, - &local_status); - } else { - embb_mutex_destroy(&action->send_mutex); - embb_mtapi_network_buffer_finalize(&action->send_buffer); - embb_mtapi_network_socket_finalize(&action->socket); - embb_free(action); + err = embb_mutex_init(&action->send_mutex, 0); + if (EMBB_SUCCESS == err) { + action->host = host; + action->port = port; + embb_mtapi_network_socket_initialize(&action->socket); + err = embb_mtapi_network_socket_connect(&action->socket, host, port); + if (0 != err) { + // store socket for select + plugin->sockets[plugin->socket_count] = action->socket; + plugin->socket_count++; + + action_hndl = mtapi_ext_plugin_action_create( + local_job_id, + network_task_start, + network_task_cancel, + network_action_finalize, + action, + NULL, 0, // no node local data obviously + MTAPI_NULL, + &local_status); + } else { + embb_mutex_destroy(&action->send_mutex); + embb_mtapi_network_buffer_finalize(&action->send_buffer); + embb_mtapi_network_socket_finalize(&action->socket); + embb_free(action); + } + } } } diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c index 76ef1b0..61b0482 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.c @@ -28,9 +28,10 @@ #include #include -void embb_mtapi_network_buffer_initialize( +int embb_mtapi_network_buffer_initialize( embb_mtapi_network_buffer_t * that, int capacity) { + int result = 1; that->position = 0; that->size = 0; that->data = (char*)embb_alloc((size_t)capacity); @@ -38,7 +39,9 @@ void embb_mtapi_network_buffer_initialize( that->capacity = capacity; } else { that->capacity = 0; + result = 0; } + return result; } void embb_mtapi_network_buffer_finalize( diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h index 2d5c306..f4a6c11 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_buffer.h @@ -43,7 +43,7 @@ struct embb_mtapi_network_buffer_struct { typedef struct embb_mtapi_network_buffer_struct embb_mtapi_network_buffer_t; -void embb_mtapi_network_buffer_initialize( +int embb_mtapi_network_buffer_initialize( embb_mtapi_network_buffer_t * that, int capacity ); diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c index 4d203cf..bcb46ea 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network_socket.c @@ -116,7 +116,8 @@ int embb_mtapi_network_socket_connect( if (SOCKET_ERROR == connect(that->handle, (struct sockaddr *)&addr, sizeof(addr))) { #ifdef _WIN32 - if (WSAEWOULDBLOCK != WSAGetLastError()) + int err = WSAGetLastError(); + if (WSAEWOULDBLOCK != err) #else if (EAGAIN != errno) #endif From 14b8ff89021302a48a7a876475f5fb666f5ff925 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 23 Mar 2016 12:48:51 +0100 Subject: [PATCH 56/79] network_cpp: only send complete result messages --- .../mtapi_network_c/src/embb_mtapi_network.c | 37 +++++++++++-------- 1 file changed, 22 insertions(+), 15 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index ee908c3..7a9dac1 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -144,33 +144,40 @@ static void embb_mtapi_network_task_complete( embb_mutex_lock(&plugin->send_mutex); embb_mtapi_network_buffer_clear(send_buf); + // actual counts bytes actually put into the buffer + int actual = 0; + // expected counts bytes we intended to put into the buffer + int expected = 0; + // operation is "return result" - err = embb_mtapi_network_buffer_push_back_int8( + actual += embb_mtapi_network_buffer_push_back_int8( send_buf, EMBB_MTAPI_NETWORK_RETURN_RESULT); - assert(err == 1); + expected += 1; // remote task id - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, network_task->remote_task_id); - assert(err == 4); - err = embb_mtapi_network_buffer_push_back_int32( + expected += 4; + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, network_task->remote_task_tag); - assert(err == 4); + expected += 4; // status - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, local_task->error_code); - assert(err == 4); + expected += 4; // result size - err = embb_mtapi_network_buffer_push_back_int32( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->result_size); - assert(err == 4); - err = embb_mtapi_network_buffer_push_back_rawdata( + expected += 4; + actual += embb_mtapi_network_buffer_push_back_rawdata( send_buf, (int32_t)local_task->result_size, local_task->result_buffer); - assert(err == (int)local_task->result_size); + expected += (int)local_task->result_size; - err = embb_mtapi_network_socket_sendbuffer( - &network_task->socket, send_buf); - assert(err == send_buf->size); + if (expected == actual) { + int sent = embb_mtapi_network_socket_sendbuffer( + &network_task->socket, send_buf); + assert(sent == send_buf->size); + } // sending done embb_mutex_unlock(&plugin->send_mutex); From e1b96eb4168e2fa33289b2a4f35b4555be617a50 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 23 Mar 2016 13:00:33 +0100 Subject: [PATCH 57/79] dataflow_cpp: added default token count to network --- dataflow_cpp/include/embb/dataflow/network.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 7a20c58..7dccb0b 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -681,8 +681,11 @@ class Network { class Network : public internal::ClockListener { public: - explicit Network(int slices) + explicit Network(int slices = 0) : sink_counter_(NULL), slices_(slices), sched_(NULL) { + if (0 >= slices) { + slices_ = int(embb_core_count_available())*4; + } sched_ = embb::base::Allocation::New(slices_); sink_counter_ = reinterpret_cast*>( embb::base::Allocation::Allocate( From 60383a1c773e10bb87977aff04b1adba08d23d34 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 4 Apr 2016 10:20:01 +0200 Subject: [PATCH 58/79] dataflow_cpp: added missing connection checks in Outputs --- .../include/embb/dataflow/internal/outputs.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dataflow_cpp/include/embb/dataflow/internal/outputs.h b/dataflow_cpp/include/embb/dataflow/internal/outputs.h index 2fce315..dee7e9d 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/outputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/outputs.h @@ -85,6 +85,11 @@ class Outputs, Out, Out, embb::base::internal::Nil, embb::base::internal::Nil> { public: + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() && + this->template Get<1>().IsConnected() && + this->template Get<2>().IsConnected(); + } }; template @@ -92,6 +97,12 @@ class Outputs : public Tuple, Out, Out, Out, embb::base::internal::Nil>{ public: + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() && + this->template Get<1>().IsConnected() && + this->template Get<2>().IsConnected() && + this->template Get<3>().IsConnected(); + } }; template , Out, Out, Out, Out > { public: + bool IsFullyConnected() { + return this->template Get<0>().IsConnected() && + this->template Get<1>().IsConnected() && + this->template Get<2>().IsConnected() && + this->template Get<3>().IsConnected() && + this->template Get<4>().IsConnected(); + } }; } // namespace internal From 7554679160e9d15e585db8eb9a7a9d82025a25dd Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 4 Apr 2016 11:16:29 +0200 Subject: [PATCH 59/79] dataflow_cpp: check for cycles in graph --- .../embb/dataflow/internal/clock_listener.h | 1 + .../include/embb/dataflow/internal/in.h | 4 +++ .../include/embb/dataflow/internal/inputs.h | 15 ++++++++++ .../include/embb/dataflow/internal/node.h | 1 + .../include/embb/dataflow/internal/out.h | 9 ++++++ .../include/embb/dataflow/internal/outputs.h | 30 +++++++++++++++++++ .../include/embb/dataflow/internal/process.h | 13 ++++++++ .../include/embb/dataflow/internal/select.h | 9 ++++++ .../include/embb/dataflow/internal/switch.h | 9 ++++++ dataflow_cpp/include/embb/dataflow/network.h | 17 +++++++---- 10 files changed, 102 insertions(+), 6 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h index f814d5b..d7993b2 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h +++ b/dataflow_cpp/include/embb/dataflow/internal/clock_listener.h @@ -35,6 +35,7 @@ class ClockListener { public: virtual ~ClockListener() {} virtual void OnClock(int /*clock*/) = 0; + virtual bool OnHasCycle(ClockListener * /*node*/) { return false; } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index ec3d476..cb5d6ca 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -73,6 +73,10 @@ class In { bool IsConnected() const { return connected_; } void SetConnected() { connected_ = true; } + bool HasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } + void SetSlices(int slices) { slices_ = slices; values_ = reinterpret_cast( diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 81282dd..bcbed54 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -106,6 +106,9 @@ class InputsOnClock(clock); } } + virtual bool OnHasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } bool IsFullyConnected() { return this->template Get<0>().IsConnected(); } @@ -164,6 +167,9 @@ class InputsOnClock(clock); } } + virtual bool OnHasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } bool IsFullyConnected() { return this->template Get<0>().IsConnected() & this->template Get<1>().IsConnected(); @@ -228,6 +234,9 @@ class InputsOnClock(clock); } } + virtual bool OnHasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } bool IsFullyConnected() { return this->template Get<0>().IsConnected() & this->template Get<1>().IsConnected() & @@ -297,6 +306,9 @@ class Inputs listener_->OnClock(clock); } } + virtual bool OnHasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } bool IsFullyConnected() { return this->template Get<0>().IsConnected() & this->template Get<1>().IsConnected() & @@ -373,6 +385,9 @@ class Inputs listener_->OnClock(clock); } } + virtual bool OnHasCycle(ClockListener * node) { + return listener_->OnHasCycle(node); + } bool IsFullyConnected() { return this->template Get<0>().IsConnected() && this->template Get<1>().IsConnected() & diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index 5dfebd8..206d56a 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -44,6 +44,7 @@ class Node { virtual bool HasOutputs() const { return false; } virtual void Run(int clock) = 0; virtual bool IsFullyConnected() = 0; + virtual bool HasCycle() { return false; } virtual bool Start(int /*clock*/) { EMBB_THROW(embb::base::ErrorException, "Nodes are started implicitly."); diff --git a/dataflow_cpp/include/embb/dataflow/internal/out.h b/dataflow_cpp/include/embb/dataflow/internal/out.h index 3f5aea4..72ff3c8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/out.h +++ b/dataflow_cpp/include/embb/dataflow/internal/out.h @@ -36,6 +36,7 @@ namespace dataflow { namespace internal { class Scheduler; +class ClockListener; template class Out { @@ -70,6 +71,14 @@ class Out { return targets_.size() > 0; } + bool HasCycle(ClockListener * node) { + bool result = false; + for (size_t ii = 0; ii < targets_.size() && !result; ii++) { + result = result || targets_[ii]->HasCycle(node); + } + return result; + } + private: std::vector< InType * > targets_; }; diff --git a/dataflow_cpp/include/embb/dataflow/internal/outputs.h b/dataflow_cpp/include/embb/dataflow/internal/outputs.h index dee7e9d..f969267 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/outputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/outputs.h @@ -42,6 +42,8 @@ template < typename = embb::base::internal::Nil > class Outputs; +class ClockListener; + template <> class Outputs @@ -65,6 +70,9 @@ class Outputstemplate Get<0>().IsConnected(); } + bool HasCycle(ClockListener * node) { + return this->template Get<0>().HasCycle(node); + } }; template @@ -77,6 +85,10 @@ class Outputstemplate Get<0>().IsConnected() && this->template Get<1>().IsConnected(); } + bool HasCycle(ClockListener * node) { + return this->template Get<0>().HasCycle(node) || + this->template Get<1>().HasCycle(node); + } }; template @@ -90,6 +102,11 @@ class Outputstemplate Get<1>().IsConnected() && this->template Get<2>().IsConnected(); } + bool HasCycle(ClockListener * node) { + return this->template Get<0>().HasCycle(node) || + this->template Get<1>().HasCycle(node) || + this->template Get<2>().HasCycle(node); + } }; template @@ -103,6 +120,12 @@ class Outputs this->template Get<2>().IsConnected() && this->template Get<3>().IsConnected(); } + bool HasCycle(ClockListener * node) { + return this->template Get<0>().HasCycle(node) || + this->template Get<1>().HasCycle(node) || + this->template Get<2>().HasCycle(node) || + this->template Get<3>().HasCycle(node); + } }; template template Get<3>().IsConnected() && this->template Get<4>().IsConnected(); } + bool HasCycle(ClockListener * node) { + return this->template Get<0>().HasCycle(node) || + this->template Get<1>().HasCycle(node) || + this->template Get<2>().HasCycle(node) || + this->template Get<3>().HasCycle(node) || + this->template Get<4>().HasCycle(node); + } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 1dfade2..1b111bf 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -98,6 +98,10 @@ class Process< Serial, Inputs, return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } + virtual bool HasCycle() { + return outputs_.HasCycle(this); + } + InputsType & GetInputs() { return inputs_; } @@ -160,6 +164,15 @@ class Process< Serial, Inputs, } } + virtual bool OnHasCycle(ClockListener * node) { + ClockListener * this_node = this; + if (this_node == node) { + return true; + } else { + return outputs_.HasCycle(node); + } + } + private: InputsType inputs_; OutputsType outputs_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index c90758f..770591f 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -85,6 +85,15 @@ class Select return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } + virtual bool OnHasCycle(ClockListener * node) { + ClockListener * this_node = this; + if (this_node == node) { + return true; + } else { + return outputs_.HasCycle(node); + } + } + InputsType & GetInputs() { return inputs_; } diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index db02058..1ce0ccb 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -82,6 +82,15 @@ class Switch return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } + virtual bool OnHasCycle(ClockListener * node) { + ClockListener * this_node = this; + if (this_node == node) { + return true; + } else { + return outputs_.HasCycle(node); + } + } + InputsType & GetInputs() { return inputs_; } diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 7a20c58..bb6f3ea 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -838,14 +838,19 @@ class Network : public internal::ClockListener { bool IsValid() { bool valid = true; - for (size_t ii = 0; ii < sources_.size(); ii++) { - valid = valid & sources_[ii]->IsFullyConnected(); + // check connectivity + for (size_t ii = 0; ii < sources_.size() && valid; ii++) { + valid = valid && sources_[ii]->IsFullyConnected(); } - for (size_t ii = 0; ii < processes_.size(); ii++) { - valid = valid & processes_[ii]->IsFullyConnected(); + for (size_t ii = 0; ii < processes_.size() && valid; ii++) { + valid = valid && processes_[ii]->IsFullyConnected(); } - for (size_t ii = 0; ii < sinks_.size(); ii++) { - valid = valid & sinks_[ii]->IsFullyConnected(); + for (size_t ii = 0; ii < sinks_.size() && valid; ii++) { + valid = valid && sinks_[ii]->IsFullyConnected(); + } + // check for cycles + for (size_t ii = 0; ii < processes_.size() && valid; ii++) { + valid = valid && !processes_[ii]->HasCycle(); } return valid; } From a7e94398d19c6a693338fe596204b00f8e760bc1 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 5 Apr 2016 14:46:54 +0200 Subject: [PATCH 60/79] removed UTF8 BOM from README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f829b34..9afe806 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Embedded Multicore Building Blocks (EMB²) +Embedded Multicore Building Blocks (EMB²) ========================================= From f61ec036412ef45f38017769ec0a852110f23142 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 6 Apr 2016 10:27:04 +0200 Subject: [PATCH 61/79] tasks_cpp: add function to query the task limit --- tasks_cpp/include/embb/tasks/node.h | 10 ++++++++++ tasks_cpp/src/node.cc | 3 +++ 2 files changed, 13 insertions(+) diff --git a/tasks_cpp/include/embb/tasks/node.h b/tasks_cpp/include/embb/tasks/node.h index 666cab1..3561a32 100644 --- a/tasks_cpp/include/embb/tasks/node.h +++ b/tasks_cpp/include/embb/tasks/node.h @@ -129,6 +129,15 @@ class Node { return queue_count_; } + /** + * Returns the number of available tasks. + * \return The number of available tasks + * \waitfree + */ + mtapi_uint_t GetTaskLimit() const { + return task_limit_; + } + /** * Returns the number of available cores. * \return The number of available cores @@ -229,6 +238,7 @@ class Node { mtapi_task_context_t * context); mtapi_uint_t queue_count_; + mtapi_uint_t task_limit_; mtapi_uint_t core_count_; mtapi_uint_t worker_thread_count_; mtapi_action_hndl_t action_handle_; diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index 8dc49b0..031338a 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -78,6 +78,9 @@ Node::Node( mtapi_node_get_attribute(node_id, MTAPI_NODE_MAX_QUEUES, &queue_count_, sizeof(queue_count_), &status); assert(MTAPI_SUCCESS == status); + mtapi_node_get_attribute(node_id, MTAPI_NODE_MAX_TASKS, &task_limit_, + sizeof(queue_count_), &status); + assert(MTAPI_SUCCESS == status); core_count_ = info.hardware_concurrency; worker_thread_count_ = embb_core_set_count(&attr->core_affinity); action_handle_ = mtapi_action_create(TASKS_CPP_JOB, action_func, From 64b15b2a6803fd26ceab946b2b1984ac76c6bb6b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 6 Apr 2016 10:42:18 +0200 Subject: [PATCH 62/79] dataflow_cpp: preparations for deferred slice initialization --- dataflow_cpp/include/embb/dataflow/internal/node.h | 1 + dataflow_cpp/include/embb/dataflow/internal/process.h | 4 ++++ .../include/embb/dataflow/internal/scheduler.h | 1 + .../include/embb/dataflow/internal/scheduler_mtapi.h | 9 ++++++++- .../embb/dataflow/internal/scheduler_sequential.h | 1 + dataflow_cpp/include/embb/dataflow/network.h | 3 +++ tasks_cpp/include/embb/tasks/node.h | 10 ++++++++++ tasks_cpp/src/node.cc | 3 +++ 8 files changed, 31 insertions(+), 1 deletion(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index 5dfebd8..57a8a94 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -44,6 +44,7 @@ class Node { virtual bool HasOutputs() const { return false; } virtual void Run(int clock) = 0; virtual bool IsFullyConnected() = 0; + virtual bool IsSequential() { return true; } virtual bool Start(int /*clock*/) { EMBB_THROW(embb::base::ErrorException, "Nodes are started implicitly."); diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 1dfade2..584c948 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -98,6 +98,10 @@ class Process< Serial, Inputs, return inputs_.IsFullyConnected() && outputs_.IsFullyConnected(); } + virtual bool IsSequential() { + return Serial; + } + InputsType & GetInputs() { return inputs_; } diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler.h index 9f86e96..dbf5556 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler.h @@ -40,6 +40,7 @@ class Scheduler { virtual void Spawn(Action & action) = 0; virtual void Enqueue(int process_id, Action & action) = 0; virtual void WaitForSlice(int slice) = 0; + virtual int GetSlices() = 0; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 856b4a2..0f7319d 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -44,6 +44,13 @@ class SchedulerMTAPI : public Scheduler { : slices_(slices) { embb::tasks::Node & node = embb::tasks::Node::GetInstance(); + int tl = std::min( + static_cast(node.GetTaskLimit()), + static_cast(node.GetGroupCount())); + if (tl < slices_) { + slices_ = tl; + } + group_ = reinterpret_cast( embb::base::Allocation::Allocate( sizeof(embb::tasks::Group*)*slices_)); @@ -93,7 +100,7 @@ class SchedulerMTAPI : public Scheduler { virtual void WaitForSlice(int slice) { group_[slice]->WaitAll(MTAPI_INFINITE); } - + virtual int GetSlices() { return slices_; } private: embb::tasks::Group ** group_; embb::tasks::Queue ** queue_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h index 575fea3..c9c4b9d 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_sequential.h @@ -45,6 +45,7 @@ class SchedulerSequential : public Scheduler { action.RunSequential(); } virtual void WaitForSlice(int /*slice*/) {} + virtual int GetSlices() { return 1; } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 7dccb0b..53b17e0 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -687,6 +687,9 @@ class Network : public internal::ClockListener { slices_ = int(embb_core_count_available())*4; } sched_ = embb::base::Allocation::New(slices_); + if (sched_->GetSlices() != slices_) { + slices_ = sched_->GetSlices(); + } sink_counter_ = reinterpret_cast*>( embb::base::Allocation::Allocate( sizeof(embb::base::Atomic)*slices_)); diff --git a/tasks_cpp/include/embb/tasks/node.h b/tasks_cpp/include/embb/tasks/node.h index 3561a32..1695f54 100644 --- a/tasks_cpp/include/embb/tasks/node.h +++ b/tasks_cpp/include/embb/tasks/node.h @@ -129,6 +129,15 @@ class Node { return queue_count_; } + /** + * Returns the number of available groups. + * \return The number of available groups + * \waitfree + */ + mtapi_uint_t GetGroupCount() const { + return group_count_; + } + /** * Returns the number of available tasks. * \return The number of available tasks @@ -238,6 +247,7 @@ class Node { mtapi_task_context_t * context); mtapi_uint_t queue_count_; + mtapi_uint_t group_count_; mtapi_uint_t task_limit_; mtapi_uint_t core_count_; mtapi_uint_t worker_thread_count_; diff --git a/tasks_cpp/src/node.cc b/tasks_cpp/src/node.cc index 031338a..6d92e9c 100644 --- a/tasks_cpp/src/node.cc +++ b/tasks_cpp/src/node.cc @@ -78,6 +78,9 @@ Node::Node( mtapi_node_get_attribute(node_id, MTAPI_NODE_MAX_QUEUES, &queue_count_, sizeof(queue_count_), &status); assert(MTAPI_SUCCESS == status); + mtapi_node_get_attribute(node_id, MTAPI_NODE_MAX_GROUPS, &group_count_, + sizeof(group_count_), &status); + assert(MTAPI_SUCCESS == status); mtapi_node_get_attribute(node_id, MTAPI_NODE_MAX_TASKS, &task_limit_, sizeof(queue_count_), &status); assert(MTAPI_SUCCESS == status); From 454e7619f40bba4ee0012ba1a45832e5a183618b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 7 Apr 2016 12:59:04 +0200 Subject: [PATCH 63/79] mtapi_network_c: improved protocol for better error handling --- .../mtapi_network_c/src/embb_mtapi_network.c | 346 ++++++++++++------ 1 file changed, 236 insertions(+), 110 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index 7a9dac1..2140897 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -72,7 +72,8 @@ void embb_mtapi_network_finalize() { enum embb_mtapi_network_operation_enum { EMBB_MTAPI_NETWORK_START_TASK, - EMBB_MTAPI_NETWORK_RETURN_RESULT + EMBB_MTAPI_NETWORK_RETURN_RESULT, + EMBB_MTAPI_NETWORK_RETURN_FAILURE }; struct embb_mtapi_network_plugin_struct { @@ -114,12 +115,15 @@ struct embb_mtapi_network_task_struct { typedef struct embb_mtapi_network_task_struct embb_mtapi_network_task_t; +static void embb_mtapi_network_task_failure( + ) { + +} + static void embb_mtapi_network_task_complete( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; - int err; - EMBB_UNUSED_IN_RELEASE(err); if (embb_mtapi_node_is_initialized()) { embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); @@ -147,31 +151,37 @@ static void embb_mtapi_network_task_complete( // actual counts bytes actually put into the buffer int actual = 0; // expected counts bytes we intended to put into the buffer - int expected = 0; + int expected = + 1 + // operation + 4 + 4 + // remote task handle + 4 + // status + 4 + (int)local_task->result_size; // result buffer + + // packet size + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, expected); + expected += 4; // operation is "return result" actual += embb_mtapi_network_buffer_push_back_int8( send_buf, EMBB_MTAPI_NETWORK_RETURN_RESULT); - expected += 1; + // remote task id actual += embb_mtapi_network_buffer_push_back_int32( send_buf, network_task->remote_task_id); - expected += 4; actual += embb_mtapi_network_buffer_push_back_int32( send_buf, network_task->remote_task_tag); - expected += 4; + // status actual += embb_mtapi_network_buffer_push_back_int32( send_buf, local_task->error_code); - expected += 4; + // result size actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->result_size); - expected += 4; actual += embb_mtapi_network_buffer_push_back_rawdata( send_buf, (int32_t)local_task->result_size, local_task->result_buffer); - expected += (int)local_task->result_size; if (expected == actual) { int sent = embb_mtapi_network_socket_sendbuffer( @@ -194,9 +204,31 @@ static void embb_mtapi_network_task_complete( mtapi_status_set(status, local_status); } +static void embb_mtapi_network_return_failure( + int32_t remote_task_id, + int32_t remote_task_tag, + mtapi_status_t status, + embb_mtapi_network_socket_t * socket, + embb_mtapi_network_buffer_t * buffer) +{ + embb_mtapi_network_buffer_clear(buffer); + embb_mtapi_network_buffer_push_back_int32( + buffer, 12); + embb_mtapi_network_buffer_push_back_int32( + buffer, remote_task_id); + embb_mtapi_network_buffer_push_back_int32( + buffer, remote_task_tag); + embb_mtapi_network_buffer_push_back_int32( + buffer, (int32_t)status); + + embb_mtapi_network_socket_sendbuffer( + socket, buffer); +} + static mtapi_status_t embb_mtapi_network_handle_start_task( embb_mtapi_network_socket_t * socket, - embb_mtapi_network_buffer_t * buffer) { + embb_mtapi_network_buffer_t * buffer, + int packet_size) { int32_t domain_id; int32_t job_id; @@ -205,22 +237,18 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( int err; int32_t arguments_size; + int32_t remote_task_id; + int32_t remote_task_tag; mtapi_uint_t priority = 0; mtapi_job_hndl_t job_hndl; mtapi_task_attributes_t task_attr; void * arguments; mtapi_task_complete_function_t func = embb_mtapi_network_task_complete; void * func_void; - embb_mtapi_network_task_t * network_task = - (embb_mtapi_network_task_t*)embb_alloc( - sizeof(embb_mtapi_network_task_t)); mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, buffer, 28); - - // check if we really got 28 bytes - if (err == 28) { + // check if we have at least 28 bytes + if (packet_size >= 28) { // domain id err = embb_mtapi_network_buffer_pop_front_int32(buffer, &domain_id); @@ -234,78 +262,98 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( assert(err == 4); // remote task handle err = embb_mtapi_network_buffer_pop_front_int32( - buffer, &network_task->remote_task_id); + buffer, &remote_task_id); assert(err == 4); err = embb_mtapi_network_buffer_pop_front_int32( - buffer, &network_task->remote_task_tag); + buffer, &remote_task_tag); assert(err == 4); // result size err = embb_mtapi_network_buffer_pop_front_int32(buffer, &results_size); assert(err == 4); - results = embb_alloc((size_t)results_size); - assert(results != NULL); // arguments size - embb_mtapi_network_buffer_pop_front_int32(buffer, &arguments_size); + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &arguments_size); assert(err == 4); - arguments = embb_alloc((size_t)arguments_size); - assert(arguments != NULL); - - embb_mtapi_network_buffer_clear(buffer); - - // arguments - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, buffer, arguments_size); - assert(err == arguments_size); - err = embb_mtapi_network_buffer_pop_front_rawdata( - buffer, arguments_size, arguments); - assert(err == arguments_size); - - embb_mtapi_network_buffer_clear(buffer); - - network_task->socket = *socket; - mtapi_taskattr_init(&task_attr, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA, - (void*)network_task, 0, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_boolean_t task_detached = MTAPI_TRUE; - mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, - (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, - (void*)&priority, sizeof(mtapi_uint_t), &local_status); - assert(local_status == MTAPI_SUCCESS); - memcpy(&func_void, &func, sizeof(void*)); - mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, - func_void, 0, &local_status); - assert(local_status == MTAPI_SUCCESS); - job_hndl = mtapi_job_get((mtapi_job_id_t)job_id, - (mtapi_domain_t)domain_id, &local_status); - assert(local_status == MTAPI_SUCCESS); - mtapi_task_start( - MTAPI_TASK_ID_NONE, job_hndl, - arguments, (mtapi_size_t)arguments_size, - results, (mtapi_size_t)results_size, - &task_attr, MTAPI_GROUP_NONE, - &local_status); - assert(local_status == MTAPI_SUCCESS); - - // send back result of task creation - //embb_mtapi_network_buffer_push_back_int32( - // &buffer, local_status); - //embb_mtapi_network_socket_sendbuffer( - // socket, &buffer); - } - embb_mtapi_network_buffer_clear(buffer); + embb_mtapi_network_task_t * network_task = + (embb_mtapi_network_task_t*)embb_alloc( + sizeof(embb_mtapi_network_task_t)); + + if (network_task == NULL) { + embb_mtapi_network_return_failure( + remote_task_id, remote_task_tag, MTAPI_ERR_UNKNOWN, + socket, buffer); + return MTAPI_ERR_UNKNOWN; + } + network_task->remote_task_id = remote_task_id; + network_task->remote_task_tag = remote_task_tag; + + // check packet_size again + if (packet_size == 28 + arguments_size) { + // allocate buffers + results = embb_alloc((size_t)results_size); + if (results == NULL) { + embb_mtapi_network_return_failure( + remote_task_id, remote_task_tag, MTAPI_ERR_UNKNOWN, + socket, buffer); + return MTAPI_ERR_UNKNOWN; + } + arguments = embb_alloc((size_t)arguments_size); + if (arguments == NULL) { + embb_free(results); + embb_mtapi_network_return_failure( + remote_task_id, remote_task_tag, MTAPI_ERR_UNKNOWN, + socket, buffer); + return MTAPI_ERR_UNKNOWN; + } + + // arguments + err = embb_mtapi_network_buffer_pop_front_rawdata( + buffer, arguments_size, arguments); + assert(err == arguments_size); + + network_task->socket = *socket; + mtapi_taskattr_init(&task_attr, &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_USER_DATA, + (void*)network_task, 0, &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_boolean_t task_detached = MTAPI_TRUE; + mtapi_taskattr_set(&task_attr, MTAPI_TASK_DETACHED, + (void*)&task_detached, sizeof(mtapi_boolean_t), &local_status); + assert(local_status == MTAPI_SUCCESS); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_PRIORITY, + (void*)&priority, sizeof(mtapi_uint_t), &local_status); + assert(local_status == MTAPI_SUCCESS); + memcpy(&func_void, &func, sizeof(void*)); + mtapi_taskattr_set(&task_attr, MTAPI_TASK_COMPLETE_FUNCTION, + func_void, 0, &local_status); + assert(local_status == MTAPI_SUCCESS); + job_hndl = mtapi_job_get((mtapi_job_id_t)job_id, + (mtapi_domain_t)domain_id, &local_status); + if (local_status == MTAPI_SUCCESS) { + mtapi_task_start( + MTAPI_TASK_ID_NONE, job_hndl, + arguments, (mtapi_size_t)arguments_size, + results, (mtapi_size_t)results_size, + &task_attr, MTAPI_GROUP_NONE, + &local_status); + } + if (local_status != MTAPI_SUCCESS) { + embb_free(arguments); + embb_free(results); + embb_mtapi_network_return_failure( + remote_task_id, remote_task_tag, local_status, socket, buffer); + } + } + } return local_status; } static mtapi_status_t embb_mtapi_network_handle_return_result( - embb_mtapi_network_socket_t * socket, - embb_mtapi_network_buffer_t * buffer) { + embb_mtapi_network_buffer_t * buffer, + int packet_size) { int task_status; int task_id; @@ -319,11 +367,8 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); mtapi_task_hndl_t task; - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, buffer, 16); - - // did we really receive 16 bytes? - if (err == 16) { + // do we have at least 16 bytes? + if (packet_size >= 16) { // local task id err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_id); @@ -339,14 +384,8 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( buffer, &results_size); assert(err == 4); - embb_mtapi_network_buffer_clear(buffer); - - err = embb_mtapi_network_socket_recvbuffer_sized( - socket, buffer, results_size); - - // did we get the whole resultbuffer? - if (err == results_size) { - + // check packet_size again + if (packet_size == 16 + results_size) { task.id = (mtapi_task_id_t)task_id; task.tag = (mtapi_uint_t)task_tag; @@ -391,7 +430,71 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( } } - embb_mtapi_network_buffer_clear(buffer); + return local_status; +} + +static mtapi_status_t embb_mtapi_network_handle_return_failure( + embb_mtapi_network_buffer_t * buffer, + int packet_size) { + + int task_status; + int task_id; + int task_tag; + + int err; + mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; + + if (embb_mtapi_node_is_initialized()) { + embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); + mtapi_task_hndl_t task; + + // do we have 12 bytes? + if (packet_size == 12) { + + // local task id + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_id); + assert(err == 4); + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_tag); + assert(err == 4); + // task status + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &task_status); + assert(err == 4); + + task.id = (mtapi_task_id_t)task_id; + task.tag = (mtapi_uint_t)task_tag; + + if (embb_mtapi_task_pool_is_handle_valid(node->task_pool, task)) { + embb_mtapi_task_t * local_task = + embb_mtapi_task_pool_get_storage_for_handle( + node->task_pool, task); + + if (embb_mtapi_action_pool_is_handle_valid( + node->action_pool, local_task->action)) { + embb_mtapi_action_t * local_action = + embb_mtapi_action_pool_get_storage_for_handle( + node->action_pool, local_task->action); + + local_task->error_code = (mtapi_status_t)task_status; + embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); + embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); + + /* is task associated with a group? */ + if (embb_mtapi_group_pool_is_handle_valid( + node->group_pool, local_task->group)) { + embb_mtapi_group_t* local_group = + embb_mtapi_group_pool_get_storage_for_handle( + node->group_pool, local_task->group); + embb_mtapi_task_queue_push(&local_group->queue, local_task); + } + + local_status = MTAPI_SUCCESS; + } + + } + + } + } return local_status; } @@ -418,32 +521,46 @@ static int embb_mtapi_network_thread(void * args) { } } else if (0 < err) { int8_t operation; + int32_t packet_size; embb_mtapi_network_socket_t * socket = &plugin->sockets[err]; embb_mtapi_network_buffer_clear(buffer); err = embb_mtapi_network_socket_recvbuffer_sized( - socket, buffer, 1); - // did we receive one byte? - if (err == 1) { - err = embb_mtapi_network_buffer_pop_front_int8( - buffer, &operation); - assert(err == 1); + socket, buffer, 4); + if (err == 4) { + err = embb_mtapi_network_buffer_pop_front_int32( + buffer, &packet_size); + assert(err == 4); embb_mtapi_network_buffer_clear(buffer); - - switch (operation) { + err = embb_mtapi_network_socket_recvbuffer_sized( + socket, buffer, packet_size); + if (err == packet_size) { + err = embb_mtapi_network_buffer_pop_front_int8( + buffer, &operation); + assert(err == 1); + packet_size--; + + switch (operation) { case EMBB_MTAPI_NETWORK_START_TASK: - embb_mtapi_network_handle_start_task(socket, buffer); + embb_mtapi_network_handle_start_task(socket, buffer, packet_size); break; case EMBB_MTAPI_NETWORK_RETURN_RESULT: - embb_mtapi_network_handle_return_result(socket, buffer); + embb_mtapi_network_handle_return_result(buffer, packet_size); + break; + case EMBB_MTAPI_NETWORK_RETURN_FAILURE: + embb_mtapi_network_handle_return_failure(buffer, packet_size); break; default: // eh? break; + } } } + + embb_mtapi_network_buffer_clear(buffer); + } } @@ -610,42 +727,51 @@ static void network_task_start( // actual counts bytes actually put into the buffer int actual = 0; // expected counts bytes we intended to put into the buffer - int expected = 0; + int expected = + 1 + // operation + 4 + // domain_id + 4 + // job_id + 4 + // priority + 4 + 4 + // task handle + 4 + // result_size + 4 + local_task->arguments_size; // arguments buffer + + // packet size + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, (int32_t)expected); + expected += 4; // operation is "start task" actual += embb_mtapi_network_buffer_push_back_int8( send_buf, EMBB_MTAPI_NETWORK_START_TASK); - expected += 1; + // domain_id actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)network_action->domain_id); - expected += 4; + // job_id actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)network_action->job_id); - expected += 4; + // priority actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->attributes.priority); - expected += 4; + // task handle actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->handle.id); - expected += 4; actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->handle.tag); - expected += 4; + // result size actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->result_size); - expected += 4; + // arguments buffer actual += embb_mtapi_network_buffer_push_back_int32( send_buf, (int32_t)local_task->arguments_size); - expected += 4; actual += embb_mtapi_network_buffer_push_back_rawdata( send_buf, (int32_t)local_task->arguments_size, local_task->arguments); - expected += (int)local_task->arguments_size; // check if everything fit into the buffer if (actual == expected) { From 2152437a2b943f9583fa4dcbe9962121c5e4557b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 7 Apr 2016 13:06:47 +0200 Subject: [PATCH 64/79] mtapi_network_c: tagged operations --- .../mtapi_network_c/src/embb_mtapi_network.c | 36 ++++++++++++------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index 2140897..33bf0f9 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -71,9 +71,9 @@ void embb_mtapi_network_finalize() { } enum embb_mtapi_network_operation_enum { - EMBB_MTAPI_NETWORK_START_TASK, - EMBB_MTAPI_NETWORK_RETURN_RESULT, - EMBB_MTAPI_NETWORK_RETURN_FAILURE + EMBB_MTAPI_NETWORK_START_TASK = 0x01AFFE01, + EMBB_MTAPI_NETWORK_RETURN_RESULT = 0x02AFFE02, + EMBB_MTAPI_NETWORK_RETURN_FAILURE = 0x03AFFE03 }; struct embb_mtapi_network_plugin_struct { @@ -152,7 +152,7 @@ static void embb_mtapi_network_task_complete( int actual = 0; // expected counts bytes we intended to put into the buffer int expected = - 1 + // operation + 4 + // operation 4 + 4 + // remote task handle 4 + // status 4 + (int)local_task->result_size; // result buffer @@ -163,7 +163,7 @@ static void embb_mtapi_network_task_complete( expected += 4; // operation is "return result" - actual += embb_mtapi_network_buffer_push_back_int8( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, EMBB_MTAPI_NETWORK_RETURN_RESULT); // remote task id @@ -212,12 +212,22 @@ static void embb_mtapi_network_return_failure( embb_mtapi_network_buffer_t * buffer) { embb_mtapi_network_buffer_clear(buffer); + + // packet size embb_mtapi_network_buffer_push_back_int32( - buffer, 12); + buffer, 16); + + // operation + embb_mtapi_network_buffer_push_back_int32( + buffer, EMBB_MTAPI_NETWORK_RETURN_FAILURE); + + // task handle embb_mtapi_network_buffer_push_back_int32( buffer, remote_task_id); embb_mtapi_network_buffer_push_back_int32( buffer, remote_task_tag); + + // status embb_mtapi_network_buffer_push_back_int32( buffer, (int32_t)status); @@ -520,7 +530,7 @@ static int embb_mtapi_network_thread(void * args) { plugin->socket_count++; } } else if (0 < err) { - int8_t operation; + int32_t operation; int32_t packet_size; embb_mtapi_network_socket_t * socket = &plugin->sockets[err]; @@ -537,10 +547,10 @@ static int embb_mtapi_network_thread(void * args) { err = embb_mtapi_network_socket_recvbuffer_sized( socket, buffer, packet_size); if (err == packet_size) { - err = embb_mtapi_network_buffer_pop_front_int8( + err = embb_mtapi_network_buffer_pop_front_int32( buffer, &operation); - assert(err == 1); - packet_size--; + assert(err == 4); + packet_size -= 4; switch (operation) { case EMBB_MTAPI_NETWORK_START_TASK: @@ -553,7 +563,7 @@ static int embb_mtapi_network_thread(void * args) { embb_mtapi_network_handle_return_failure(buffer, packet_size); break; default: - // eh? + // invalid, ignore break; } } @@ -728,7 +738,7 @@ static void network_task_start( int actual = 0; // expected counts bytes we intended to put into the buffer int expected = - 1 + // operation + 4 + // operation 4 + // domain_id 4 + // job_id 4 + // priority @@ -742,7 +752,7 @@ static void network_task_start( expected += 4; // operation is "start task" - actual += embb_mtapi_network_buffer_push_back_int8( + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, EMBB_MTAPI_NETWORK_START_TASK); // domain_id From a5182aa59f70244d9abb36fc3277044cdfb97a6b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 7 Apr 2016 14:43:20 +0200 Subject: [PATCH 65/79] dataflow_cpp: support for default token count --- .../include/embb/dataflow/internal/in.h | 19 ++- .../include/embb/dataflow/internal/inputs.h | 111 +++++++++++++----- .../include/embb/dataflow/internal/node.h | 10 +- .../include/embb/dataflow/internal/process.h | 29 +++-- .../include/embb/dataflow/internal/select.h | 7 +- .../include/embb/dataflow/internal/sink.h | 35 +++--- .../include/embb/dataflow/internal/switch.h | 6 +- dataflow_cpp/include/embb/dataflow/network.h | 98 +++++++++++----- 8 files changed, 223 insertions(+), 92 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/in.h b/dataflow_cpp/include/embb/dataflow/internal/in.h index ec3d476..8e39a79 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/in.h +++ b/dataflow_cpp/include/embb/dataflow/internal/in.h @@ -74,12 +74,21 @@ class In { void SetConnected() { connected_ = true; } void SetSlices(int slices) { + if (0 < slices_) { + for (int ii = 0; ii < slices_; ii++) { + values_[ii].~SignalType(); + } + embb::base::Allocation::Free(values_); + values_ = NULL; + } slices_ = slices; - values_ = reinterpret_cast( - embb::base::Allocation::Allocate( - sizeof(SignalType)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - new (&values_[ii]) SignalType(); + if (0 < slices_) { + values_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(SignalType)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + new (&values_[ii]) SignalType(); + } } } diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 81282dd..207e2a3 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -59,6 +59,7 @@ class Inputs @@ -69,12 +70,22 @@ class Inputs , public ClockListener { public: - explicit Inputs(int slices) : count_(NULL), slices_(slices) { - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 1; + explicit Inputs() : count_(NULL), slices_(0) { + // empty + } + void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(count_); + count_ = NULL; + } + slices_ = slices; + if (0 < slices_) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 1; + } } this->template Get<0>().SetSlices(slices_); } @@ -122,12 +133,22 @@ class Inputs , public ClockListener { public: - explicit Inputs(int slices) : count_(NULL), slices_(slices) { - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 2; + explicit Inputs() : count_(NULL), slices_(0) { + // empty + } + void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(count_); + count_ = NULL; + } + slices_ = slices; + if (0 < slices_) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 2; + } } this->template Get<0>().SetSlices(slices_); this->template Get<1>().SetSlices(slices_); @@ -181,12 +202,22 @@ class Inputs , public ClockListener { public: - explicit Inputs(int slices) : count_(NULL), slices_(slices) { - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 3; + explicit Inputs() : count_(NULL), slices_(0) { + // empty + } + void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(count_); + count_ = NULL; + } + slices_ = slices; + if (0 < slices_) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 3; + } } this->template Get<0>().SetSlices(slices_); this->template Get<1>().SetSlices(slices_); @@ -245,12 +276,22 @@ class Inputs In, embb::base::internal::Nil> , public ClockListener { public: - explicit Inputs(int slices) : count_(NULL), slices_(slices) { - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 4; + explicit Inputs() : count_(NULL), slices_(0) { + // empty + } + void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(count_); + count_ = NULL; + } + slices_ = slices; + if (0 < slices_) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 4; + } } this->template Get<0>().SetSlices(slices_); this->template Get<1>().SetSlices(slices_); @@ -316,12 +357,22 @@ class Inputs In, In > , public ClockListener { public: - explicit Inputs(int slices) : count_(NULL), slices_(slices) { - count_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - count_[ii] = 5; + explicit Inputs() : count_(NULL), slices_(0) { + // empty + } + void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(count_); + count_ = NULL; + } + slices_ = slices; + if (0 < slices_) { + count_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + count_[ii] = 5; + } } this->template Get<0>().SetSlices(slices_); this->template Get<1>().SetSlices(slices_); diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index 57a8a94..8aa2805 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -49,13 +49,21 @@ class Node { EMBB_THROW(embb::base::ErrorException, "Nodes are started implicitly."); } + void SetScheduler(Scheduler * sched) { + sched_ = sched; + if (NULL != sched_) { + SetSlices(sched_->GetSlices()); + } else { + SetSlices(0); + } + } protected: Scheduler * sched_; static int next_process_id_; - void SetScheduler(Scheduler * sched) { sched_ = sched; } static int GetNextProcessID() { return next_process_id_++; } + virtual void SetSlices(int /*slices*/) {}; }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/process.h b/dataflow_cpp/include/embb/dataflow/internal/process.h index 584c948..b728d81 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/process.h +++ b/dataflow_cpp/include/embb/dataflow/internal/process.h @@ -53,11 +53,11 @@ class Process< Serial, Inputs, typedef ProcessExecutor< InputsType, OutputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - Process(int slices, Scheduler * sched, FunctionType function) - : inputs_(slices) + Process(Scheduler * sched, FunctionType function) + : inputs_() , executor_(function) , action_(NULL) - , slices_(slices) { + , slices_(0) { next_clock_ = 0; queued_clock_ = 0; bool ordered = Serial; @@ -67,12 +67,6 @@ class Process< Serial, Inputs, queue_id_ = 0; } inputs_.SetListener(this); - action_ = reinterpret_cast( - embb::base::Allocation::Allocate( - sizeof(Action)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - action_[ii] = Action(); - } SetScheduler(sched); } @@ -173,6 +167,23 @@ class Process< Serial, Inputs, embb::base::Atomic queued_clock_; int queue_id_; int slices_; + + virtual void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(action_); + action_ = NULL; + } + slices_ = slices; + inputs_.SetSlices(slices); + if (0 < slices_) { + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } + } + } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index c90758f..40d6b6f 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -44,7 +44,7 @@ class Select typedef Inputs InputsType; typedef Outputs OutputsType; - Select(int slices, Scheduler * sched) : inputs_(slices), slices_(slices) { + Select(Scheduler * sched) : inputs_(), slices_(0) { inputs_.SetListener(this); SetScheduler(sched); } @@ -119,6 +119,11 @@ class Select InputsType inputs_; OutputsType outputs_; int slices_; + + virtual void SetSlices(int slices) { + slices_ = slices; + inputs_.SetSlices(slices); + } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/sink.h b/dataflow_cpp/include/embb/dataflow/internal/sink.h index 1f59464..e690a99 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/sink.h +++ b/dataflow_cpp/include/embb/dataflow/internal/sink.h @@ -48,23 +48,17 @@ class Sink< Inputs > typedef SinkExecutor< InputsType > ExecutorType; typedef typename ExecutorType::FunctionType FunctionType; - Sink(int slices, Scheduler * sched, ClockListener * listener, + Sink(Scheduler * sched, ClockListener * listener, FunctionType function) - : inputs_(slices) + : inputs_() , executor_(function) , action_(NULL) - , slices_(slices) { + , slices_(0) { next_clock_ = 0; queued_clock_ = 0; queue_id_ = GetNextProcessID(); inputs_.SetListener(this); - action_ = reinterpret_cast( - embb::base::Allocation::Allocate( - sizeof(Action)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - action_[ii] = Action(); - } - SetListener(listener); + listener_ = listener; SetScheduler(sched); } @@ -74,10 +68,6 @@ class Sink< Inputs > } } - void SetListener(ClockListener * listener) { - listener_ = listener; - } - virtual bool HasInputs() const { return inputs_.Size() > 0; } @@ -143,6 +133,23 @@ class Sink< Inputs > embb::base::Atomic queued_clock_; int queue_id_; int slices_; + + virtual void SetSlices(int slices) { + if (0 < slices_) { + embb::base::Allocation::Free(action_); + action_ = NULL; + } + slices_ = slices; + inputs_.SetSlices(slices); + if (0 < slices_) { + action_ = reinterpret_cast( + embb::base::Allocation::Allocate( + sizeof(Action)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + action_[ii] = Action(); + } + } + } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index db02058..788685b 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -44,7 +44,7 @@ class Switch typedef Inputs InputsType; typedef Outputs OutputsType; - Switch(int slices, Scheduler * sched) : inputs_(slices) { + Switch(Scheduler * sched) : inputs_() { inputs_.SetListener(this); SetScheduler(sched); } @@ -115,6 +115,10 @@ class Switch private: InputsType inputs_; OutputsType outputs_; + + virtual void SetSlices(int slices) { + inputs_.SetSlices(slices); + } }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 53b17e0..4e77782 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -56,6 +56,14 @@ namespace dataflow { */ class Network { public: + /** + * Constructs an empty network. + * \note The number of concurrent tokens will be derived from the structure + * of the network automatically on the first call to operator () and the + * corresponding resources will be allocated then. + */ + Network() {} + /** * Constructs an empty network. * \param slices Number of concurrent tokens allowed in the network. @@ -673,6 +681,10 @@ class Network { /** * Executes the network until one of the the sources returns \c false. + * \note If the network was default constructed the number of concurrent + * tokens will be derived from the structure of the network automatically + * on the first call of the operator and the corresponding resources will + * be allocated then. */ void operator () (); }; @@ -681,22 +693,14 @@ class Network { class Network : public internal::ClockListener { public: - explicit Network(int slices = 0) - : sink_counter_(NULL), slices_(slices), sched_(NULL) { - if (0 >= slices) { - slices_ = int(embb_core_count_available())*4; - } - sched_ = embb::base::Allocation::New(slices_); - if (sched_->GetSlices() != slices_) { - slices_ = sched_->GetSlices(); - } - sink_counter_ = reinterpret_cast*>( - embb::base::Allocation::Allocate( - sizeof(embb::base::Atomic)*slices_)); - for (int ii = 0; ii < slices_; ii++) { - sink_counter_[ii] = 0; - } - sink_count_ = 0; + Network() + : sink_counter_(NULL), sink_count_(0), slices_(0), sched_(NULL) { + // empty + } + + explicit Network(int slices) + : sink_counter_(NULL), sink_count_(0), slices_(slices), sched_(NULL) { + PrepareSlices(); } ~Network() { @@ -710,24 +714,22 @@ class Network : public internal::ClockListener { } } - template - class Inputs : public internal::Inputs { - public: - explicit Inputs(int slices) - : internal::Inputs(slices) {} + class Inputs { + // empty }; - template - class Outputs : public internal::Outputs { - public: - Outputs() - : internal::Outputs() {} + class Outputs { + // empty }; template class SerialProcess; @@ -749,7 +751,7 @@ class Network : public internal::ClockListener { : internal::Process< true, internal::Inputs, internal::Outputs >( - network.slices_, network.sched_, function) { + network.sched_, function) { network.processes_.push_back(this); } }; @@ -773,7 +775,7 @@ class Network : public internal::ClockListener { : internal::Process< false, internal::Inputs, internal::Outputs >( - network.slices_, network.sched_, function) { + network.sched_, function) { network.processes_.push_back(this); } }; @@ -782,7 +784,7 @@ class Network : public internal::ClockListener { class Switch : public internal::Switch { public: explicit Switch(Network & network) - : internal::Switch(network.slices_, network.sched_) { + : internal::Switch(network.sched_) { network.processes_.push_back(this); } }; @@ -791,7 +793,7 @@ class Network : public internal::ClockListener { class Select : public internal::Select { public: explicit Select(Network & network) - : internal::Select(network.slices_, network.sched_) { + : internal::Select(network.sched_) { network.processes_.push_back(this); } }; @@ -809,7 +811,7 @@ class Network : public internal::ClockListener { explicit Sink(Network & network, FunctionType function) : internal::Sink< internal::Inputs >( - network.slices_, network.sched_, &network, function) { + network.sched_, &network, function) { network.sinks_.push_back(this); network.sink_count_++; } @@ -857,6 +859,27 @@ class Network : public internal::ClockListener { } void operator () () { + if (0 >= slices_) { + slices_ = static_cast( + sources_.size() + + sinks_.size()); + for (size_t ii = 0; ii < processes_.size(); ii++) { + int tt = processes_[ii]->IsSequential() ? 1 : + static_cast(embb_core_count_available()); + slices_ += tt; + } + PrepareSlices(); + for (size_t ii = 0; ii < sources_.size(); ii++) { + sources_[ii]->SetScheduler(sched_); + } + for (size_t ii = 0; ii < processes_.size(); ii++) { + processes_[ii]->SetScheduler(sched_); + } + for (size_t ii = 0; ii < sinks_.size(); ii++) { + sinks_[ii]->SetScheduler(sched_); + } + } + int clock = 0; while (clock >= 0) { const int idx = clock % slices_; @@ -913,6 +936,19 @@ class Network : public internal::ClockListener { } return result; } + + void PrepareSlices() { + sched_ = embb::base::Allocation::New(slices_); + if (sched_->GetSlices() != slices_) { + slices_ = sched_->GetSlices(); + } + sink_counter_ = reinterpret_cast*>( + embb::base::Allocation::Allocate( + sizeof(embb::base::Atomic)*slices_)); + for (int ii = 0; ii < slices_; ii++) { + sink_counter_[ii] = 0; + } + } }; #endif // DOXYGEN From 1e487de28840b464888f8bb4823f30c78669b04a Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 7 Apr 2016 21:22:30 +0200 Subject: [PATCH 66/79] mtapi_c: fixed bug causing mtapi_task_wait to hang when a task was cancelled before it was running --- mtapi_c/src/embb_mtapi_scheduler_t.c | 26 +++++++++++++++++++++++++- mtapi_c/src/embb_mtapi_task_t.c | 7 ++++++- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_scheduler_t.c b/mtapi_c/src/embb_mtapi_scheduler_t.c index 844321d..d7549c6 100644 --- a/mtapi_c/src/embb_mtapi_scheduler_t.c +++ b/mtapi_c/src/embb_mtapi_scheduler_t.c @@ -40,6 +40,7 @@ #include #include #include +#include /* ---- CLASS MEMBERS ------------------------------------------------------ */ @@ -293,6 +294,8 @@ int embb_mtapi_scheduler_worker(void * arg) { /* check if there was work */ if (MTAPI_NULL != task) { embb_mtapi_queue_t * local_queue = MTAPI_NULL; + embb_mtapi_group_t * local_group = MTAPI_NULL; + embb_mtapi_action_t * local_action = MTAPI_NULL; /* is task associated with a queue? */ if (embb_mtapi_queue_pool_is_handle_valid( @@ -302,6 +305,21 @@ int embb_mtapi_scheduler_worker(void * arg) { node->queue_pool, task->queue); } + /* is task associated with a group? */ + if (embb_mtapi_group_pool_is_handle_valid( + node->group_pool, task->group)) { + local_group = + embb_mtapi_group_pool_get_storage_for_handle( + node->group_pool, task->group); + } + + if (embb_mtapi_action_pool_is_handle_valid( + node->action_pool, task->action)) { + local_action = + embb_mtapi_action_pool_get_storage_for_handle( + node->action_pool, task->action); + } + switch (embb_atomic_load_int(&task->state)) { case MTAPI_TASK_SCHEDULED: /* multi-instance task, another instance might be running */ @@ -328,7 +346,7 @@ int embb_mtapi_scheduler_worker(void * arg) { break; case MTAPI_TASK_CANCELLED: - /* set return value to canceled */ + /* set return value to cancelled */ task->error_code = MTAPI_ERR_ACTION_CANCELLED; if (embb_atomic_fetch_and_add_unsigned_int( &task->instances_todo, (unsigned int)-1) == 0) { @@ -336,6 +354,12 @@ int embb_mtapi_scheduler_worker(void * arg) { if (MTAPI_NULL != local_queue) { embb_mtapi_queue_task_finished(local_queue); } + if (MTAPI_NULL != local_group) { + embb_mtapi_task_queue_push(&local_group->queue, task); + } + } + if (MTAPI_NULL != local_action) { + embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); } break; diff --git a/mtapi_c/src/embb_mtapi_task_t.c b/mtapi_c/src/embb_mtapi_task_t.c index 4323a13..9abc3ca 100644 --- a/mtapi_c/src/embb_mtapi_task_t.c +++ b/mtapi_c/src/embb_mtapi_task_t.c @@ -501,7 +501,6 @@ void mtapi_task_cancel( if (embb_mtapi_task_pool_is_handle_valid(node->task_pool, task)) { embb_mtapi_task_t* local_task = embb_mtapi_task_pool_get_storage_for_handle(node->task_pool, task); - embb_mtapi_task_set_state(local_task, MTAPI_TASK_CANCELLED); /* call plugin action cancel function */ if (embb_mtapi_action_pool_is_handle_valid( @@ -511,8 +510,14 @@ void mtapi_task_cancel( node->action_pool, local_task->action); if (local_action->is_plugin_action) { local_action->plugin_task_cancel_function(task, &local_status); + } else { + embb_mtapi_task_set_state(local_task, MTAPI_TASK_CANCELLED); + local_task->error_code = MTAPI_ERR_ACTION_CANCELLED; + local_status = MTAPI_SUCCESS; } } else { + embb_mtapi_task_set_state(local_task, MTAPI_TASK_CANCELLED); + local_task->error_code = MTAPI_ERR_ACTION_CANCELLED; local_status = MTAPI_SUCCESS; } } else { From a5832fc1ea8d19298fb1b9f16922125d1beff402 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Thu, 7 Apr 2016 21:23:02 +0200 Subject: [PATCH 67/79] mtapi_network_c: task cancellation support --- .../mtapi_network_c/src/embb_mtapi_network.c | 303 +++++++++++++----- .../test/embb_mtapi_network_test_task.cc | 112 ++++++- .../test/embb_mtapi_network_test_task.h | 3 + 3 files changed, 324 insertions(+), 94 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index 33bf0f9..83638a9 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -73,7 +73,8 @@ void embb_mtapi_network_finalize() { enum embb_mtapi_network_operation_enum { EMBB_MTAPI_NETWORK_START_TASK = 0x01AFFE01, EMBB_MTAPI_NETWORK_RETURN_RESULT = 0x02AFFE02, - EMBB_MTAPI_NETWORK_RETURN_FAILURE = 0x03AFFE03 + EMBB_MTAPI_NETWORK_RETURN_FAILURE = 0x03AFFE03, + EMBB_MTAPI_NETWORK_CANCEL_TASK = 0x04AFFE04 }; struct embb_mtapi_network_plugin_struct { @@ -115,9 +116,35 @@ struct embb_mtapi_network_task_struct { typedef struct embb_mtapi_network_task_struct embb_mtapi_network_task_t; -static void embb_mtapi_network_task_failure( - ) { +static void embb_mtapi_network_return_failure( + int32_t remote_task_id, + int32_t remote_task_tag, + mtapi_status_t status, + embb_mtapi_network_socket_t * socket, + embb_mtapi_network_buffer_t * buffer) +{ + embb_mtapi_network_buffer_clear(buffer); + + // packet size + embb_mtapi_network_buffer_push_back_int32( + buffer, 16); + + // operation + embb_mtapi_network_buffer_push_back_int32( + buffer, EMBB_MTAPI_NETWORK_RETURN_FAILURE); + + // task handle + embb_mtapi_network_buffer_push_back_int32( + buffer, remote_task_id); + embb_mtapi_network_buffer_push_back_int32( + buffer, remote_task_tag); + // status + embb_mtapi_network_buffer_push_back_int32( + buffer, (int32_t)status); + + embb_mtapi_network_socket_sendbuffer( + socket, buffer); } static void embb_mtapi_network_task_complete( @@ -144,49 +171,68 @@ static void embb_mtapi_network_task_complete( (embb_mtapi_network_task_t*)local_task->attributes.user_data; embb_mtapi_network_buffer_t * send_buf = &plugin->send_buffer; + embb_atomic_memory_barrier(); + local_task->attributes.complete_func = NULL; + embb_atomic_memory_barrier(); + // serialize sending of results embb_mutex_lock(&plugin->send_mutex); embb_mtapi_network_buffer_clear(send_buf); - // actual counts bytes actually put into the buffer - int actual = 0; - // expected counts bytes we intended to put into the buffer - int expected = - 4 + // operation - 4 + 4 + // remote task handle - 4 + // status - 4 + (int)local_task->result_size; // result buffer - - // packet size - actual += embb_mtapi_network_buffer_push_back_int32( + if (local_task->error_code == MTAPI_SUCCESS) { + // actual counts bytes actually put into the buffer + int actual = 0; + // expected counts bytes we intended to put into the buffer + int expected = + 4 + // operation + 4 + 4 + // remote task handle + 4 + // status + 4 + (int)local_task->result_size; // result buffer + + // packet size + actual += embb_mtapi_network_buffer_push_back_int32( send_buf, expected); - expected += 4; - - // operation is "return result" - actual += embb_mtapi_network_buffer_push_back_int32( - send_buf, EMBB_MTAPI_NETWORK_RETURN_RESULT); - - // remote task id - actual += embb_mtapi_network_buffer_push_back_int32( - send_buf, network_task->remote_task_id); - actual += embb_mtapi_network_buffer_push_back_int32( - send_buf, network_task->remote_task_tag); - - // status - actual += embb_mtapi_network_buffer_push_back_int32( - send_buf, local_task->error_code); - - // result size - actual += embb_mtapi_network_buffer_push_back_int32( - send_buf, (int32_t)local_task->result_size); - actual += embb_mtapi_network_buffer_push_back_rawdata( - send_buf, (int32_t)local_task->result_size, - local_task->result_buffer); - - if (expected == actual) { - int sent = embb_mtapi_network_socket_sendbuffer( + expected += 4; + + // operation is "return result" + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, EMBB_MTAPI_NETWORK_RETURN_RESULT); + + // remote task id + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, network_task->remote_task_id); + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, network_task->remote_task_tag); + + // status + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, local_task->error_code); + + // result size + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, (int32_t)local_task->result_size); + actual += embb_mtapi_network_buffer_push_back_rawdata( + send_buf, (int32_t)local_task->result_size, + local_task->result_buffer); + + if (expected == actual) { + int sent = embb_mtapi_network_socket_sendbuffer( + &network_task->socket, send_buf); + assert(sent == send_buf->size); + } + else { + embb_mtapi_network_return_failure( + network_task->remote_task_id, + network_task->remote_task_tag, + MTAPI_ERR_UNKNOWN, + &network_task->socket, send_buf); + } + } else { + embb_mtapi_network_return_failure( + network_task->remote_task_id, + network_task->remote_task_tag, + local_task->error_code, &network_task->socket, send_buf); - assert(sent == send_buf->size); } // sending done @@ -196,6 +242,14 @@ static void embb_mtapi_network_task_complete( embb_free((void*)local_task->arguments); embb_free(local_task->result_buffer); + void * data = local_task->attributes.user_data; + + embb_atomic_memory_barrier(); + local_task->attributes.user_data = NULL; + embb_atomic_memory_barrier(); + + embb_free(data); + local_status = MTAPI_SUCCESS; } } @@ -204,37 +258,6 @@ static void embb_mtapi_network_task_complete( mtapi_status_set(status, local_status); } -static void embb_mtapi_network_return_failure( - int32_t remote_task_id, - int32_t remote_task_tag, - mtapi_status_t status, - embb_mtapi_network_socket_t * socket, - embb_mtapi_network_buffer_t * buffer) -{ - embb_mtapi_network_buffer_clear(buffer); - - // packet size - embb_mtapi_network_buffer_push_back_int32( - buffer, 16); - - // operation - embb_mtapi_network_buffer_push_back_int32( - buffer, EMBB_MTAPI_NETWORK_RETURN_FAILURE); - - // task handle - embb_mtapi_network_buffer_push_back_int32( - buffer, remote_task_id); - embb_mtapi_network_buffer_push_back_int32( - buffer, remote_task_tag); - - // status - embb_mtapi_network_buffer_push_back_int32( - buffer, (int32_t)status); - - embb_mtapi_network_socket_sendbuffer( - socket, buffer); -} - static mtapi_status_t embb_mtapi_network_handle_start_task( embb_mtapi_network_socket_t * socket, embb_mtapi_network_buffer_t * buffer, @@ -365,9 +388,9 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( embb_mtapi_network_buffer_t * buffer, int packet_size) { - int task_status; - int task_id; - int task_tag; + int32_t task_status; + int32_t task_id; + int32_t task_tag; int32_t results_size; int err; @@ -447,9 +470,9 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( embb_mtapi_network_buffer_t * buffer, int packet_size) { - int task_status; - int task_id; - int task_tag; + int32_t task_status; + int32_t task_id; + int32_t task_tag; int err; mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; @@ -485,9 +508,13 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( embb_mtapi_action_pool_get_storage_for_handle( node->action_pool, local_task->action); - local_task->error_code = (mtapi_status_t)task_status; - embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); + local_task->error_code = (mtapi_status_t)task_status; + if (MTAPI_ERR_ACTION_CANCELLED == task_status) { + embb_atomic_store_int(&local_task->state, MTAPI_TASK_CANCELLED); + } else { + embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); + } /* is task associated with a group? */ if (embb_mtapi_group_pool_is_handle_valid( @@ -509,6 +536,48 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( return local_status; } +static mtapi_status_t embb_mtapi_network_handle_cancel_task( + embb_mtapi_network_buffer_t * buffer, + int packet_size) { + + mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; + int32_t remote_task_id; + int32_t remote_task_tag; + int err; + EMBB_UNUSED_IN_RELEASE(err); + + // do we have 8 bytes? + if (packet_size == 8) { + // get task handle + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &remote_task_id); + assert(err == 4); + err = embb_mtapi_network_buffer_pop_front_int32(buffer, &remote_task_tag); + assert(err == 4); + + if (embb_mtapi_node_is_initialized()) { + embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); + + // search for task to cancel + for (mtapi_uint_t ii = 0; ii < node->attributes.max_tasks; ii++) { + embb_mtapi_task_t * task = &node->task_pool->storage[ii]; + // is this our task? + if (embb_mtapi_network_task_complete == task->attributes.complete_func) { + embb_mtapi_network_task_t * network_task = + (embb_mtapi_network_task_t*)task->attributes.user_data; + // is this task the one matching the given remote task? + if (remote_task_id == network_task->remote_task_id && + remote_task_tag == network_task->remote_task_tag) { + mtapi_task_cancel(task->handle, &local_status); + break; + } + } + } + } + } + + return local_status; +} + static int embb_mtapi_network_thread(void * args) { embb_mtapi_network_plugin_t * plugin = &embb_mtapi_network_plugin; embb_mtapi_network_buffer_t * buffer = &plugin->recv_buffer; @@ -562,6 +631,9 @@ static int embb_mtapi_network_thread(void * args) { case EMBB_MTAPI_NETWORK_RETURN_FAILURE: embb_mtapi_network_handle_return_failure(buffer, packet_size); break; + case EMBB_MTAPI_NETWORK_CANCEL_TASK: + embb_mtapi_network_handle_cancel_task(buffer, packet_size); + break; default: // invalid, ignore break; @@ -785,17 +857,18 @@ static void network_task_start( // check if everything fit into the buffer if (actual == expected) { + embb_atomic_fetch_and_add_int(&local_action->num_tasks, 1); + embb_atomic_store_int(&local_task->state, MTAPI_TASK_RUNNING); int sent = embb_mtapi_network_socket_sendbuffer( &network_action->socket, send_buf); // was everything sent? if (sent == send_buf->size) { - embb_atomic_fetch_and_add_int(&local_action->num_tasks, 1); - embb_atomic_store_int(&local_task->state, MTAPI_TASK_RUNNING); // we've done it, success! mtapi_status_set(status, MTAPI_SUCCESS); } else { // could not send the whole task, this will fail on the remote side, // so we can safely assume that the task is in error + embb_atomic_fetch_and_add_int(&local_action->num_tasks, -1); embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); } } @@ -810,11 +883,73 @@ static void network_task_start( static void network_task_cancel( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { - mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; - EMBB_UNUSED(task); + // assume failure + mtapi_status_set(status, MTAPI_ERR_UNKNOWN); - mtapi_status_set(status, local_status); + if (embb_mtapi_node_is_initialized()) { + embb_mtapi_node_t * node = embb_mtapi_node_get_instance(); + + if (embb_mtapi_task_pool_is_handle_valid(node->task_pool, task)) { + embb_mtapi_task_t * local_task = + embb_mtapi_task_pool_get_storage_for_handle(node->task_pool, task); + + if (embb_mtapi_action_pool_is_handle_valid( + node->action_pool, local_task->action)) { + embb_mtapi_action_t * local_action = + embb_mtapi_action_pool_get_storage_for_handle( + node->action_pool, local_task->action); + + embb_mtapi_network_action_t * network_action = + (embb_mtapi_network_action_t*)local_action->plugin_data; + embb_mtapi_network_buffer_t * send_buf = &network_action->send_buffer; + + // serialize sending + embb_mutex_lock(&network_action->send_mutex); + embb_mtapi_network_buffer_clear(send_buf); + + // actual counts bytes actually put into the buffer + int actual = 0; + // expected counts bytes we intended to put into the buffer + int expected = + 4 + // operation + 4 + 4; // task handle + + // packet size + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, (int32_t)expected); + expected += 4; + + // operation is "cancel task" + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, EMBB_MTAPI_NETWORK_CANCEL_TASK); + + // task handle + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, (int32_t)local_task->handle.id); + actual += embb_mtapi_network_buffer_push_back_int32( + send_buf, (int32_t)local_task->handle.tag); + + // check if everything fit into the buffer + if (actual == expected) { + int sent = embb_mtapi_network_socket_sendbuffer( + &network_action->socket, send_buf); + // was everything sent? + if (sent == send_buf->size) { + // we've done it, success! + mtapi_status_set(status, MTAPI_SUCCESS); + } else { + embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); + } + } else { + embb_atomic_store_int(&local_task->state, MTAPI_TASK_ERROR); + } + + embb_mtapi_network_buffer_clear(send_buf); + embb_mutex_unlock(&network_action->send_mutex); + } + } + } } static void network_action_finalize( diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc index cec09a2..bfc27d0 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc @@ -61,13 +61,52 @@ static void test( } } +static void cancel_test( + void const * /*arguments*/, + mtapi_size_t /*arguments_size*/, + void * /*result_buffer*/, + mtapi_size_t /*result_buffer_size*/, + void const * /*node_local_data*/, + mtapi_size_t /*node_local_data_size*/, + mtapi_task_context_t * context) { + mtapi_status_t status; + while (true) { + mtapi_task_state_t state = mtapi_context_taskstate_get(context, &status); + if (status != MTAPI_SUCCESS) { + break; + } else { + if (state == MTAPI_TASK_CANCELLED) { + break; + } + } + } +} NetworkTaskTest::NetworkTaskTest() { - CreateUnit("mtapi network task test").Add(&NetworkTaskTest::TestBasic, this); + CreateUnit("mtapi network task test") + .Add(&NetworkTaskTest::TestBasic, this); } void NetworkTaskTest::TestBasic() { mtapi_status_t status; + + mtapi_initialize( + NETWORK_DOMAIN, + NETWORK_LOCAL_NODE, + MTAPI_NULL, + MTAPI_NULL, + &status); + MTAPI_CHECK_STATUS(status); + + TestSimple(); + TestCancel(); + + mtapi_finalize(&status); + MTAPI_CHECK_STATUS(status); +} + +void NetworkTaskTest::TestSimple() { + mtapi_status_t status; mtapi_job_hndl_t job; mtapi_task_hndl_t task; mtapi_action_hndl_t network_action, local_action; @@ -81,14 +120,6 @@ void NetworkTaskTest::TestBasic() { arguments[ii + kElements] = static_cast(ii); } - mtapi_initialize( - NETWORK_DOMAIN, - NETWORK_LOCAL_NODE, - MTAPI_NULL, - MTAPI_NULL, - &status); - MTAPI_CHECK_STATUS(status); - mtapi_network_plugin_initialize("127.0.0.1", 12345, 5, kElements * 4 * 3 + 32, &status); MTAPI_CHECK_STATUS(status); @@ -139,7 +170,68 @@ void NetworkTaskTest::TestBasic() { mtapi_network_plugin_finalize(&status); MTAPI_CHECK_STATUS(status); +} - mtapi_finalize(&status); +void NetworkTaskTest::TestCancel() { + mtapi_status_t status; + mtapi_job_hndl_t job; + mtapi_task_hndl_t task; + mtapi_action_hndl_t network_action, local_action; + + float argument = 1.0f; + float result; + + mtapi_network_plugin_initialize("127.0.0.1", 12345, 5, + 4 * 3 + 32, &status); + MTAPI_CHECK_STATUS(status); + + float node_remote = 1.0f; + local_action = mtapi_action_create( + NETWORK_REMOTE_JOB, + cancel_test, + &node_remote, sizeof(float), + MTAPI_DEFAULT_ACTION_ATTRIBUTES, + &status); + MTAPI_CHECK_STATUS(status); + + network_action = mtapi_network_action_create( + NETWORK_DOMAIN, + NETWORK_LOCAL_JOB, + NETWORK_REMOTE_JOB, + "127.0.0.1", 12345, + &status); + MTAPI_CHECK_STATUS(status); + + status = MTAPI_ERR_UNKNOWN; + job = mtapi_job_get(NETWORK_LOCAL_JOB, NETWORK_DOMAIN, &status); + MTAPI_CHECK_STATUS(status); + + task = mtapi_task_start( + MTAPI_TASK_ID_NONE, + job, + &argument, sizeof(float), + &result, sizeof(float), + MTAPI_DEFAULT_TASK_ATTRIBUTES, + MTAPI_GROUP_NONE, + &status); + MTAPI_CHECK_STATUS(status); + + mtapi_task_wait(task, 1, &status); + PT_ASSERT_EQ(status, MTAPI_TIMEOUT); + + mtapi_task_cancel(task, &status); + MTAPI_CHECK_STATUS(status); + + mtapi_task_wait(task, MTAPI_INFINITE, &status); + PT_ASSERT_NE(status, MTAPI_TIMEOUT); + PT_ASSERT_EQ(status, MTAPI_ERR_ACTION_CANCELLED); + + mtapi_action_delete(network_action, MTAPI_INFINITE, &status); + MTAPI_CHECK_STATUS(status); + + mtapi_action_delete(local_action, MTAPI_INFINITE, &status); + MTAPI_CHECK_STATUS(status); + + mtapi_network_plugin_finalize(&status); MTAPI_CHECK_STATUS(status); } diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.h b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.h index 8162679..aa2573d 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.h +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.h @@ -35,6 +35,9 @@ class NetworkTaskTest : public partest::TestCase { private: void TestBasic(); + + void TestSimple(); + void TestCancel(); }; #endif // MTAPI_PLUGINS_C_MTAPI_NETWORK_C_TEST_EMBB_MTAPI_NETWORK_TEST_TASK_H_ From ebdd3c1808025f9de5cbdcbb535b70b9fb3f2550 Mon Sep 17 00:00:00 2001 From: Tobias Schuele Date: Mon, 18 Apr 2016 18:17:41 +0200 Subject: [PATCH 68/79] Minor changes to documentation. --- dataflow_cpp/include/embb/dataflow/network.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index 4e77782..d4039c6 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -58,8 +58,8 @@ class Network { public: /** * Constructs an empty network. - * \note The number of concurrent tokens will be derived from the structure - * of the network automatically on the first call to operator () and the + * \note The number of concurrent tokens will automatically be derived from + * the structure of the network on the first call to operator(), and the * corresponding resources will be allocated then. */ Network() {} @@ -681,9 +681,9 @@ class Network { /** * Executes the network until one of the the sources returns \c false. - * \note If the network was default constructed the number of concurrent - * tokens will be derived from the structure of the network automatically - * on the first call of the operator and the corresponding resources will + * \note If the network was default constructed, the number of concurrent + * tokens will automatically be derived from the structure of the network + * on the first call of the operator, and the corresponding resources will * be allocated then. */ void operator () (); From ab653a94e0465dac92166f7dc3e167ce3d212f46 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Wed, 20 Apr 2016 11:41:32 +0200 Subject: [PATCH 69/79] matpi_network_c: fixed linux warnings --- mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index 83638a9..c67cc31 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -219,6 +219,7 @@ static void embb_mtapi_network_task_complete( int sent = embb_mtapi_network_socket_sendbuffer( &network_task->socket, send_buf); assert(sent == send_buf->size); + EMBB_UNUSED_IN_RELEASE(sent); } else { embb_mtapi_network_return_failure( @@ -268,6 +269,7 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( int32_t results_size; void * results; int err; + EMBB_UNUSED_IN_RELEASE(err); int32_t arguments_size; int32_t remote_task_id; @@ -394,6 +396,7 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( int32_t results_size; int err; + EMBB_UNUSED_IN_RELEASE(err); mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; if (embb_mtapi_node_is_initialized()) { @@ -475,6 +478,7 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( int32_t task_tag; int err; + EMBB_UNUSED_IN_RELEASE(err); mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; if (embb_mtapi_node_is_initialized()) { From 301d6abdb2f9afe8bb9a0631ce0ed639d59d045c Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 25 Apr 2016 11:02:22 +0200 Subject: [PATCH 70/79] dataflow_cpp: added notes to documentation --- dataflow_cpp/include/embb/dataflow/network.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dataflow_cpp/include/embb/dataflow/network.h b/dataflow_cpp/include/embb/dataflow/network.h index bb6f3ea..565ebd6 100644 --- a/dataflow_cpp/include/embb/dataflow/network.h +++ b/dataflow_cpp/include/embb/dataflow/network.h @@ -668,11 +668,15 @@ class Network { /** * Checks whether the network is completely connected and free of cycles. * \returns \c true if everything is in order, \c false if not. + * \note Executing an invalid network results in an exception. For this + * reason, it is recommended to first check the network using IsValid(). */ bool IsValid(); /** * Executes the network until one of the the sources returns \c false. + * \note Executing an invalid network results in an exception. For this + * reason, it is recommended to first check the network using IsValid(). */ void operator () (); }; From 274d6e67aa6dfcf239db007b92df9c9081161607 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 25 Apr 2016 13:21:28 +0200 Subject: [PATCH 71/79] dataflow_cpp: fixed cpplint warnings --- dataflow_cpp/include/embb/dataflow/internal/node.h | 2 +- dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h | 1 + dataflow_cpp/include/embb/dataflow/internal/select.h | 2 +- dataflow_cpp/include/embb/dataflow/internal/switch.h | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/node.h b/dataflow_cpp/include/embb/dataflow/internal/node.h index d4486b1..5c7d732 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/node.h +++ b/dataflow_cpp/include/embb/dataflow/internal/node.h @@ -64,7 +64,7 @@ class Node { static int next_process_id_; static int GetNextProcessID() { return next_process_id_++; } - virtual void SetSlices(int /*slices*/) {}; + virtual void SetSlices(int /*slices*/) {} }; } // namespace internal diff --git a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h index 0f7319d..4870767 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h +++ b/dataflow_cpp/include/embb/dataflow/internal/scheduler_mtapi.h @@ -101,6 +101,7 @@ class SchedulerMTAPI : public Scheduler { group_[slice]->WaitAll(MTAPI_INFINITE); } virtual int GetSlices() { return slices_; } + private: embb::tasks::Group ** group_; embb::tasks::Queue ** queue_; diff --git a/dataflow_cpp/include/embb/dataflow/internal/select.h b/dataflow_cpp/include/embb/dataflow/internal/select.h index ab4a1aa..b9f3485 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/select.h +++ b/dataflow_cpp/include/embb/dataflow/internal/select.h @@ -44,7 +44,7 @@ class Select typedef Inputs InputsType; typedef Outputs OutputsType; - Select(Scheduler * sched) : inputs_(), slices_(0) { + explicit Select(Scheduler * sched) : inputs_(), slices_(0) { inputs_.SetListener(this); SetScheduler(sched); } diff --git a/dataflow_cpp/include/embb/dataflow/internal/switch.h b/dataflow_cpp/include/embb/dataflow/internal/switch.h index 9abe904..e595742 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/switch.h +++ b/dataflow_cpp/include/embb/dataflow/internal/switch.h @@ -44,7 +44,7 @@ class Switch typedef Inputs InputsType; typedef Outputs OutputsType; - Switch(Scheduler * sched) : inputs_() { + explicit Switch(Scheduler * sched) : inputs_() { inputs_.SetListener(this); SetScheduler(sched); } From 0d01f4aa0b48703e880c8322713713601c021a40 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 25 Apr 2016 13:22:30 +0200 Subject: [PATCH 72/79] mtapi_network_c: fixed cpplint warnings --- .../mtapi_network_c/src/embb_mtapi_network.c | 23 ++++--------------- 1 file changed, 4 insertions(+), 19 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c index c67cc31..1be4cdc 100644 --- a/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c +++ b/mtapi_plugins_c/mtapi_network_c/src/embb_mtapi_network.c @@ -121,8 +121,7 @@ static void embb_mtapi_network_return_failure( int32_t remote_task_tag, mtapi_status_t status, embb_mtapi_network_socket_t * socket, - embb_mtapi_network_buffer_t * buffer) -{ + embb_mtapi_network_buffer_t * buffer) { embb_mtapi_network_buffer_clear(buffer); // packet size @@ -220,8 +219,7 @@ static void embb_mtapi_network_task_complete( &network_task->socket, send_buf); assert(sent == send_buf->size); EMBB_UNUSED_IN_RELEASE(sent); - } - else { + } else { embb_mtapi_network_return_failure( network_task->remote_task_id, network_task->remote_task_tag, @@ -263,7 +261,6 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( embb_mtapi_network_socket_t * socket, embb_mtapi_network_buffer_t * buffer, int packet_size) { - int32_t domain_id; int32_t job_id; int32_t results_size; @@ -284,7 +281,6 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( // check if we have at least 28 bytes if (packet_size >= 28) { - // domain id err = embb_mtapi_network_buffer_pop_front_int32(buffer, &domain_id); assert(err == 4); @@ -389,7 +385,6 @@ static mtapi_status_t embb_mtapi_network_handle_start_task( static mtapi_status_t embb_mtapi_network_handle_return_result( embb_mtapi_network_buffer_t * buffer, int packet_size) { - int32_t task_status; int32_t task_id; int32_t task_tag; @@ -405,7 +400,6 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( // do we have at least 16 bytes? if (packet_size >= 16) { - // local task id err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_id); assert(err == 4); @@ -460,9 +454,7 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( local_status = MTAPI_SUCCESS; } } - } - } } @@ -472,7 +464,6 @@ static mtapi_status_t embb_mtapi_network_handle_return_result( static mtapi_status_t embb_mtapi_network_handle_return_failure( embb_mtapi_network_buffer_t * buffer, int packet_size) { - int32_t task_status; int32_t task_id; int32_t task_tag; @@ -487,7 +478,6 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( // do we have 12 bytes? if (packet_size == 12) { - // local task id err = embb_mtapi_network_buffer_pop_front_int32(buffer, &task_id); assert(err == 4); @@ -531,9 +521,7 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( local_status = MTAPI_SUCCESS; } - } - } } @@ -543,7 +531,6 @@ static mtapi_status_t embb_mtapi_network_handle_return_failure( static mtapi_status_t embb_mtapi_network_handle_cancel_task( embb_mtapi_network_buffer_t * buffer, int packet_size) { - mtapi_status_t local_status = MTAPI_ERR_UNKNOWN; int32_t remote_task_id; int32_t remote_task_tag; @@ -565,7 +552,8 @@ static mtapi_status_t embb_mtapi_network_handle_cancel_task( for (mtapi_uint_t ii = 0; ii < node->attributes.max_tasks; ii++) { embb_mtapi_task_t * task = &node->task_pool->storage[ii]; // is this our task? - if (embb_mtapi_network_task_complete == task->attributes.complete_func) { + if (embb_mtapi_network_task_complete == + task->attributes.complete_func) { embb_mtapi_network_task_t * network_task = (embb_mtapi_network_task_t*)task->attributes.user_data; // is this task the one matching the given remote task? @@ -646,7 +634,6 @@ static int embb_mtapi_network_thread(void * args) { } embb_mtapi_network_buffer_clear(buffer); - } } @@ -785,7 +772,6 @@ void mtapi_network_plugin_finalize( static void network_task_start( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { - // assume failure mtapi_status_set(status, MTAPI_ERR_UNKNOWN); @@ -887,7 +873,6 @@ static void network_task_start( static void network_task_cancel( MTAPI_IN mtapi_task_hndl_t task, MTAPI_OUT mtapi_status_t* status) { - // assume failure mtapi_status_set(status, MTAPI_ERR_UNKNOWN); From 8e973926cf10680685fc1730deb78d6d0351db2b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 25 Apr 2016 13:25:22 +0200 Subject: [PATCH 73/79] dataflow_cpp: fixed cpplint warnings --- dataflow_cpp/include/embb/dataflow/internal/inputs.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dataflow_cpp/include/embb/dataflow/internal/inputs.h b/dataflow_cpp/include/embb/dataflow/internal/inputs.h index 102c848..813bac8 100644 --- a/dataflow_cpp/include/embb/dataflow/internal/inputs.h +++ b/dataflow_cpp/include/embb/dataflow/internal/inputs.h @@ -70,7 +70,7 @@ class Inputs , public ClockListener { public: - explicit Inputs() : count_(NULL), slices_(0) { + Inputs() : count_(NULL), slices_(0) { // empty } void SetSlices(int slices) { @@ -136,7 +136,7 @@ class Inputs , public ClockListener { public: - explicit Inputs() : count_(NULL), slices_(0) { + Inputs() : count_(NULL), slices_(0) { // empty } void SetSlices(int slices) { @@ -208,7 +208,7 @@ class Inputs , public ClockListener { public: - explicit Inputs() : count_(NULL), slices_(0) { + Inputs() : count_(NULL), slices_(0) { // empty } void SetSlices(int slices) { @@ -285,7 +285,7 @@ class Inputs In, embb::base::internal::Nil> , public ClockListener { public: - explicit Inputs() : count_(NULL), slices_(0) { + Inputs() : count_(NULL), slices_(0) { // empty } void SetSlices(int slices) { @@ -369,7 +369,7 @@ class Inputs In, In > , public ClockListener { public: - explicit Inputs() : count_(NULL), slices_(0) { + Inputs() : count_(NULL), slices_(0) { // empty } void SetSlices(int slices) { From 1fe6f342f15ee60378a984449191789af6dc62bd Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Tue, 26 Apr 2016 13:58:03 +0200 Subject: [PATCH 74/79] mtapi_network_c: fixed problem with linux, port cannot be reused immediately --- .../mtapi_network_c/test/embb_mtapi_network_test_task.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc index bfc27d0..be8c1a1 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_task.cc @@ -181,7 +181,7 @@ void NetworkTaskTest::TestCancel() { float argument = 1.0f; float result; - mtapi_network_plugin_initialize("127.0.0.1", 12345, 5, + mtapi_network_plugin_initialize("127.0.0.1", 12346, 5, 4 * 3 + 32, &status); MTAPI_CHECK_STATUS(status); @@ -198,7 +198,7 @@ void NetworkTaskTest::TestCancel() { NETWORK_DOMAIN, NETWORK_LOCAL_JOB, NETWORK_REMOTE_JOB, - "127.0.0.1", 12345, + "127.0.0.1", 12346, &status); MTAPI_CHECK_STATUS(status); From 6328800f0088f1abbf90b6ac443a90f94c991635 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 2 May 2016 13:22:32 +0200 Subject: [PATCH 75/79] mtapi_c: reuse main thread --- mtapi_c/src/embb_mtapi_thread_context_t.c | 42 ++++++++++++++++------- mtapi_c/src/embb_mtapi_thread_context_t.h | 1 + 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.c b/mtapi_c/src/embb_mtapi_thread_context_t.c index 25ac8f3..19062e1 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.c +++ b/mtapi_c/src/embb_mtapi_thread_context_t.c @@ -54,6 +54,7 @@ mtapi_boolean_t embb_mtapi_thread_context_initialize_with_node_worker_and_core( that->core_num = core_num; that->priorities = node->attributes.max_priorities; that->is_initialized = MTAPI_FALSE; + that->is_main_thread = (worker_index == 0) ? MTAPI_TRUE : MTAPI_FALSE; embb_atomic_store_int(&that->run, 0); that->queue = (embb_mtapi_task_queue_t**)embb_mtapi_alloc_allocate( @@ -121,17 +122,29 @@ mtapi_boolean_t embb_mtapi_thread_context_start( embb_core_set_add(&core_set, that->core_num); /* create thread */ - err = embb_thread_create(&that->thread, &core_set, worker_func, that); - if (EMBB_SUCCESS != err) { - embb_mtapi_log_error( - "embb_mtapi_ThreadContext_initializeWithNodeAndCoreNumber() could not " - "create thread %d on core %d\n", that->worker_index, that->core_num); - return MTAPI_FALSE; - } - - /* wait for worker to come up */ - while (0 == embb_atomic_load_int(&that->run)) { - embb_thread_yield(); + if (that->is_main_thread) { + /* reuse main thread */ + that->thread = embb_thread_current(); + err = embb_tss_create(&that->tss_id); + if (EMBB_SUCCESS != err) { + /* report error to scheduler */ + embb_atomic_store_int(&that->run, -1); + return MTAPI_FALSE; + } + embb_tss_set(&(that->tss_id), that); + embb_atomic_store_int(&that->run, 1); + } else { + err = embb_thread_create(&that->thread, &core_set, worker_func, that); + if (EMBB_SUCCESS != err) { + embb_mtapi_log_error( + "embb_mtapi_ThreadContext_initializeWithNodeAndCoreNumber() could not " + "create thread %d on core %d\n", that->worker_index, that->core_num); + return MTAPI_FALSE; + } + /* wait for worker to come up */ + while (0 == embb_atomic_load_int(&that->run)) { + embb_thread_yield(); + } } if (0 < embb_atomic_load_int(&that->run)) { @@ -146,7 +159,9 @@ void embb_mtapi_thread_context_stop(embb_mtapi_thread_context_t* that) { if (0 < embb_atomic_load_int(&that->run)) { embb_atomic_store_int(&that->run, 0); embb_condition_notify_one(&that->work_available); - embb_thread_join(&(that->thread), &result); + if (MTAPI_FALSE == that->is_main_thread) { + embb_thread_join(&(that->thread), &result); + } } } @@ -158,6 +173,9 @@ void embb_mtapi_thread_context_finalize(embb_mtapi_thread_context_t* that) { embb_mtapi_log_trace("embb_mtapi_thread_context_finalize() called\n"); if (that->is_initialized) { + if (that->is_main_thread) { + embb_tss_delete(&that->tss_id); + } embb_condition_destroy(&that->work_available); embb_mutex_destroy(&that->work_available_mutex); } diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.h b/mtapi_c/src/embb_mtapi_thread_context_t.h index 165a91e..a2ba731 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.h +++ b/mtapi_c/src/embb_mtapi_thread_context_t.h @@ -68,6 +68,7 @@ struct embb_mtapi_thread_context_struct { embb_atomic_int run; mtapi_status_t status; mtapi_boolean_t is_initialized; + mtapi_boolean_t is_main_thread; }; #include From 24fae6c42b29a5294152f2c96c2443736067bf0b Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 2 May 2016 13:31:49 +0200 Subject: [PATCH 76/79] mtapi_c: reuse of main thread configurable via node attributes --- mtapi_c/include/embb/mtapi/c/mtapi.h | 7 ++++++- mtapi_c/src/embb_mtapi_thread_context_t.c | 2 +- mtapi_c/src/mtapi_node_attributes_t.c | 6 ++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/mtapi_c/include/embb/mtapi/c/mtapi.h b/mtapi_c/include/embb/mtapi/c/mtapi.h index 0de84bb..f007db7 100644 --- a/mtapi_c/include/embb/mtapi/c/mtapi.h +++ b/mtapi_c/include/embb/mtapi/c/mtapi.h @@ -552,8 +552,9 @@ enum mtapi_node_attributes_enum { the node */ MTAPI_NODE_MAX_ACTIONS_PER_JOB, /**< maximum number of actions in a job allowed by the node */ - MTAPI_NODE_MAX_PRIORITIES /**< maximum number of priorities + MTAPI_NODE_MAX_PRIORITIES, /**< maximum number of priorities allowed by the node */ + MTAPI_NODE_REUSE_MAIN_THREAD /**< reuse main thread as worker */ }; /** size of the \a MTAPI_NODE_CORE_AFFINITY attribute */ #define MTAPI_NODE_CORE_AFFINITY_SIZE sizeof(embb_core_set_t) @@ -577,6 +578,8 @@ enum mtapi_node_attributes_enum { #define MTAPI_NODE_MAX_ACTIONS_PER_JOB_SIZE sizeof(mtapi_uint_t) /** size of the \a MTAPI_NODE_MAX_PRIORITIES attribute */ #define MTAPI_NODE_MAX_PRIORITIES_SIZE sizeof(mtapi_uint_t) +/** size of the \a MTAPI_NODE_REUSE_MAIN_THREAD attribute */ +#define MTAPI_NODE_REUSE_MAIN_THREAD_SIZE sizeof(mtapi_boolean_t) /* example attribute value */ #define MTAPI_NODE_TYPE_SMP 1 @@ -688,6 +691,8 @@ struct mtapi_node_attributes_struct { mtapi_uint_t max_actions_per_job; /**< stores MTAPI_NODE_MAX_ACTIONS_PER_JOB */ mtapi_uint_t max_priorities; /**< stores MTAPI_NODE_MAX_PRIORITIES */ + mtapi_boolean_t reuse_main_thread; /**< stores + MTAPI_NODE_REUSE_MAIN_THREAD */ }; /** diff --git a/mtapi_c/src/embb_mtapi_thread_context_t.c b/mtapi_c/src/embb_mtapi_thread_context_t.c index 19062e1..e791824 100644 --- a/mtapi_c/src/embb_mtapi_thread_context_t.c +++ b/mtapi_c/src/embb_mtapi_thread_context_t.c @@ -54,7 +54,7 @@ mtapi_boolean_t embb_mtapi_thread_context_initialize_with_node_worker_and_core( that->core_num = core_num; that->priorities = node->attributes.max_priorities; that->is_initialized = MTAPI_FALSE; - that->is_main_thread = (worker_index == 0) ? MTAPI_TRUE : MTAPI_FALSE; + that->is_main_thread = (worker_index == 0) ? node->attributes.reuse_main_thread : MTAPI_FALSE; embb_atomic_store_int(&that->run, 0); that->queue = (embb_mtapi_task_queue_t**)embb_mtapi_alloc_allocate( diff --git a/mtapi_c/src/mtapi_node_attributes_t.c b/mtapi_c/src/mtapi_node_attributes_t.c index 18ed2c5..791bc37 100644 --- a/mtapi_c/src/mtapi_node_attributes_t.c +++ b/mtapi_c/src/mtapi_node_attributes_t.c @@ -52,6 +52,7 @@ void mtapi_nodeattr_init( attributes->max_jobs = MTAPI_NODE_MAX_JOBS_DEFAULT; attributes->max_actions_per_job = MTAPI_NODE_MAX_ACTIONS_PER_JOB_DEFAULT; attributes->max_priorities = MTAPI_NODE_MAX_PRIORITIES_DEFAULT; + attributes->reuse_main_thread = MTAPI_FALSE; embb_core_set_init(&attributes->core_affinity, 1); attributes->num_cores = embb_core_set_count(&attributes->core_affinity); @@ -143,6 +144,11 @@ void mtapi_nodeattr_set( &attributes->max_priorities, attribute, attribute_size); break; + case MTAPI_NODE_REUSE_MAIN_THREAD: + local_status = embb_mtapi_attr_set_mtapi_boolean_t( + &attributes->reuse_main_thread, attribute, attribute_size); + break; + default: /* attribute unknown */ local_status = MTAPI_ERR_ATTR_NUM; From 22d7d79be1a568df23004ba741da8f3fdf866f8f Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 2 May 2016 14:33:58 +0200 Subject: [PATCH 77/79] mtapi_network_c: search for available port to avoid failing test --- .../test/embb_mtapi_network_test_socket.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc index 8d89104..6b2bf88 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc @@ -53,8 +53,12 @@ void NetworkSocketTest::TestBasic() { err = embb_mtapi_network_socket_initialize(&server_sock); PT_EXPECT(err != 0); - err = embb_mtapi_network_socket_bind_and_listen( - &server_sock, "127.0.0.1", 4711, 5); + int port = 4700; + do { + port++; + err = embb_mtapi_network_socket_bind_and_listen( + &server_sock, "127.0.0.1", port, 5); + } while(err == 0 && port < 4800); PT_EXPECT(err != 0); err = embb_mtapi_network_socket_select(&server_sock, 1, 1); @@ -62,7 +66,7 @@ void NetworkSocketTest::TestBasic() { err = embb_mtapi_network_socket_initialize(&client_sock); PT_EXPECT(err != 0); - err = embb_mtapi_network_socket_connect(&client_sock, "127.0.0.1", 4711); + err = embb_mtapi_network_socket_connect(&client_sock, "127.0.0.1", port); PT_EXPECT(err != 0); err = embb_mtapi_network_socket_select(&server_sock, 1, -1); From c8aa501bc57a94f3a55e8a112afb24171d615cb6 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 2 May 2016 14:39:28 +0200 Subject: [PATCH 78/79] mtapi_network_c: removed visual studio warning --- .../mtapi_network_c/test/embb_mtapi_network_test_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc index 6b2bf88..bea1c3f 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc @@ -53,7 +53,7 @@ void NetworkSocketTest::TestBasic() { err = embb_mtapi_network_socket_initialize(&server_sock); PT_EXPECT(err != 0); - int port = 4700; + uint16_t port = 4700; do { port++; err = embb_mtapi_network_socket_bind_and_listen( From 6dc01f7b4e3ebadcc61a4884a681d4592d2d2934 Mon Sep 17 00:00:00 2001 From: Marcus Winter Date: Mon, 2 May 2016 14:48:16 +0200 Subject: [PATCH 79/79] mtapi_network_c: removed cppcheck warning --- .../mtapi_network_c/test/embb_mtapi_network_test_socket.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc index bea1c3f..6b31bc4 100644 --- a/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc +++ b/mtapi_plugins_c/mtapi_network_c/test/embb_mtapi_network_test_socket.cc @@ -58,7 +58,7 @@ void NetworkSocketTest::TestBasic() { port++; err = embb_mtapi_network_socket_bind_and_listen( &server_sock, "127.0.0.1", port, 5); - } while(err == 0 && port < 4800); + } while (err == 0 && port < 4800); PT_EXPECT(err != 0); err = embb_mtapi_network_socket_select(&server_sock, 1, 1);