![]() |
![]() |
OpenMP Runtime
|
Implements (1) tasking APIs: GOMP_task, GOMP_taskwait (2) tomp_eoStartTask - the execution object for tasks. More...
#include <string.h>
#include <stdlib.h>
#include "tomp_parallel.h"
#include "tomp_log.h"
#include <c6x.h>
Defines | |
#define | ALIGN_SIZE (sizeof(long long)) |
Allocate and initialize a task argument buffer. | |
#define | ALIGN_TO_SIZE(x) (((x) + ALIGN_SIZE-1) & ~(ALIGN_SIZE-1)) |
Functions | |
void | GOMP_taskwait (void) |
Called when encountering a taskwait directive. | |
static void | tomp_taskInitArgBuffer (tomp_Task *task, void *arg, int arg_size) |
static void | tomp_taskCleanup (tomp_Task *task) |
Performs book-keeping activities on completion of task execution. | |
static void | tomp_taskFreeArgBuffer (tomp_Task *task) |
Free up memory allocated for the task argument buffer. | |
static void | tomp_taskFree (tomp_Task *task) |
Free up memory allocated for an explicit task. | |
void | GOMP_task (void(*fn)(void *), void *data, void(*cpyfn)(unsigned char *, unsigned char *), int arg_size, int arg_align, int if_clause, int flags) |
Called when encountering an explicit task directive. | |
void | tomp_eoStartTaskX (tomp_event_t eventHdl) |
Function executed by the worker cores when they pull an event from the task queue. |
Implements (1) tasking APIs: GOMP_task, GOMP_taskwait (2) tomp_eoStartTask - the execution object for tasks.
#define ALIGN_SIZE (sizeof(long long)) |
Allocate and initialize a task argument buffer.
If the arg buffer will fit in an EM buffer, allocate from EM to speed up task generation.
task | pointer to task |
data | pointer to data associated with the task |
arg_size | size of the argument buffer associated with the task |
void GOMP_task | ( | void(*)(void *) | fn, |
void * | data, | ||
void(*)(unsigned char *, unsigned char *) | cpyfn, | ||
int | arg_size, | ||
int | arg_align, | ||
int | if_clause, | ||
int | flags | ||
) |
Called when encountering an explicit task directive.
If IF_CLAUSE is false, then we must not delay in executing the task. If UNTIED is true, then the task may be executed by any member of the team.
static void tomp_taskCleanup | ( | tomp_Task * | task | ) | [static] |
Performs book-keeping activities on completion of task execution.
This function modifies shared variables - task_count and children_count. Therefore, task lock must be acquired on entry to & released on exit.
task | Pointer to a task that has completed execution. |
static void tomp_taskFree | ( | tomp_Task * | task | ) | [inline, static] |
Free up memory allocated for an explicit task.
task | pointer to a task |
static void tomp_taskFreeArgBuffer | ( | tomp_Task * | task | ) | [inline, static] |
Free up memory allocated for the task argument buffer.
task | pointer to a task |