![]() |
![]() |
OpenMP Runtime
|
This file defines utility functions, types, variables and constants. More...
#include "tomp_defs.h"
#include "tomp_config.h"
#include "tomp_log.h"
#include <stdint.h>
#include <stdbool.h>
#include <ti/csl/csl_chip.h>
#include <ti/csl/csl_cache.h>
#include <ti/csl/csl_cacheAux.h>
#include <ti/csl/csl_xmc.h>
#include <ti/csl/csl_xmcAux.h>
#include <ti/csl/csl_semAux.h>
Go to the source code of this file.
Classes | |
struct | tomp_Barrier |
Represents a barrier. More... | |
Functions | |
void | tomp_completePendingTasks () |
Complete all explicit tasks generated upto the implicit/explicit barrier. | |
static uint32_t | tomp_makeAddressGlobal (uint32_t core_idx, uint32_t address) |
static void | tomp_mfence (void) |
static void | tomp_cacheWbInvAllL1d (void) |
static void | tomp_cacheWbInvAll (void) |
static void | tomp_cacheWbInv (void *blockPtr, Uint32 byteCnt) |
static void | tomp_cacheInv (void *blockPtr, Uint32 byteCnt) |
static unsigned int | tomp_decrementAtomic (volatile unsigned int *ptr) |
Atomic decrement of an integer value stored in non-cacheable memory. | |
static unsigned int | tomp_incrementAtomic (volatile unsigned int *ptr) |
Atomic increment of an integer value stored in non-cacheable memory. | |
static void | tomp_initBarrier (tomp_Barrier *barrier, unsigned int nthreads) |
Initializes tomp_Barrier. | |
static void | tomp_waitAtBarrier (tomp_Barrier *barrier) |
Wait for a certain number of threads to reach this point. | |
void | tomp_waitAtCoreBarrier (void) |
void * | tomp_allocInitTLSBlock (void) |
Create and initialize the TLS block for a thread. | |
static void | tomp_mutex_lock (unsigned int lock) |
Wrapper for acquiring a hardware semaphore. | |
static void | tomp_mutex_unlock (unsigned int lock) |
Wrapper for releasing a hardware semaphore. | |
static bool | tomp_isPtrCached (void *ptr) |
Returns true if ptr points to an object in cached memory. | |
static void | acquire_dsp_heap_lock () |
static void | release_dsp_heap_lock () |
unsigned int | __TI_get_DP (void) |
void | __TI_set_DP (unsigned int new_DP) |
This file defines utility functions, types, variables and constants.
void* tomp_allocInitTLSBlock | ( | void | ) |
Create and initialize the TLS block for a thread.
void tomp_completePendingTasks | ( | ) |
Complete all explicit tasks generated upto the implicit/explicit barrier.
From OMP Spec 3.0, p67, line 23 All threads of the team executing the binding parallel region must execute the barrier region and complete execution of all explicit tasks generated in the binding parallel region up to this point before any are allowed to continue execution beyond the barrier.
static unsigned int tomp_decrementAtomic | ( | volatile unsigned int * | ptr | ) | [inline, static] |
Atomic decrement of an integer value stored in non-cacheable memory.
ptr | pointer to location with value |
static unsigned int tomp_incrementAtomic | ( | volatile unsigned int * | ptr | ) | [inline, static] |
Atomic increment of an integer value stored in non-cacheable memory.
static void tomp_initBarrier | ( | tomp_Barrier * | barrier, |
unsigned int | nthreads | ||
) | [inline, static] |
Initializes tomp_Barrier.
barrier | pointer to barrier |
ntheads | number of threads involved in the barrier |
static void tomp_mutex_lock | ( | unsigned int | lock | ) | [inline, static] |
Wrapper for acquiring a hardware semaphore.
Cannot be nested
lock | Index to the Hardware Semaphore used |
static void tomp_mutex_unlock | ( | unsigned int | lock | ) | [inline, static] |
Wrapper for releasing a hardware semaphore.
Does an mfence before release to ensure that writes initiated in the critical section have landed.
lock | Index to the Hardware Semaphore used |
static void tomp_waitAtBarrier | ( | tomp_Barrier * | barrier | ) | [inline, static] |
Wait for a certain number of threads to reach this point.
The number of threads is specified by barrier->size.