OpenMP Runtime
Classes | Functions
tomp_util.h File Reference

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>
Include dependency graph for tomp_util.h:
This graph shows which files directly or indirectly include this file:

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)

Detailed Description

This file defines utility functions, types, variables and constants.


Function Documentation

void* tomp_allocInitTLSBlock ( void  )

Create and initialize the TLS block for a thread.

Returns:
Initialized TLS block

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

static unsigned int tomp_decrementAtomic ( volatile unsigned int *  ptr) [inline, static]

Atomic decrement of an integer value stored in non-cacheable memory.

Parameters:
ptrpointer to location with value

Here is the caller graph for this function:

static unsigned int tomp_incrementAtomic ( volatile unsigned int *  ptr) [inline, static]

Atomic increment of an integer value stored in non-cacheable memory.

Returns:
Value after the increment
static void tomp_initBarrier ( tomp_Barrier barrier,
unsigned int  nthreads 
) [inline, static]

Initializes tomp_Barrier.

Parameters:
barrierpointer to barrier
ntheadsnumber of threads involved in the barrier

Here is the caller graph for this function:

static void tomp_mutex_lock ( unsigned int  lock) [inline, static]

Wrapper for acquiring a hardware semaphore.

Cannot be nested

Parameters:
lockIndex to the Hardware Semaphore used

Here is the caller graph for this function:

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.

Parameters:
lockIndex to the Hardware Semaphore used

Here is the caller graph for this function:

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.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Classes Files Functions Variables Typedefs Enumerations Defines