Commit 104e7833 by Marcus Winter

documentation: added tasks_cpp and mtapi_cpp

parent 608dd611
...@@ -186,6 +186,8 @@ class CoreSet { ...@@ -186,6 +186,8 @@ class CoreSet {
/** /**
* Provides access to internal representation to use it with C API. * Provides access to internal representation to use it with C API.
*
* \return A reference to the internal embb_core_set_t structure.
*/ */
embb_core_set_t const & GetInternal() const { return rep_; } embb_core_set_t const & GetInternal() const { return rep_; }
......
...@@ -148,7 +148,8 @@ INPUT = "@CMAKE_SOURCE_DIR@/doc/reference/embb.dox" \ ...@@ -148,7 +148,8 @@ INPUT = "@CMAKE_SOURCE_DIR@/doc/reference/embb.dox" \
"@CMAKE_SOURCE_DIR@/containers_cpp/include" \ "@CMAKE_SOURCE_DIR@/containers_cpp/include" \
"@CMAKE_SOURCE_DIR@/dataflow_cpp/include" \ "@CMAKE_SOURCE_DIR@/dataflow_cpp/include" \
"@CMAKE_SOURCE_DIR@/algorithms_cpp/include" \ "@CMAKE_SOURCE_DIR@/algorithms_cpp/include" \
"@CMAKE_SOURCE_DIR@/mtapi_cpp_ext/include" \ "@CMAKE_SOURCE_DIR@/tasks_cpp/include" \
"@CMAKE_SOURCE_DIR@/mtapi_cpp/include" \
"@CMAKE_SOURCE_DIR@/base_cpp/include" \ "@CMAKE_SOURCE_DIR@/base_cpp/include" \
"@CMAKE_SOURCE_DIR@/mtapi_c/include" \ "@CMAKE_SOURCE_DIR@/mtapi_c/include" \
"@CMAKE_SOURCE_DIR@/base_c/include" "@CMAKE_SOURCE_DIR@/base_c/include"
......
...@@ -37,7 +37,7 @@ namespace mtapi { ...@@ -37,7 +37,7 @@ namespace mtapi {
/** /**
* Holds the actual worker function used to execute a Task. * Holds the actual worker function used to execute a Task.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Action { class Action {
public: public:
......
...@@ -37,7 +37,7 @@ namespace mtapi { ...@@ -37,7 +37,7 @@ namespace mtapi {
/** /**
* Contains attributes of an Action. * Contains attributes of an Action.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class ActionAttributes { class ActionAttributes {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Describes the affinity of an Action or Task to a worker thread of a Node. * Describes the affinity of an Action or Task to a worker thread of a Node.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Affinity { class Affinity {
public: public:
......
...@@ -47,7 +47,7 @@ namespace mtapi { ...@@ -47,7 +47,7 @@ namespace mtapi {
* Represents a facility to wait for multiple related * Represents a facility to wait for multiple related
* \link Task Tasks\endlink. * \link Task Tasks\endlink.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Group { class Group {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Contains attributes of a Group. * Contains attributes of a Group.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class GroupAttributes { class GroupAttributes {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Represents a collection of Actions. * Represents a collection of Actions.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Job { class Job {
public: public:
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#define EMBB_MTAPI_MTAPI_H_ #define EMBB_MTAPI_MTAPI_H_
/** /**
* \defgroup CPP_MTAPI_EXT MTAPI EXT * \defgroup CPP_MTAPI MTAPI
* C++ wrapper around C implementation of MTAPI. * C++ wrapper around C implementation of MTAPI.
* For a description of the basic concepts, see the * For a description of the basic concepts, see the
* \ref C_MTAPI "C implementation of MTAPI". * \ref C_MTAPI "C implementation of MTAPI".
......
...@@ -48,7 +48,7 @@ namespace mtapi { ...@@ -48,7 +48,7 @@ namespace mtapi {
/** /**
* A singleton representing the MTAPI runtime. * A singleton representing the MTAPI runtime.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Node { class Node {
public: public:
......
...@@ -37,7 +37,7 @@ namespace mtapi { ...@@ -37,7 +37,7 @@ namespace mtapi {
/** /**
* Contains attributes of a Node. * Contains attributes of a Node.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class NodeAttributes { class NodeAttributes {
public: public:
...@@ -69,7 +69,15 @@ public: ...@@ -69,7 +69,15 @@ public:
attributes_ = other.attributes_; attributes_ = other.attributes_;
} }
NodeAttributes & SetCoreAffinity(embb::base::CoreSet const & cores) { /**
* Sets the core affinity of the Node. This also determines the number of
* worker threads.
*
* \returns Reference to this object.
*/
NodeAttributes & SetCoreAffinity(
embb::base::CoreSet const & cores /**< The cores to use. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_CORE_AFFINITY, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_CORE_AFFINITY,
&cores.GetInternal(), sizeof(embb_core_set_t), &status); &cores.GetInternal(), sizeof(embb_core_set_t), &status);
...@@ -77,7 +85,14 @@ public: ...@@ -77,7 +85,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxTasks(mtapi_uint_t value) { /**
* Sets the maximum number of concurrently active tasks.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxTasks(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_TASKS, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_TASKS,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -85,7 +100,14 @@ public: ...@@ -85,7 +100,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxActions(mtapi_uint_t value) { /**
* Sets the maximum number of actions.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxActions(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_ACTIONS, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_ACTIONS,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -93,7 +115,14 @@ public: ...@@ -93,7 +115,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxGroups(mtapi_uint_t value) { /**
* Sets the maximum number of groups.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxGroups(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_GROUPS, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_GROUPS,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -101,7 +130,14 @@ public: ...@@ -101,7 +130,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxQueues(mtapi_uint_t value) { /**
* Sets the maximum number of queues.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxQueues(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_QUEUES, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_QUEUES,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -109,7 +145,14 @@ public: ...@@ -109,7 +145,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetQueueLimit(mtapi_uint_t value) { /**
* Sets the default limit (capacity) of all queues.
*
* \returns Reference to this object.
*/
NodeAttributes & SetQueueLimit(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_QUEUE_LIMIT, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_QUEUE_LIMIT,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -117,7 +160,14 @@ public: ...@@ -117,7 +160,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxJobs(mtapi_uint_t value) { /**
* Sets the maximum number of available jobs.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxJobs(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_JOBS, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_JOBS,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -125,7 +175,14 @@ public: ...@@ -125,7 +175,14 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxActionsPerJob(mtapi_uint_t value) { /**
* Sets the maximum number of actions per job.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxActionsPerJob(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_ACTIONS_PER_JOB, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_ACTIONS_PER_JOB,
&value, sizeof(value), &status); &value, sizeof(value), &status);
...@@ -133,7 +190,15 @@ public: ...@@ -133,7 +190,15 @@ public:
return *this; return *this;
} }
NodeAttributes & SetMaxPriorities(mtapi_uint_t value) { /**
* Sets the maximum number of available priorities. The priority values
* will range from 0 to \c value - 1 with 0 being the highest priority.
*
* \returns Reference to this object.
*/
NodeAttributes & SetMaxPriorities(
mtapi_uint_t value /**< The value to set. */
) {
mtapi_status_t status; mtapi_status_t status;
mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_PRIORITIES, mtapi_nodeattr_set(&attributes_, MTAPI_NODE_MAX_PRIORITIES,
&value, sizeof(value), &status); &value, sizeof(value), &status);
......
...@@ -47,7 +47,7 @@ namespace mtapi { ...@@ -47,7 +47,7 @@ namespace mtapi {
/** /**
* Allows for stream processing, either ordered or unordered. * Allows for stream processing, either ordered or unordered.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Queue { class Queue {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Contains attributes of a Queue. * Contains attributes of a Queue.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class QueueAttributes { class QueueAttributes {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
* Represents an MTAPI error state and is thrown by almost all mtapi_cpp * Represents an MTAPI error state and is thrown by almost all mtapi_cpp
* methods. * methods.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class StatusException : public embb::base::Exception { class StatusException : public embb::base::Exception {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* A Task represents a running Action of a specific Job. * A Task represents a running Action of a specific Job.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class Task { class Task {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Contains attributes of a Task. * Contains attributes of a Task.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class TaskAttributes { class TaskAttributes {
public: public:
......
...@@ -36,7 +36,7 @@ namespace mtapi { ...@@ -36,7 +36,7 @@ namespace mtapi {
/** /**
* Provides information about the status of the currently running Task. * Provides information about the status of the currently running Task.
* *
* \ingroup CPP_MTAPI_EXT * \ingroup CPP_MTAPI
*/ */
class TaskContext { class TaskContext {
public: public:
......
...@@ -37,7 +37,7 @@ namespace tasks { ...@@ -37,7 +37,7 @@ namespace tasks {
/** /**
* A function to be spawned as a Task. * A function to be spawned as a Task.
* *
* \ingroup CPP_MTAPI * \ingroup CPP_TASKS
*/ */
class Action { class Action {
public: public:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment