PULSAR  2.0.0
Parallel Ultra-Light Systolic Array Runtime
 All Data Structures Files Functions Typedefs Enumerations Macros Groups
prt_thread.h File Reference

PRT thread. More...

#include "prt.h"

Go to the source code of this file.

Data Structures

struct  prt_thread_s
 VSA's worker thread. Represents a single CPU core or a collection of cores. More...
 

Typedefs

typedef struct prt_thread_s prt_thread_t
 VSA's worker thread. Represents a single CPU core or a collection of cores. More...
 

Functions

prt_thread_tprt_thread_new (int rank, int core, int agent_rank)
 Creates a new thread object. More...
 
void prt_thread_delete (prt_thread_t *thread)
 Destroys a thread. More...
 
void * prt_thread_run (void *thrd)
 Implements the thread's processing cycle. If set, calls the thread warmup function. Barriers all threads. If the communication proxy is active, it participates in the barrier. Cycles through VDPs. Fires the ones that are ready. Removes the ones which burned out. Quits when the list of VDPs becomes empty. Saves the execution time. More...
 

Detailed Description

PRT thread.

Author
Jakub Kurzak

PULSAR Runtime http://icl.utk.edu/pulsar/ Copyright (C) 2012-2015 University of Tennessee.

Definition in file prt_thread.h.

Typedef Documentation

typedef struct prt_thread_s prt_thread_t

VSA's worker thread. Represents a single CPU core or a collection of cores.

"finished" is a one-directional synchronization variable. Therefore declered volatile, but no need for atomic access.

Function Documentation

void prt_thread_delete ( prt_thread_t thread)

Destroys a thread.

Parameters
thread– The thread to destroy.

Definition at line 49 of file prt_thread.c.

prt_thread_t* prt_thread_new ( int  rank,
int  core,
int  agent_rank 
)

Creates a new thread object.

Parameters
rank– The local rank of the thread.
core– The global rank of the thread.
agent_rank- The rank of the communication agent.
Returns
A new thread object.

Definition at line 23 of file prt_thread.c.

void* prt_thread_run ( void *  thrd)

Implements the thread's processing cycle. If set, calls the thread warmup function. Barriers all threads. If the communication proxy is active, it participates in the barrier. Cycles through VDPs. Fires the ones that are ready. Removes the ones which burned out. Quits when the list of VDPs becomes empty. Saves the execution time.

Parameters
thrd– The pointer to the thread object.

Definition at line 75 of file prt_thread.c.