PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
|
Go to the source code of this file.
Functions | |
int | pthread_getconcurrency (void) |
int | pthread_setconcurrency (int) |
void | plasma_barrier_init (plasma_context_t *plasma) |
void | plasma_barrier (plasma_context_t *plasma) |
void * | plasma_parallel_section (void *plasma) |
int | plasma_setaffinity (int rank) |
int | plasma_unsetaffinity () |
int | plasma_yield () |
void | plasma_topology_init () |
void | plasma_topology_finalize () |
int | plasma_get_numthreads () |
int | plasma_get_numthreads_numa () |
int | plasma_get_affthreads (int *coresbind) |
int | PLASMA_Init (int cores) |
int | PLASMA_Init_Affinity (int cores, int *bindtab) |
int | PLASMA_Finalize () |
PLASMA auxiliary routines PLASMA is a software package provided by Univ. of Tennessee, Univ. of California Berkeley and Univ. of Colorado Denver
Definition in file control.h.
void plasma_barrier | ( | plasma_context_t * | plasma | ) |
Busy-waiting barrier
Definition at line 59 of file control.c.
References plasma_context_struct::barrier_id, plasma_context_struct::barrier_nblocked_thrds, plasma_context_struct::barrier_synccond, plasma_context_struct::barrier_synclock, PLASMA_RANK, PLASMA_SIZE, pthread_cond_broadcast(), pthread_cond_wait(), pthread_mutex_lock(), and pthread_mutex_unlock().
void plasma_barrier_init | ( | plasma_context_t * | plasma | ) |
Internal routines
Busy-waiting barrier initialization
Definition at line 28 of file control.c.
References plasma_context_struct::barrier_id, plasma_context_struct::barrier_nblocked_thrds, plasma_context_struct::barrier_synccond, plasma_context_struct::barrier_synclock, CONTEXT_THREADS_MAX, pthread_cond_init(), and pthread_mutex_init().
int PLASMA_Finalize | ( | ) |
PLASMA_Finalize - Finalize PLASMA.
PLASMA_SUCCESS | successful exit |
Definition at line 293 of file control.c.
int plasma_get_affthreads | ( | int * | coresbind | ) |
Definition at line 334 of file plasmaos.c.
References CONTEXT_THREADS_MAX, PLASMA_CLEANENV, plasma_error(), PLASMA_GETENV, and PLASMA_SUCCESS.
int plasma_get_numthreads | ( | ) |
Definition at line 283 of file plasmaos.c.
References PLASMA_CLEANENV, and PLASMA_GETENV.
int plasma_get_numthreads_numa | ( | ) |
Definition at line 306 of file plasmaos.c.
References PLASMA_CLEANENV, and PLASMA_GETENV.
int PLASMA_Init | ( | int | cores | ) |
User routines
PLASMA_Init - Initialize PLASMA.
[in] | cores | Number of cores to use (threads to launch). If cores = 0, cores = PLASMA_NUM_THREADS if it is set, the system number of core otherwise. |
PLASMA_SUCCESS | successful exit |
int PLASMA_Init_Affinity | ( | int | cores, |
int * | coresbind | ||
) |
PLASMA_Init_Affinity - Initialize PLASMA.
[in] | cores | Number of cores to use (threads to launch). If cores = 0, cores = PLASMA_NUM_THREADS if it is set, the system number of core otherwise. |
[in] | coresbind | Array to specify where to bind each thread. Each thread i is binded to coresbind[hwloc(i)] if hwloc is provided, or to coresbind[i] otherwise. If coresbind = NULL, coresbind = PLASMA_AFF_THREADS if it is set, the identity function otherwise. |
PLASMA_SUCCESS | successful exit |
Definition at line 184 of file control.c.
void* plasma_parallel_section | ( | void * | plasma_ptr | ) |
Main thread control
Definition at line 100 of file control.c.
References plasma_context_struct::action, plasma_context_struct::action_condt, plasma_context_struct::action_mutex, plasma_context_struct::parallel_func_ptr, PLASMA_ACT_DYNAMIC, PLASMA_ACT_FINALIZE, PLASMA_ACT_PARALLEL, PLASMA_ACT_STAND_BY, plasma_barrier(), plasma_fatal_error(), plasma_rank(), plasma_setaffinity(), pthread_cond_wait(), pthread_mutex_lock(), pthread_mutex_unlock(), plasma_context_struct::quark, QUARK_Worker_Loop(), and plasma_context_struct::thread_bind.
int plasma_setaffinity | ( | int | rank | ) |
This routine will set affinity for the calling thread that has rank 'rank'. Ranks start with 0.
If there are multiple instances of PLASMA then affinity will be wrong: all ranks 0 will be pinned to core 0.
Also, affinity is not resotred when PLASMA_Finalize() is called.
Definition at line 110 of file plasmaos.c.
References PLASMA_ERR_NOT_SUPPORTED, PLASMA_ERR_UNEXPECTED, and PLASMA_SUCCESS.
void plasma_topology_finalize | ( | ) |
Definition at line 97 of file plasmaos.c.
References plasma_unsetaffinity().
void plasma_topology_init | ( | ) |
Definition at line 61 of file plasmaos.c.
References pthread_mutex_lock(), and pthread_mutex_unlock().
int plasma_unsetaffinity | ( | ) |
int plasma_yield | ( | ) |
Definition at line 248 of file plasmaos.c.
References PLASMA_ERR_NOT_SUPPORTED.
int pthread_getconcurrency | ( | void | ) |
int pthread_setconcurrency | ( | int | ) |