![]() |
![]() |
OpenMP Runtime
|
API to access the QMSS sub-system. More...
#include <stdbool.h>
#include <stdint.h>
#include <ti/drv/qmss/qmss_drv.h>
#include "tomp_defs.h"
#include "tomp_log.h"
Go to the source code of this file.
Classes | |
struct | tomp_Queues |
Typedefs | |
typedef Qmss_QueueHnd | tomp_queue_t |
typedef void * | tomp_event_t |
Functions | |
bool | tomp_initGlobalNRT (bool memRegionInitialized) |
Initializes the NRT (QMSS sub system) for OpenMP. | |
void | tomp_exitGlobalNRT (void) |
Close queues and exit QMSS. | |
bool | tomp_initLocalNRT (void) |
Per-core initialization for QMSS. | |
tomp_queue_t | tomp_queueOpen (int32_t qid) |
Open a queue specified by qid. | |
static tomp_event_t | tomp_eventAlloc (void) |
Allocate a buffer from the TOMP free queue. | |
static tomp_event_t | tomp_eventAllocChecked (size_t size, const char *file, int line) |
Allocate a buffer from the TOMP free queue w/ NULL check. | |
static void | tomp_eventFree (tomp_event_t event) |
Free a buffer allocated from the TOMP free queue. | |
static void | tomp_eventPush (tomp_queue_t qHnd, tomp_event_t event) |
Push an event onto the tail of the specified queue. | |
static void | tomp_eventPushToHead (tomp_queue_t qHnd, tomp_event_t event) |
Push an event onto the head of the specified queue. | |
static tomp_event_t | tomp_eventPop (tomp_queue_t qHnd) |
Pop an event from the head of the specified queue. | |
static void * | tomp_event_pointer (tomp_event_t event) |
Extract the storage buffer from an event. | |
Variables | |
tomp_Queues | tomp_queues |
Qmss_MemRegInfo | tomp_qmssMemRegInfo |
API to access the QMSS sub-system.
Wraps the QMSS LLD APIs
static void* tomp_event_pointer | ( | tomp_event_t | event | ) | [inline, static] |
Extract the storage buffer from an event.
Since the OpenMP runtime does not need to initialize any fields in the descriptor, the entire descriptor is teh storage buffer
static tomp_event_t tomp_eventAlloc | ( | void | ) | [inline, static] |
Allocate a buffer from the TOMP free queue.
static tomp_event_t tomp_eventAllocChecked | ( | size_t | size, |
const char * | file, | ||
int | line | ||
) | [inline, static] |
Allocate a buffer from the TOMP free queue w/ NULL check.
size | size requested |
file | __FILE__ at call site, for error messages |
line | __LINE__ at call site, for error messages |
static void tomp_eventFree | ( | tomp_event_t | event | ) | [inline, static] |
Free a buffer allocated from the TOMP free queue.
event | Buffer to be free'd |
static tomp_event_t tomp_eventPop | ( | tomp_queue_t | qHnd | ) | [inline, static] |
Pop an event from the head of the specified queue.
qHnd | queue to pop the event from |
static void tomp_eventPush | ( | tomp_queue_t | qHnd, |
tomp_event_t | event | ||
) | [inline, static] |
Push an event onto the tail of the specified queue.
qHnd | queue to push the event onto |
event | event to be pushed |
static void tomp_eventPushToHead | ( | tomp_queue_t | qHnd, |
tomp_event_t | event | ||
) | [inline, static] |
Push an event onto the head of the specified queue.
qHnd | queue to push the event onto |
event | event to be pushed |
void tomp_exitGlobalNRT | ( | void | ) |
Close queues and exit QMSS.
Called by master core only
bool tomp_initGlobalNRT | ( | bool | memRegionInitialized | ) |
Initializes the NRT (QMSS sub system) for OpenMP.
Called by the master core only. Sets up the memory region, initializes QMSS (if required) and opens the queues required by OpenMP.
NOTE: This function must be called BEFORE tomp_dispatch_once is called on the worker cores.
tomp_queue_t tomp_queueOpen | ( | int32_t | qid | ) |
Open a queue specified by qid.
If the queue is already open, report error
Qmss_MemRegInfo tomp_qmssMemRegInfo |
Memory region used by the OpenMP Runtime
Queues used by the OpenMP Runtime