mini_qurt.h File Reference
#include "HalideRuntime.h"
#include "printer.h"
#include "runtime_internal.h"

Go to the source code of this file.


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


 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.


 Enables hardware L1 instruction cache prefetching. More...
 Enables hardware L1 data cache prefetching. More...
 Enables hardware L2 instruction cache prefetching. More...
 Enables hardware L2 data cache prefetching. More...
 Enables DC fetch to the provided virtual address. More...
 Creates threads in RAM/DDR. More...
 Creates threads in TCM. More...
 Backward compatibility. More...


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


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


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. More...
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

Thread attributes.

◆ qurt_mutex_t

QuRT mutex type.

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

◆ qurt_size_t

typedef unsigned int qurt_size_t

Definition at line 245 of file mini_qurt.h.

◆ qurt_mem_pool_t

typedef unsigned int qurt_mem_pool_t

Definition at line 246 of file mini_qurt.h.

Enumeration Type Documentation

◆ qurt_hvx_mode_t


HVX mode of 64 bytes.


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 

◆ qurt_thread_create()

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

◆ qurt_thread_join()

int qurt_thread_join ( unsigned int  tid,
int *  status 

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.

If the specified thread has already exited, this function returns immediately with the result value QURT_ENOTHREAD.
Two threads cannot call qurt_thread_join to wait for the same thread to finish. If this happens QuRT generates an exception.
[in]tidThread identifier.
[out]statusDestination variable for thread exit status. Returns an application-defined value indicating the termination status of the specified thread.
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)

◆ qurt_mutex_destroy()

void qurt_mutex_destroy ( qurt_mutex_t lock)

◆ qurt_mutex_lock()

void qurt_mutex_lock ( qurt_mutex_t lock)

◆ qurt_mutex_unlock()

void qurt_mutex_unlock ( qurt_mutex_t lock)

◆ qurt_cond_init()

void qurt_cond_init ( qurt_cond_t cond)

◆ qurt_cond_destroy()

void qurt_cond_destroy ( qurt_cond_t cond)

◆ qurt_cond_signal()

void qurt_cond_signal ( qurt_cond_t cond)

◆ qurt_cond_wait()

void qurt_cond_wait ( qurt_cond_t cond,
qurt_mutex_t mutex 

◆ qurt_hvx_lock()

int qurt_hvx_lock ( qurt_hvx_mode_t  lock_mode)

◆ qurt_hvx_unlock()

int qurt_hvx_unlock ( void  )

◆ qurt_hvx_get_mode()

int qurt_hvx_get_mode ( void  )