Loading...
Searching...
No Matches
mini_qurt.h File Reference
`#include "HalideRuntime.h"`
`#include "printer.h"`
`#include "runtime_internal.h"`

Go to the source code of this file.

## Classes

struct | _qurt_thread_attr
| Thread attributes. More...
union | qurt_mutex_aligned8
| QuRT mutex type. More...
union | qurt_cond_t
| QuRT condition variable type. More...

## Namespaces

namespace | Halide
| This file defines the class FunctionDAG, which is our representation of a Halide pipeline, and contains methods to using Halide's bounds tools to query properties of it.
namespace | Halide::Runtime
namespace | Halide::Runtime::Internal
namespace | Halide::Runtime::Internal::Qurt

## Macros

#define | QURT_HTHREAD_L1I_PREFETCH 0x1
| Enables hardware L1 instruction cache prefetching.
#define | QURT_HTHREAD_L1D_PREFETCH 0x2
| Enables hardware L1 data cache prefetching.
#define | QURT_HTHREAD_L2I_PREFETCH 0x4
| Enables hardware L2 instruction cache prefetching.
#define | QURT_HTHREAD_L2D_PREFETCH 0x8
| Enables hardware L2 data cache prefetching.
#define | QURT_HTHREAD_DCFETCH 0x10
| Enables DC fetch to the provided virtual address.
#define | QURT_THREAD_ATTR_NAME_MAXLEN 16
#define | QURT_THREAD_ATTR_TCB_PARTITION_RAM 0
| Creates threads in RAM/DDR.
#define | QURT_THREAD_ATTR_TCB_PARTITION_TCM 1
| Creates threads in TCM.
#define | QURT_THREAD_ATTR_TCB_PARTITION_DEFAULT QURT_THREAD_ATTR_TCB_PARTITION_RAM
| Backward compatibility.
#define | QURT_THREAD_ATTR_PRIORITY_DEFAULT 255
#define | QURT_THREAD_ATTR_ASID_DEFAULT 0
#define | QURT_THREAD_ATTR_AFFINITY_DEFAULT (-1)
#define | QURT_THREAD_ATTR_BUS_PRIO_DEFAULT 255
#define | QURT_THREAD_ATTR_TIMETEST_ID_DEFAULT (-2)

## Typedefs

typedef unsigned int | qurt_thread_t
typedef struct _qurt_thread_attr | qurt_thread_attr_t
| Thread attributes.
typedef union qurt_mutex_aligned8 | qurt_mutex_t
| QuRT mutex type.

## Enumerations

enum | { Halide::Runtime::Internal::Qurt::QURT_EOK = 0 }
enum | qurt_hvx_mode_t { QURT_HVX_MODE_64B = 0 , QURT_HVX_MODE_128B = 1 }

## Functions

int | qurt_thread_set_priority (qurt_thread_t threadid, unsigned short newprio)
int | qurt_thread_create (qurt_thread_t *thread_id, qurt_thread_attr_t *attr, void(*entrypoint)(void *), void *arg)
int | qurt_thread_join (unsigned int tid, int *status)
| Waits for a specified thread to finish.
void | qurt_mutex_init (qurt_mutex_t *lock)
void | qurt_mutex_destroy (qurt_mutex_t *lock)
void | qurt_mutex_lock (qurt_mutex_t *lock)
void | qurt_mutex_unlock (qurt_mutex_t *lock)
void | qurt_cond_init (qurt_cond_t *cond)
void | qurt_cond_destroy (qurt_cond_t *cond)
void | qurt_cond_signal (qurt_cond_t *cond)
void | qurt_cond_wait (qurt_cond_t *cond, qurt_mutex_t *mutex)
int | qurt_hvx_lock (qurt_hvx_mode_t lock_mode)
int | qurt_hvx_unlock (void)
int | qurt_hvx_get_mode (void)

## Typedef Documentation

## qurt_thread_t

typedef unsigned int qurt_thread_t

Definition at line 18 of file mini_qurt.h.

## qurt_thread_attr_t

typedef struct _qurt_thread_attr qurt_thread_attr_t

Thread attributes.

## qurt_mutex_t

typedef union qurt_mutex_aligned8 qurt_mutex_t

QuRT mutex type.

Both non-recursive mutex lock/unlock and recursive mutex lock/unlock can be applied to this type.

## Enumeration Type Documentation

## qurt_hvx_mode_t

enum qurt_hvx_mode_t

Enumerator
QURT_HVX_MODE_64B | HVX mode of 64 bytes.
QURT_HVX_MODE_128B | HVX mode of 128 bytes.

Definition at line 236 of file mini_qurt.h.

## Function Documentation

## qurt_thread_set_priority()

int qurt_thread_set_priority | ( | qurt_thread_t | threadid,
|  | unsigned short | newprio )

extern

## qurt_thread_create()

int qurt_thread_create | ( | qurt_thread_t * | thread_id,
|  | qurt_thread_attr_t * | attr,
|  | void(* | entrypoint )(void *),
|  | void * | arg )

extern

## qurt_thread_join()

int qurt_thread_join | ( | unsigned int | tid,
|  | int * | status )

extern

Waits for a specified thread to finish.

The specified thread should be another thread within the same process. The caller thread is suspended until the specified thread exits. When this happens the caller thread is awakened.

Note
  If the specified thread has already exited, this function returns immediately with the result value QURT_ENOTHREAD.

Note
  Two threads cannot call qurt_thread_join to wait for the same thread to finish. If this happens QuRT generates an exception.

Parameters

  [in] | tid | Thread identifier.
  [out] | status | Destination variable for thread exit status. Returns an application-defined value indicating the termination status of the specified thread.

Returns
  QURT_ENOTHREAD – Thread has already exited.
  QURT_EOK – Thread successfully joined with valid status value.

## qurt_mutex_init()

void qurt_mutex_init | ( | qurt_mutex_t * | lock | ) |

extern

## qurt_mutex_destroy()

void qurt_mutex_destroy | ( | qurt_mutex_t * | lock | ) |

extern

## qurt_mutex_lock()

void qurt_mutex_lock | ( | qurt_mutex_t * | lock | ) |

extern

## qurt_mutex_unlock()

void qurt_mutex_unlock | ( | qurt_mutex_t * | lock | ) |

extern

## qurt_cond_init()

void qurt_cond_init | ( | qurt_cond_t * | cond | ) |

extern

## qurt_cond_destroy()

void qurt_cond_destroy | ( | qurt_cond_t * | cond | ) |

extern

## qurt_cond_signal()

void qurt_cond_signal | ( | qurt_cond_t * | cond | ) |

extern

## qurt_cond_wait()

void qurt_cond_wait | ( | qurt_cond_t * | cond,
|  | qurt_mutex_t * | mutex )

extern

## qurt_hvx_lock()

int qurt_hvx_lock | ( | qurt_hvx_mode_t | lock_mode | ) |

extern

## qurt_hvx_unlock()

int qurt_hvx_unlock | ( | void |  | ) |

extern

## qurt_hvx_get_mode()

int qurt_hvx_get_mode | ( | void |  | ) |

extern