Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9789d867
authored
Nov 02, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_cpp: amended documentation
parent
ad762084
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
105 additions
and
10 deletions
+105
-10
mtapi_cpp/include/embb/mtapi/action.h
+14
-2
mtapi_cpp/include/embb/mtapi/group.h
+14
-2
mtapi_cpp/include/embb/mtapi/node.h
+55
-3
mtapi_cpp/include/embb/mtapi/queue.h
+14
-2
mtapi_cpp/include/embb/mtapi/task_attributes.h
+8
-1
No files found.
mtapi_cpp/include/embb/mtapi/action.h
View file @
9789d867
...
@@ -50,11 +50,23 @@ class Action {
...
@@ -50,11 +50,23 @@ class Action {
handle_
.
tag
=
0
;
handle_
.
tag
=
0
;
}
}
Action
(
Action
const
&
other
)
:
handle_
(
other
.
handle_
)
{
/**
* Copy constructs an Action.
*/
Action
(
Action
const
&
other
/**< The Action to copy. */
)
:
handle_
(
other
.
handle_
)
{
// empty
// empty
}
}
Action
&
operator
=
(
Action
const
&
other
)
{
/**
* Copies an Action.
*
* \returns Reference to this object.
*/
Action
&
operator
=
(
Action
const
&
other
/**< The Action to copy. */
)
{
handle_
=
other
.
handle_
;
handle_
=
other
.
handle_
;
return
*
this
;
return
*
this
;
}
}
...
...
mtapi_cpp/include/embb/mtapi/group.h
View file @
9789d867
...
@@ -51,11 +51,23 @@ namespace mtapi {
...
@@ -51,11 +51,23 @@ namespace mtapi {
*/
*/
class
Group
{
class
Group
{
public
:
public
:
Group
(
Group
const
&
other
)
:
handle_
(
other
.
handle_
)
{
/**
* Copy constructs a Group.
*/
Group
(
Group
const
&
other
/**< The Group to copy. */
)
:
handle_
(
other
.
handle_
)
{
// empty
// empty
}
}
Group
&
operator
=
(
Group
const
&
other
)
{
/**
* Copies a Group.
*
* \returns Reference to this object.
*/
Group
&
operator
=
(
Group
const
&
other
/**< The Group to copy. */
)
{
handle_
=
other
.
handle_
;
handle_
=
other
.
handle_
;
return
*
this
;
return
*
this
;
}
}
...
...
mtapi_cpp/include/embb/mtapi/node.h
View file @
9789d867
...
@@ -68,6 +68,9 @@ namespace mtapi {
...
@@ -68,6 +68,9 @@ namespace mtapi {
*/
*/
class
Node
{
class
Node
{
public
:
public
:
/**
* Function type for simple SMP Tasks.
*/
typedef
embb
::
base
::
Function
<
void
,
TaskContext
&>
SMPFunction
;
typedef
embb
::
base
::
Function
<
void
,
TaskContext
&>
SMPFunction
;
/**
/**
...
@@ -285,16 +288,37 @@ class Node {
...
@@ -285,16 +288,37 @@ class Node {
MTAPI_DEFAULT_TASK_ATTRIBUTES
);
MTAPI_DEFAULT_TASK_ATTRIBUTES
);
}
}
Job
GetJob
(
mtapi_job_id_t
job_id
)
{
/**
* Retrieves a handle to the Job identified by \c job_id within the domain
* of the local Node.
*
* \returns The handle to the requested Job.
* \waitfree
*/
Job
GetJob
(
mtapi_job_id_t
job_id
/**< [in] The id of the job */
)
{
return
Job
(
job_id
,
domain_id_
);
return
Job
(
job_id
,
domain_id_
);
}
}
Job
GetJob
(
mtapi_job_id_t
job_id
,
mtapi_domain_t
domain_id
)
{
/**
* Retrieves a handle to the Job identified by \c job_id and \c domain_id.
*
* \returns The handle to the requested Job.
* \waitfree
*/
Job
GetJob
(
mtapi_job_id_t
job_id
,
/**< [in] The id of the job */
mtapi_domain_t
domain_id
/**< [in] The domain id to use */
)
{
return
Job
(
job_id
,
domain_id
);
return
Job
(
job_id
,
domain_id
);
}
}
/**
/**
* Constructs an Action.
* Constructs an Action.
*
* \returns The handle to the new Action.
* \threadsafe
*/
*/
Action
CreateAction
(
Action
CreateAction
(
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
...
@@ -311,6 +335,9 @@ class Node {
...
@@ -311,6 +335,9 @@ class Node {
/**
/**
* Constructs an Action.
* Constructs an Action.
*
* \returns The handle to the new Action.
* \threadsafe
*/
*/
Action
CreateAction
(
Action
CreateAction
(
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
...
@@ -325,6 +352,9 @@ class Node {
...
@@ -325,6 +352,9 @@ class Node {
/**
/**
* Constructs an Action.
* Constructs an Action.
*
* \returns The handle to the new Action.
* \threadsafe
*/
*/
Action
CreateAction
(
Action
CreateAction
(
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
...
@@ -337,6 +367,9 @@ class Node {
...
@@ -337,6 +367,9 @@ class Node {
/**
/**
* Constructs an Action.
* Constructs an Action.
*
* \returns The handle to the new Action.
* \threadsafe
*/
*/
Action
CreateAction
(
Action
CreateAction
(
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
mtapi_job_id_t
job_id
,
/**< Job ID the Action belongs to */
...
@@ -347,6 +380,9 @@ class Node {
...
@@ -347,6 +380,9 @@ class Node {
/**
/**
* Constructs a Group object with default attributes.
* Constructs a Group object with default attributes.
*
* \returns The handle to the new Group.
* \threadsafe
*/
*/
Group
CreateGroup
()
{
Group
CreateGroup
()
{
return
Group
(
MTAPI_GROUP_ID_NONE
,
MTAPI_DEFAULT_GROUP_ATTRIBUTES
);
return
Group
(
MTAPI_GROUP_ID_NONE
,
MTAPI_DEFAULT_GROUP_ATTRIBUTES
);
...
@@ -354,6 +390,9 @@ class Node {
...
@@ -354,6 +390,9 @@ class Node {
/**
/**
* Constructs a Group object with default attributes and the given ID.
* Constructs a Group object with default attributes and the given ID.
*
* \returns The handle to the new Group.
* \threadsafe
*/
*/
Group
CreateGroup
(
Group
CreateGroup
(
mtapi_group_id_t
id
/**< A user defined ID of the Group. */
mtapi_group_id_t
id
/**< A user defined ID of the Group. */
...
@@ -363,14 +402,21 @@ class Node {
...
@@ -363,14 +402,21 @@ class Node {
/**
/**
* Constructs a Group object using the given Attributes.
* Constructs a Group object using the given Attributes.
*
* \returns The handle to the new Group.
* \threadsafe
*/
*/
Group
CreateGroup
(
Group
CreateGroup
(
GroupAttributes
const
&
group_attr
)
{
GroupAttributes
const
&
group_attr
/**< The GroupAttributes to use. */
)
{
return
Group
(
MTAPI_GROUP_ID_NONE
,
&
group_attr
.
GetInternal
());
return
Group
(
MTAPI_GROUP_ID_NONE
,
&
group_attr
.
GetInternal
());
}
}
/**
/**
* Constructs a Group object with given attributes and ID.
* Constructs a Group object with given attributes and ID.
*
* \returns The handle to the new Group.
* \threadsafe
*/
*/
Group
CreateGroup
(
Group
CreateGroup
(
mtapi_group_id_t
id
,
/**< A user defined ID of the Group. */
mtapi_group_id_t
id
,
/**< A user defined ID of the Group. */
...
@@ -381,6 +427,9 @@ class Node {
...
@@ -381,6 +427,9 @@ class Node {
/**
/**
* Constructs a Queue with the given Job and default attributes.
* Constructs a Queue with the given Job and default attributes.
*
* \returns The handle to the new Queue.
* \threadsafe
*/
*/
Queue
CreateQueue
(
Queue
CreateQueue
(
Job
&
job
/**< The Job to use for the Queue. */
Job
&
job
/**< The Job to use for the Queue. */
...
@@ -390,6 +439,9 @@ class Node {
...
@@ -390,6 +439,9 @@ class Node {
/**
/**
* Constructs a Queue with the given Job and QueueAttributes.
* Constructs a Queue with the given Job and QueueAttributes.
*
* \returns The handle to the new Queue.
* \threadsafe
*/
*/
Queue
CreateQueue
(
Queue
CreateQueue
(
Job
const
&
job
,
/**< The Job to use for the Queue. */
Job
const
&
job
,
/**< The Job to use for the Queue. */
...
...
mtapi_cpp/include/embb/mtapi/queue.h
View file @
9789d867
...
@@ -51,11 +51,23 @@ namespace mtapi {
...
@@ -51,11 +51,23 @@ namespace mtapi {
*/
*/
class
Queue
{
class
Queue
{
public
:
public
:
Queue
(
Queue
const
&
other
)
:
handle_
(
other
.
handle_
)
{
/**
* Copy constructs a Queue.
*/
Queue
(
Queue
const
&
other
/**< The Queue to copy. */
)
:
handle_
(
other
.
handle_
)
{
// empty
// empty
}
}
Queue
&
operator
=
(
Queue
const
&
other
)
{
/**
* Copies a Queue.
*
* \returns Reference to this object.
*/
Queue
&
operator
=
(
Queue
const
&
other
/**< The Queue to copy. */
)
{
handle_
=
other
.
handle_
;
handle_
=
other
.
handle_
;
return
*
this
;
return
*
this
;
}
}
...
...
mtapi_cpp/include/embb/mtapi/task_attributes.h
View file @
9789d867
...
@@ -103,8 +103,15 @@ class TaskAttributes {
...
@@ -103,8 +103,15 @@ class TaskAttributes {
return
*
this
;
return
*
this
;
}
}
/**
* Sets the ExecutionPolicy of a Task.
* The ExecutionPolicy determines the affinity and priority of a Task.
*
* \returns Reference to this object.
* \notthreadsafe
*/
TaskAttributes
&
SetPolicy
(
TaskAttributes
&
SetPolicy
(
ExecutionPolicy
const
&
policy
ExecutionPolicy
const
&
policy
/**< The ExecutionPolicy to set. */
)
{
)
{
SetPriority
(
policy
.
GetPriority
());
SetPriority
(
policy
.
GetPriority
());
SetAffinity
(
policy
.
GetAffinity
());
SetAffinity
(
policy
.
GetAffinity
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment