PLASMA
2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
|
#include <stdlib.h>
#include <pthread.h>
#include "common.h"
#include "auxiliary.h"
#include "context.h"
Go to the source code of this file.
Functions | |
plasma_context_t * | plasma_context_create () |
int | plasma_context_insert (plasma_context_t *context, pthread_t thread_id) |
int | plasma_context_remove (plasma_context_t *context, pthread_t thread_id) |
plasma_context_t * | plasma_context_self () |
int | PLASMA_Enable (PLASMA_enum lever) |
int | PLASMA_Disable (PLASMA_enum lever) |
int | PLASMA_Set (PLASMA_enum param, int value) |
int | PLASMA_Get (PLASMA_enum param, int *value) |
Variables | |
plasma_context_map_t | context_map [CONTEXTS_MAX] |
pthread_mutex_t | context_map_lock = PTHREAD_MUTEX_INITIALIZER |
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 context.c.
plasma_context_t* plasma_context_create | ( | ) |
Create new context
Definition at line 36 of file context.c.
References plasma_context_struct::action, plasma_context_struct::action_condt, plasma_context_struct::action_mutex, plasma_context_struct::autotuning_enabled, context_map_lock, plasma_context_struct::dynamic_section, plasma_context_struct::errors_enabled, plasma_context_struct::householder, plasma_context_struct::ib, plasma_context_struct::ibnbsize, plasma_context_struct::nb, plasma_context_struct::nbnbsize, plasma_context_struct::parallel_func_ptr, PLASMA_ACT_STAND_BY, PLASMA_FALSE, plasma_fatal_error(), PLASMA_FLAT_HOUSEHOLDER, PLASMA_OUTOFPLACE, PLASMA_STATIC_SCHEDULING, PLASMA_TRUE, pthread_cond_init(), pthread_mutex_init(), plasma_context_struct::rhblock, plasma_context_struct::scheduling, plasma_context_struct::translation, and plasma_context_struct::warnings_enabled.
int plasma_context_insert | ( | plasma_context_t * | context, |
pthread_t | thread_id | ||
) |
Insert a (context, thread_id) tuple in the context map
Definition at line 75 of file context.c.
References plasma_context_map_struct::context, context_map_lock, CONTEXTS_MAX, PLASMA_ERR_INTERNAL_LIMIT, plasma_fatal_error(), PLASMA_SUCCESS, pthread_mutex_lock(), pthread_mutex_unlock(), and plasma_context_map_struct::thread_id.
int plasma_context_remove | ( | plasma_context_t * | context, |
pthread_t | thread_id | ||
) |
Remove a (context, thread_id) tuple from the context map
Definition at line 101 of file context.c.
References plasma_context_map_struct::context, context_map_lock, CONTEXTS_MAX, PLASMA_ERR_NOT_FOUND, PLASMA_ERR_UNEXPECTED, plasma_fatal_error(), PLASMA_SUCCESS, pthread_equal(), pthread_mutex_lock(), and pthread_mutex_unlock().
plasma_context_t* plasma_context_self | ( | void | ) |
Return context for a thread
Definition at line 134 of file context.c.
References plasma_context_map_struct::context, CONTEXTS_MAX, pthread_equal(), and pthread_self().
int PLASMA_Disable | ( | PLASMA_enum | lever | ) |
PLASMA_Disable - Disable PLASMA feature.
[in] | lever | Feature to be disabled:
|
PLASMA_SUCCESS | successful exit |
Definition at line 222 of file context.c.
References plasma_context_struct::autotuning_enabled, plasma_context_struct::errors_enabled, PLASMA_AUTOTUNING, plasma_context_self(), PLASMA_DAG, PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), PLASMA_ERRORS, PLASMA_FALSE, plasma_fatal_error(), PLASMA_SUCCESS, PLASMA_WARNINGS, plasma_context_struct::quark, QUARK_Barrier(), QUARK_DOT_DAG_Enable(), and plasma_context_struct::warnings_enabled.
int PLASMA_Enable | ( | PLASMA_enum | lever | ) |
PLASMA_Enable - Enable PLASMA feature.
[in] | lever | Feature to be enabled:
|
PLASMA_SUCCESS | successful exit |
Definition at line 169 of file context.c.
References plasma_context_struct::autotuning_enabled, plasma_context_struct::errors_enabled, PLASMA_AUTOTUNING, plasma_context_self(), PLASMA_DAG, PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), PLASMA_ERRORS, plasma_fatal_error(), PLASMA_SUCCESS, PLASMA_TRUE, PLASMA_WARNINGS, plasma_context_struct::quark, QUARK_Barrier(), QUARK_DOT_DAG_Enable(), and plasma_context_struct::warnings_enabled.
int PLASMA_Get | ( | PLASMA_enum | param, |
int * | value | ||
) |
PLASMA_Get - Get value of PLASMA parameter.
[in] | param | Feature to be enabled:
|
[out] | value | Value of the parameter. |
PLASMA_SUCCESS | successful exit |
Definition at line 391 of file context.c.
References plasma_context_struct::householder, plasma_context_struct::ib, plasma_context_struct::nb, plasma_context_self(), PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), plasma_fatal_error(), PLASMA_HOUSEHOLDER_MODE, PLASMA_HOUSEHOLDER_SIZE, PLASMA_INNER_BLOCK_SIZE, PLASMA_SCHEDULING_MODE, PLASMA_SUCCESS, PLASMA_TILE_SIZE, PLASMA_TRANSLATION_MODE, plasma_context_struct::rhblock, plasma_context_struct::scheduling, and plasma_context_struct::translation.
int PLASMA_Set | ( | PLASMA_enum | param, |
int | value | ||
) |
PLASMA_Set - Set PLASMA parameter.
[in] | param | Feature to be enabled:
|
[in] | value | Value of the parameter. |
PLASMA_SUCCESS | successful exit |
Definition at line 278 of file context.c.
References plasma_context_struct::autotuning_enabled, plasma_context_struct::householder, plasma_context_struct::ib, plasma_context_struct::ibnbsize, min, plasma_context_struct::nb, plasma_context_struct::nbnbsize, plasma_context_self(), PLASMA_DYNAMIC_SCHEDULING, PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), PLASMA_FALSE, PLASMA_FLAT_HOUSEHOLDER, PLASMA_HOUSEHOLDER_MODE, PLASMA_HOUSEHOLDER_SIZE, PLASMA_INNER_BLOCK_SIZE, PLASMA_INPLACE, PLASMA_OUTOFPLACE, PLASMA_SCHEDULING_MODE, PLASMA_STATIC_SCHEDULING, PLASMA_SUCCESS, PLASMA_TILE_SIZE, PLASMA_TRANSLATION_MODE, PLASMA_TREE_HOUSEHOLDER, plasma_warning(), plasma_context_struct::rhblock, plasma_context_struct::scheduling, and plasma_context_struct::translation.
plasma_context_map_t context_map[CONTEXTS_MAX] |
pthread_mutex_t context_map_lock = PTHREAD_MUTEX_INITIALIZER |