PLASMA  2.4.5
PLASMA - Parallel Linear Algebra for Scalable Multi-core Architectures
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
plasma.h File Reference
#include <complex.h>
#include <quark.h>
#include <plasma_z.h>
#include <plasma_d.h>
#include <plasma_c.h>
#include <plasma_s.h>
#include <plasma_zc.h>
#include <plasma_ds.h>
Include dependency graph for plasma.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  plasma_desc_t
struct  plasma_request_t
struct  plasma_sequence_t

Macros

#define PLASMA_VERSION_MAJOR   2
#define PLASMA_VERSION_MINOR   4
#define PLASMA_VERSION_MICRO   5
#define CBLAS_SADDR   &
#define PlasmaByte   0
#define PlasmaInteger   1
#define PlasmaRealFloat   2
#define PlasmaRealDouble   3
#define PlasmaComplexFloat   4
#define PlasmaComplexDouble   5
#define PLASMA_HAS_COMPLEX_H   1
#define PLASMA_REQUEST_INITIALIZER   {PLASMA_SUCCESS}
#define PlasmaCM   101
#define PlasmaRM   102
#define PlasmaCCRB   103
#define PlasmaCRRB   104
#define PlasmaRCRB   105
#define PlasmaRRRB   106
#define PlasmaNoTrans   111
#define PlasmaTrans   112
#define PlasmaConjTrans   113
#define PlasmaUpper   121
#define PlasmaLower   122
#define PlasmaUpperLower   123
#define PlasmaNonUnit   131
#define PlasmaUnit   132
#define PlasmaLeft   141
#define PlasmaRight   142
#define PlasmaOneNorm   171
#define PlasmaRealOneNorm   172
#define PlasmaTwoNorm   173
#define PlasmaFrobeniusNorm   174
#define PlasmaInfNorm   175
#define PlasmaRealInfNorm   176
#define PlasmaMaxNorm   177
#define PlasmaRealMaxNorm   178
#define PlasmaDistUniform   201
#define PlasmaDistSymmetric   202
#define PlasmaDistNormal   203
#define PlasmaHermGeev   241
#define PlasmaHermPoev   242
#define PlasmaNonsymPosv   243
#define PlasmaSymPosv   244
#define PlasmaNoPacking   291
#define PlasmaPackSubdiag   292
#define PlasmaPackSupdiag   293
#define PlasmaPackColumn   294
#define PlasmaPackRow   295
#define PlasmaPackLowerBand   296
#define PlasmaPackUpeprBand   297
#define PlasmaPackAll   298
#define PlasmaNoVec   301
#define PlasmaVec   302
#define PlasmaForward   391
#define PlasmaBackward   392
#define PlasmaColumnwise   401
#define PlasmaRowwise   402
#define PlasmaTrd   1001
#define PlasmaBrd   1002
#define PlasmaW   501
#define PlasmaA2   502
#define plasma_const_neg(const)   (((const-1)^0x01)+1)
#define PLASMA_FALSE   0
#define PLASMA_TRUE   1
#define PLASMA_WARNINGS   1
#define PLASMA_ERRORS   2
#define PLASMA_AUTOTUNING   3
#define PLASMA_DAG   4
#define PLASMA_CONCURRENCY   1
#define PLASMA_TILE_SIZE   2
#define PLASMA_INNER_BLOCK_SIZE   3
#define PLASMA_SCHEDULING_MODE   4
#define PLASMA_HOUSEHOLDER_MODE   5
#define PLASMA_HOUSEHOLDER_SIZE   6
#define PLASMA_TRANSLATION_MODE   7
#define PLASMA_STATIC_SCHEDULING   1
#define PLASMA_DYNAMIC_SCHEDULING   2
#define PLASMA_FLAT_HOUSEHOLDER   1
#define PLASMA_TREE_HOUSEHOLDER   2
#define PLASMA_INPLACE   1
#define PLASMA_OUTOFPLACE   2
#define PLASMA_SUCCESS   0
#define PLASMA_ERR_NOT_INITIALIZED   -101
#define PLASMA_ERR_REINITIALIZED   -102
#define PLASMA_ERR_NOT_SUPPORTED   -103
#define PLASMA_ERR_ILLEGAL_VALUE   -104
#define PLASMA_ERR_NOT_FOUND   -105
#define PLASMA_ERR_OUT_OF_RESOURCES   -106
#define PLASMA_ERR_INTERNAL_LIMIT   -107
#define PLASMA_ERR_UNALLOCATED   -108
#define PLASMA_ERR_FILESYSTEM   -109
#define PLASMA_ERR_UNEXPECTED   -110
#define PLASMA_ERR_SEQUENCE_FLUSHED   -111

Typedefs

typedef int PLASMA_enum
typedef int PLASMA_bool
typedef long PLASMA_index
typedef long PLASMA_size
typedef float _Complex PLASMA_Complex32_t
typedef double _Complex PLASMA_Complex64_t
typedef struct plasma_desc_t PLASMA_desc
typedef struct plasma_request_t PLASMA_request
typedef struct plasma_sequence_t PLASMA_sequence

Functions

int PLASMA_Version (int *ver_major, int *ver_minor, int *ver_micro)
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)
int PLASMA_Init (int cores)
int PLASMA_Init_Affinity (int cores, int *bindtab)
int PLASMA_Finalize ()
int PLASMA_Desc_Create (PLASMA_desc **desc, void *mat, PLASMA_enum dtyp, int mb, int nb, int bsiz, int lm, int ln, int i, int j, int m, int n)
int PLASMA_Desc_Destroy (PLASMA_desc **desc)
int PLASMA_Lapack_to_Tile (void *Af77, int LDA, PLASMA_desc *A)
int PLASMA_Tile_to_Lapack (PLASMA_desc *A, void *Af77, int LDA)
int PLASMA_Dealloc_Handle (void **handle)
int PLASMA_Dealloc_Handle_Tile (PLASMA_desc **desc)
int PLASMA_Sequence_Create (PLASMA_sequence **sequence)
int PLASMA_Sequence_Destroy (PLASMA_sequence *sequence)
int PLASMA_Sequence_Wait (PLASMA_sequence *sequence)
int PLASMA_Sequence_Flush (PLASMA_sequence *sequence, PLASMA_request *request)

Detailed Description

PLASMA main header PLASMA is a software package provided by Univ. of Tennessee, Univ. of California Berkeley and Univ. of Colorado Denver

Version:
2.4.5
Author:
Jakub Kurzak
Date:
2010-11-15

Definition in file plasma.h.


Macro Definition Documentation

#define CBLAS_SADDR   &

Definition at line 23 of file plasma.h.

#define PLASMA_AUTOTUNING   3

Definition at line 255 of file plasma.h.

#define PLASMA_CONCURRENCY   1

PLASMA constants - configuration parameters

Definition at line 261 of file plasma.h.

#define plasma_const_neg (   const)    (((const-1)^0x01)+1)

Definition at line 242 of file plasma.h.

#define PLASMA_DAG   4

Definition at line 256 of file plasma.h.

#define PLASMA_DYNAMIC_SCHEDULING   2

Definition at line 270 of file plasma.h.

#define PLASMA_ERR_FILESYSTEM   -109

Definition at line 290 of file plasma.h.

#define PLASMA_ERR_ILLEGAL_VALUE   -104

Definition at line 285 of file plasma.h.

#define PLASMA_ERR_INTERNAL_LIMIT   -107

Definition at line 288 of file plasma.h.

#define PLASMA_ERR_NOT_FOUND   -105

Definition at line 286 of file plasma.h.

#define PLASMA_ERR_NOT_INITIALIZED   -101

Definition at line 282 of file plasma.h.

#define PLASMA_ERR_NOT_SUPPORTED   -103

Definition at line 284 of file plasma.h.

#define PLASMA_ERR_OUT_OF_RESOURCES   -106

Definition at line 287 of file plasma.h.

#define PLASMA_ERR_REINITIALIZED   -102

Definition at line 283 of file plasma.h.

#define PLASMA_ERR_SEQUENCE_FLUSHED   -111

Definition at line 292 of file plasma.h.

#define PLASMA_ERR_UNALLOCATED   -108

Definition at line 289 of file plasma.h.

#define PLASMA_ERR_UNEXPECTED   -110

Definition at line 291 of file plasma.h.

#define PLASMA_ERRORS   2

Definition at line 254 of file plasma.h.

#define PLASMA_FALSE   0

PLASMA constants - boolean

Definition at line 247 of file plasma.h.

#define PLASMA_FLAT_HOUSEHOLDER   1

Definition at line 272 of file plasma.h.

#define PLASMA_HAS_COMPLEX_H   1

PLASMA Complex numbers

Definition at line 47 of file plasma.h.

#define PLASMA_HOUSEHOLDER_MODE   5

Definition at line 265 of file plasma.h.

#define PLASMA_HOUSEHOLDER_SIZE   6

Definition at line 266 of file plasma.h.

#define PLASMA_INNER_BLOCK_SIZE   3

Definition at line 263 of file plasma.h.

#define PLASMA_INPLACE   1

Definition at line 275 of file plasma.h.

#define PLASMA_OUTOFPLACE   2

Definition at line 276 of file plasma.h.

#define PLASMA_REQUEST_INITIALIZER   {PLASMA_SUCCESS}

Definition at line 159 of file plasma.h.

#define PLASMA_SCHEDULING_MODE   4

Definition at line 264 of file plasma.h.

#define PLASMA_STATIC_SCHEDULING   1

Definition at line 269 of file plasma.h.

#define PLASMA_SUCCESS   0

PLASMA constants - success & error codes

Definition at line 281 of file plasma.h.

#define PLASMA_TILE_SIZE   2

Definition at line 262 of file plasma.h.

#define PLASMA_TRANSLATION_MODE   7

Definition at line 267 of file plasma.h.

#define PLASMA_TREE_HOUSEHOLDER   2

Definition at line 273 of file plasma.h.

#define PLASMA_TRUE   1

Definition at line 248 of file plasma.h.

#define PLASMA_VERSION_MAJOR   2

Definition at line 17 of file plasma.h.

#define PLASMA_VERSION_MICRO   5

Definition at line 19 of file plasma.h.

#define PLASMA_VERSION_MINOR   4

Definition at line 18 of file plasma.h.

#define PLASMA_WARNINGS   1

State machine switches

Definition at line 253 of file plasma.h.

#define PlasmaA2   502

Definition at line 240 of file plasma.h.

#define PlasmaBackward   392

Definition at line 232 of file plasma.h.

#define PlasmaBrd   1002

Definition at line 237 of file plasma.h.

#define PlasmaByte   0

PLASMA constants - precisions

Definition at line 29 of file plasma.h.

#define PlasmaCCRB   103

Definition at line 182 of file plasma.h.

#define PlasmaCM   101

PLASMA constants - CBLAS & LAPACK The naming and numbering is consisten with:

1) CBLAS from Netlib (http://www.netlib.org/blas/blast-forum/cblas.tgz), 2) C Interface to LAPACK from Netlib (http://www.netlib.org/lapack/lapwrapc/).

Definition at line 180 of file plasma.h.

#define PlasmaColumnwise   401

Definition at line 234 of file plasma.h.

#define PlasmaComplexDouble   5

Definition at line 34 of file plasma.h.

#define PlasmaComplexFloat   4

Definition at line 33 of file plasma.h.

#define PlasmaConjTrans   113

Definition at line 189 of file plasma.h.

#define PlasmaCRRB   104

Definition at line 183 of file plasma.h.

#define PlasmaDistNormal   203

Definition at line 212 of file plasma.h.

#define PlasmaDistSymmetric   202

Definition at line 211 of file plasma.h.

#define PlasmaDistUniform   201

Definition at line 210 of file plasma.h.

#define PlasmaForward   391

Definition at line 231 of file plasma.h.

#define PlasmaFrobeniusNorm   174

Definition at line 204 of file plasma.h.

#define PlasmaHermGeev   241

Definition at line 214 of file plasma.h.

#define PlasmaHermPoev   242

Definition at line 215 of file plasma.h.

#define PlasmaInfNorm   175

Definition at line 205 of file plasma.h.

#define PlasmaInteger   1

Definition at line 30 of file plasma.h.

#define PlasmaLeft   141

Definition at line 198 of file plasma.h.

#define PlasmaLower   122

Definition at line 192 of file plasma.h.

#define PlasmaMaxNorm   177

Definition at line 207 of file plasma.h.

#define PlasmaNonsymPosv   243

Definition at line 216 of file plasma.h.

#define PlasmaNonUnit   131

Definition at line 195 of file plasma.h.

#define PlasmaNoPacking   291

Definition at line 219 of file plasma.h.

#define PlasmaNoTrans   111

Definition at line 187 of file plasma.h.

#define PlasmaNoVec   301

Definition at line 228 of file plasma.h.

#define PlasmaOneNorm   171

Definition at line 201 of file plasma.h.

#define PlasmaPackAll   298

Definition at line 226 of file plasma.h.

#define PlasmaPackColumn   294

Definition at line 222 of file plasma.h.

#define PlasmaPackLowerBand   296

Definition at line 224 of file plasma.h.

#define PlasmaPackRow   295

Definition at line 223 of file plasma.h.

#define PlasmaPackSubdiag   292

Definition at line 220 of file plasma.h.

#define PlasmaPackSupdiag   293

Definition at line 221 of file plasma.h.

#define PlasmaPackUpeprBand   297

Definition at line 225 of file plasma.h.

#define PlasmaRCRB   105

Definition at line 184 of file plasma.h.

#define PlasmaRealDouble   3

Definition at line 32 of file plasma.h.

#define PlasmaRealFloat   2

Definition at line 31 of file plasma.h.

#define PlasmaRealInfNorm   176

Definition at line 206 of file plasma.h.

#define PlasmaRealMaxNorm   178

Definition at line 208 of file plasma.h.

#define PlasmaRealOneNorm   172

Definition at line 202 of file plasma.h.

#define PlasmaRight   142

Definition at line 199 of file plasma.h.

#define PlasmaRM   102

Definition at line 181 of file plasma.h.

#define PlasmaRowwise   402

Definition at line 235 of file plasma.h.

#define PlasmaRRRB   106

Definition at line 185 of file plasma.h.

#define PlasmaSymPosv   244

Definition at line 217 of file plasma.h.

#define PlasmaTrans   112

Definition at line 188 of file plasma.h.

#define PlasmaTrd   1001

Definition at line 236 of file plasma.h.

#define PlasmaTwoNorm   173

Definition at line 203 of file plasma.h.

#define PlasmaUnit   132

Definition at line 196 of file plasma.h.

#define PlasmaUpper   121

Definition at line 191 of file plasma.h.

#define PlasmaUpperLower   123

Definition at line 193 of file plasma.h.

#define PlasmaVec   302

Definition at line 229 of file plasma.h.

#define PlasmaW   501

Definition at line 239 of file plasma.h.


Typedef Documentation

typedef int PLASMA_bool

Definition at line 40 of file plasma.h.

typedef float _Complex PLASMA_Complex32_t

Definition at line 76 of file plasma.h.

typedef double _Complex PLASMA_Complex64_t

Definition at line 77 of file plasma.h.

typedef struct plasma_desc_t PLASMA_desc

Tile matrix descriptor

Matrices are stored in a contiguous data chunk containning in order A11, A21, A12, A22 with :

     n1      n2
+&mdash;&mdash;&mdash;-+&mdash;+
|          |   |    With m1 = lm - (lm%mb)
|          |   |         m2 = lm%mb

m1 | A11 |A12| n1 = ln - (lnmb) | | | n2 = lnnb | | | +———-+—+ m2 | A21 |A22| +———-+—+

typedef int PLASMA_enum

PLASMA types

Definition at line 39 of file plasma.h.

typedef long PLASMA_index

Definition at line 41 of file plasma.h.


PLASMA request uniquely identifies each asynchronous function call.


PLASMA sequence uniquely identifies a set of asynchronous function calls sharing common exception handling.

typedef long PLASMA_size

Definition at line 42 of file plasma.h.


Function Documentation

int PLASMA_Dealloc_Handle ( void **  handle)

Workspace deallocation

PLASMA_Dealloc_Handle - Deallocate workspace handle allocated by any workspace allocation routine.

Parameters:
[in]handleWorkspace handle
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 194 of file workspace.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_error(), plasma_fatal_error(), and PLASMA_SUCCESS.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Dealloc_Handle", "PLASMA not initialized");
}
if (*handle == NULL) {
plasma_error("PLASMA_Dealloc_Handle", "attempting to deallocate a NULL handle");
}
free(*handle);
*handle = NULL;
}

Here is the call graph for this function:

int PLASMA_Dealloc_Handle_Tile ( PLASMA_desc **  desc)

PLASMA_Dealloc_Handle_Tile - Deallocate Tile workspace handle allocated by any tile workspace allocation routine.

Parameters:
[in]descDescriptot handle
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 229 of file workspace.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_error(), plasma_fatal_error(), and PLASMA_SUCCESS.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Dealloc_Handle_Tile", "PLASMA not initialized");
}
if (*desc == NULL) {
plasma_error("PLASMA_Dealloc_Handle_Tile", "attempting to deallocate a NULL descriptor");
}
if ((*desc)->mat == NULL) {
plasma_error("PLASMA_Dealloc_Handle_Tile", "attempting to deallocate a NULL pointer");
}
free((*desc)->mat);
free(*desc);
*desc = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Desc_Create ( PLASMA_desc **  desc,
void *  mat,
PLASMA_enum  dtyp,
int  mb,
int  nb,
int  bsiz,
int  lm,
int  ln,
int  i,
int  j,
int  m,
int  n 
)

PLASMA_Desc_Create - Create matrix descriptor.

Parameters:
[out]descOn exit, descriptor of the matrix.
[in]matMemory location of the matrix.
[in]dtypData type of the matrix:
  • PlasmaRealFloat: single precision real (S),
  • PlasmaRealDouble: double precision real (D),
  • PlasmaComplexFloat: single precision complex (C),
  • PlasmaComplexDouble: double precision complex (Z).
[in]mbNumber of rows in a tile.
[in]nbNumber of columns in a tile.
[in]bsizSize in bytes including padding.
[in]lmNumber of rows of the entire matrix.
[in]lnNumber of columns of the entire matrix.
[in]iRow index to the beginning of the submatrix.
[in]jColumn indes to the beginning of the submatrix.
[in]mNumber of rows of the submatrix.
[in]nNumber of columns of the submatrix.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 201 of file descriptor.c.

References plasma_context_self(), plasma_desc_check(), plasma_desc_init(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_OUT_OF_RESOURCES, plasma_error(), and PLASMA_SUCCESS.

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_error("PLASMA_Desc_Create", "PLASMA not initialized");
}
/* Allocate memory and initialize the descriptor */
*desc = (PLASMA_desc*)malloc(sizeof(PLASMA_desc));
if (*desc == NULL) {
plasma_error("PLASMA_Desc_Create", "malloc() failed");
}
**desc = plasma_desc_init(dtyp, mb, nb, bsiz, lm, ln, i, j, m, n);
(**desc).mat = mat;
status = plasma_desc_check(*desc);
if (status != PLASMA_SUCCESS) {
plasma_error("PLASMA_Desc_Create", "invalid descriptor");
return status;
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Desc_Destroy ( PLASMA_desc **  desc)

PLASMA_Desc_Destroy - Destroys matrix descriptor.

Parameters:
[in]descMatrix descriptor.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 245 of file descriptor.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_error(), and PLASMA_SUCCESS.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_error("PLASMA_Desc_Destroy", "PLASMA not initialized");
}
if (*desc == NULL) {
plasma_error("PLASMA_Desc_Destroy", "attempting to destroy a NULL descriptor");
}
free(*desc);
*desc = NULL;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Disable ( PLASMA_enum  lever)

PLASMA_Disable - Disable PLASMA feature.

Parameters:
[in]leverFeature to be disabled:
  • PLASMA_WARNINGS printing of warning messages,
  • PLASMA_ERRORS printing of error messages,
  • PLASMA_AUTOTUNING autotuning for tile size and inner block size,
  • PLASMA_DAG Quark automatic DAG generation.
Returns:
Return values:
PLASMA_SUCCESSsuccessful 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.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Disable", "PLASMA not initialized");
}
switch (lever)
{
break;
break;
break;
case PLASMA_DAG:
QUARK_Barrier(plasma->quark);
break;
default:
plasma_error("PLASMA_Disable", "illegal parameter value");
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Enable ( PLASMA_enum  lever)

PLASMA_Enable - Enable PLASMA feature.

Parameters:
[in]leverFeature to be enabled:
  • PLASMA_WARNINGS printing of warning messages,
  • PLASMA_ERRORS printing of error messages,
  • PLASMA_AUTOTUNING autotuning for tile size and inner block size,
  • PLASMA_DAG Quark automatic DAG generation.
Returns:
Return values:
PLASMA_SUCCESSsuccessful 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.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Enable", "PLASMA not initialized");
}
switch (lever)
{
break;
break;
break;
case PLASMA_DAG:
QUARK_Barrier(plasma->quark);
break;
default:
plasma_error("PLASMA_Enable", "illegal parameter value");
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Finalize ( )

PLASMA_Finalize - Finalize PLASMA.

Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 293 of file control.c.

References plasma_context_struct::action, plasma_context_struct::action_condt, plasma_context_struct::action_mutex, PLASMA_ACT_FINALIZE, PLASMA_ACT_STAND_BY, plasma_barrier(), plasma_barrier_finalize(), plasma_context_remove(), plasma_context_self(), plasma_dynamic_sync, PLASMA_ERR_NOT_INITIALIZED, plasma_fatal_error(), PLASMA_SUCCESS, plasma_topology_finalize(), pthread_attr_destroy(), pthread_cond_broadcast(), pthread_join(), pthread_mutex_lock(), pthread_mutex_unlock(), pthread_self(), pthread_setconcurrency(), plasma_context_struct::quark, QUARK_Free(), plasma_context_struct::thread_attr, plasma_context_struct::thread_id, and plasma_context_struct::world_size.

{
int core;
int status;
void *exitcodep;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Finalize()", "PLASMA not initialized");
}
/* Terminate the dynamic scheduler */
/* Free quark structures */
QUARK_Free(plasma->quark);
/* Set termination action */
/* Barrier and clear action */
plasma_barrier(plasma);
// Join threads
for (core = 1; core < plasma->world_size; core++) {
status = pthread_join(plasma->thread_id[core], &exitcodep);
if (status != 0) {
plasma_fatal_error("PLASMA_Finalize", "pthread_join() failed");
return status;
}
}
/* Destroy thread attributes */
status = pthread_attr_destroy(&plasma->thread_attr);
if (status != 0)
plasma_fatal_error("PLASMA_Finalize", "pthread_attr_destroy() failed");
/* Destroy topology */
status = plasma_context_remove(plasma, pthread_self());
if (status != PLASMA_SUCCESS) {
plasma_fatal_error("PLASMA_Finalize", "plasma_context_remove() failed");
return status;
}
/* Restore the concurency */
/* actually it's really bad, we shoulde set the concurrency only
* if it's not already done and restore it only we had change it */
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Get ( PLASMA_enum  param,
int *  value 
)

PLASMA_Get - Get value of PLASMA parameter.

Parameters:
[in]paramFeature to be enabled:
  • PLASMA_TILE_SIZE: size matrix tile,
  • PLASMA_INNER_BLOCK_SIZE: size of tile inner block,
  • PLASMA_SCHEDULING: type of scheduling (PLASMA_STATIC_SCHEDULING or PLASMA_DYNAMIC_SCHEDULING).
[out]valueValue of the parameter.
Returns:
Return values:
PLASMA_SUCCESSsuccessful 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.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Get", "PLASMA not initialized");
}
switch (param) {
*value = plasma->nb;
*value = plasma->ib;
*value = plasma->scheduling;
*value = plasma->householder;
*value = plasma->rhblock;
*value = plasma->translation;
default:
plasma_error("PLASMA_Get", "unknown parameter");
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Init ( int  cores)

PLASMA_Init - Initialize PLASMA.

Parameters:
[in]coresNumber of cores to use (threads to launch). If cores = 0, cores = PLASMA_NUM_THREADS if it is set, the system number of core otherwise.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 153 of file control.c.

References PLASMA_Init_Affinity().

{
return PLASMA_Init_Affinity(cores, NULL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Init_Affinity ( int  cores,
int *  coresbind 
)

PLASMA_Init_Affinity - Initialize PLASMA.

Parameters:
[in]coresNumber 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]coresbindArray 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.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 184 of file control.c.

References CONTEXT_THREADS_MAX, plasma_context_struct::group_size, plasma_barrier(), plasma_barrier_init(), plasma_context_create(), plasma_context_insert(), PLASMA_ERR_INTERNAL_LIMIT, PLASMA_ERR_NOT_FOUND, PLASMA_ERR_OUT_OF_RESOURCES, plasma_fatal_error(), plasma_get_affthreads(), plasma_get_numthreads(), plasma_get_numthreads_numa(), plasma_parallel_section(), plasma_setaffinity(), PLASMA_SUCCESS, plasma_topology_init(), plasma_warning(), pthread_attr_init(), pthread_attr_setscope(), pthread_create(), PTHREAD_SCOPE_SYSTEM, pthread_self(), pthread_setconcurrency(), plasma_context_struct::quark, QUARK_Setup(), plasma_context_struct::thread_attr, plasma_context_struct::thread_bind, plasma_context_struct::thread_id, plasma_context_struct::thread_rank, and plasma_context_struct::world_size.

{
int status;
int core;
/* Create context and insert in the context map */
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Init", "plasma_context_create() failed");
}
status = plasma_context_insert(plasma, pthread_self());
if (status != PLASMA_SUCCESS) {
plasma_fatal_error("PLASMA_Init", "plasma_context_insert() failed");
}
/* Init number of cores and topology */
/* Set number of cores */
if ( cores < 1 ) {
if ( plasma->world_size == -1 ) {
plasma->world_size = 1;
plasma_warning("PLASMA_Init", "Could not find the number of cores: the thread number is set to 1");
}
}
else
plasma->world_size = cores;
if (plasma->world_size <= 0) {
plasma_fatal_error("PLASMA_Init", "failed to get system size");
}
/* Check if not more cores than the hard limit */
plasma_fatal_error("PLASMA_Init", "not supporting so many cores");
}
/* Get the size of each NUMA node */
while ( ((plasma->world_size)%(plasma->group_size)) != 0 )
(plasma->group_size)--;
/* Initialize barrier */
/* Initialize default thread attributes */
status = pthread_attr_init(&plasma->thread_attr);
if (status != 0) {
plasma_fatal_error("PLASMA_Init", "pthread_attr_init() failed");
return status;
}
/* Set scope to system */
if (status != 0) {
plasma_fatal_error("PLASMA_Init", "pthread_attr_setscope() failed");
return status;
}
/* Set concurrency */
if (status != 0) {
plasma_fatal_error("PLASMA_Init", "pthread_setconcurrency() failed");
return status;
}
/* Launch threads */
memset(plasma->thread_id, 0, CONTEXT_THREADS_MAX*sizeof(pthread_t));
if (coresbind != NULL) {
memcpy(plasma->thread_bind, coresbind, plasma->world_size*sizeof(int));
}
else {
}
/* Assign rank and thread ID for the master */
plasma->thread_rank[0] = 0;
plasma->thread_id[0] = pthread_self();
for (core = 1; core < plasma->world_size; core++) {
plasma->thread_rank[core] = core;
&plasma->thread_id[core],
&plasma->thread_attr,
(void*)plasma);
}
/* Set thread affinity for the master */
/* Initialize the dynamic scheduler */
plasma->quark = QUARK_Setup(plasma->world_size);
plasma_barrier(plasma);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Lapack_to_Tile ( void *  Af77,
int  LDA,
PLASMA_desc A 
)

PLASMA_Lapack_to_Tile - Conversion from LAPACK layout to tile layout.

Parameters:
[in]Af77LAPACK matrix.
[in]LDAThe leading dimension of the matrix Af77.
[out]ADescriptor of the PLASMA matrix in tile layout.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 41 of file tile.c.

References A, plasma_desc_t::dtyp, plasma_context_self(), plasma_desc_check(), plasma_dynamic_sync, PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), plasma_fatal_error(), plasma_parallel_call_5, plasma_pclapack_to_tile(), plasma_pdlapack_to_tile(), plasma_pslapack_to_tile(), plasma_pzlapack_to_tile(), plasma_sequence_create(), plasma_sequence_destroy(), PLASMA_SUCCESS, PlasmaComplexDouble, PlasmaComplexFloat, PlasmaRealDouble, PlasmaRealFloat, and plasma_sequence_t::status.

{
PLASMA_desc descA = *A;
PLASMA_sequence *sequence = NULL;
PLASMA_request request;
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Lapack_to_Tile", "PLASMA not initialized");
}
/* Check descriptor for correctness */
plasma_error("PLASMA_Lapack_to_Tile", "invalid descriptor");
}
plasma_sequence_create(plasma, &sequence);
switch( A->dtyp ) {
float*, Af77,
int, LDA,
PLASMA_desc, descA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
double*, Af77,
int, LDA,
PLASMA_desc, descA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
int, LDA,
PLASMA_desc, descA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
int, LDA,
PLASMA_desc, descA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
default:
plasma_error("PLASMA_Lapack_to_Tile", "Type unknown");
}
status = sequence->status;
plasma_sequence_destroy(plasma, sequence);
return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Sequence_Create ( PLASMA_sequence **  sequence)

Sequence

PLASMA_Sequence_Create - Create a squence.

Parameters:
[out]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 93 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, plasma_fatal_error(), and plasma_sequence_create().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Create", "PLASMA not initialized");
}
status = plasma_sequence_create(plasma, sequence);
return status;
}

Here is the call graph for this function:

int PLASMA_Sequence_Destroy ( PLASMA_sequence sequence)

PLASMA_Sequence_Destroy - Destroy a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 124 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), and plasma_sequence_destroy().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Destroy", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Destroy", "NULL sequence");
}
status = plasma_sequence_destroy(plasma, sequence);
return status;
}

Here is the call graph for this function:

int PLASMA_Sequence_Flush ( PLASMA_sequence sequence,
PLASMA_request request 
)

PLASMA_Sequence_Flush - Terminate a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
[in]requestThe flush request.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 197 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_SEQUENCE_FLUSHED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), plasma_sequence_flush(), PLASMA_SUCCESS, and plasma_context_struct::quark.

{
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Flush", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Flush", "NULL sequence");
}
}

Here is the call graph for this function:

int PLASMA_Sequence_Wait ( PLASMA_sequence sequence)

PLASMA_Sequence_Wait - Wait for the completion of a sequence.

Parameters:
[in]sequenceIdentifies a set of routines sharing common exception handling.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 159 of file async.c.

References plasma_context_self(), PLASMA_ERR_NOT_INITIALIZED, PLASMA_ERR_UNALLOCATED, plasma_fatal_error(), and plasma_sequence_wait().

{
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Sequence_Wait", "PLASMA not initialized");
}
if (sequence == NULL) {
plasma_fatal_error("PLASMA_Sequence_Wait", "NULL sequence");
}
status = plasma_sequence_wait(plasma, sequence);
return status;
}

Here is the call graph for this function:

int PLASMA_Set ( PLASMA_enum  param,
int  value 
)

PLASMA_Set - Set PLASMA parameter.

Parameters:
[in]paramFeature to be enabled:
  • PLASMA_TILE_SIZE: size matrix tile,
  • PLASMA_INNER_BLOCK_SIZE: size of tile inner block,
  • PLASMA_SCHEDULING_MODE: type of scheduling (PLASMA_STATIC_SCHEDULING or PLASMA_DYNAMIC_SCHEDULING).
  • PLASMA_INNER_BANDWIDTH: matrix bandwidth size
[in]valueValue of the parameter.
Returns:
Return values:
PLASMA_SUCCESSsuccessful 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 = plasma_context_self();
if (plasma == NULL) {
plasma_error("PLASMA_Set", "PLASMA not initialized");
}
switch (param) {
if (value <= 0) {
plasma_error("PLASMA_Set", "negative tile size");
}
plasma->nb = value;
/* Calculate A, B tile size and round up to cache line size */
/* round up for the smallest type (float) - will hold for all */
plasma->nbnbsize = plasma->nb * plasma->nb; // * sizeof(float);
plasma->ibnbsize = plasma->ib * plasma->nb; // * sizeof(float);
// plasma->nbnbsize = roundup(plasma->nbnbsize, CACHE_LINE_SIZE);
// plasma->nbnbsize /= sizeof(float);
if ( plasma->autotuning_enabled ) {
plasma_warning("PLASMA_Set", "autotuning has been automatically disabled\n");
}
/* Limit ib to nb */
plasma->ib = min( plasma->nb, plasma->ib );
break;
if (value <= 0) {
plasma_error("PLASMA_Set", "negative inner block size");
}
if (value > plasma->nb) {
plasma_error("PLASMA_Set", "inner block larger than tile");
}
/* if (plasma->nb % value != 0) { */
/* plasma_error("PLASMA_Set", "inner block does not divide tile"); */
/* return PLASMA_ERR_ILLEGAL_VALUE; */
/* } */
plasma->ib = value;
/* Calculate T, L tile size and round up to cache line size */
/* round up for the smallest type (float) - will hold for all */
plasma->ibnbsize = plasma->ib * plasma->nb; // * sizeof(float);
// plasma->ibnbsize = roundup(plasma->ibnbsize, CACHE_LINE_SIZE);
// plasma->ibnbsize /= sizeof(float);
if ( plasma->autotuning_enabled ) {
plasma_warning("PLASMA_Set", "autotuning has been automatically disabled\n");
}
break;
plasma_error("PLASMA_Set", "illegal value of PLASMA_SCHEDULING_MODE");
}
plasma->scheduling = value;
break;
plasma_error("PLASMA_Set", "illegal value of PLASMA_HOUSEHOLDER_MODE");
}
plasma->householder = value;
break;
if (value <= 0) {
plasma_error("PLASMA_Set", "negative householder size");
}
plasma->rhblock = value;
break;
if (value != PLASMA_INPLACE && value != PLASMA_OUTOFPLACE) {
plasma_error("PLASMA_Set", "illegal value of PLASMA_TRANSLATION_MODE");
}
plasma->translation = value;
break;
default:
plasma_error("PLASMA_Set", "unknown parameter");
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Tile_to_Lapack ( PLASMA_desc A,
void *  Af77,
int  LDA 
)

PLASMA_Tile_to_Lapack - Conversion from tile layout to LAPACK layout.

Parameters:
[out]ADescriptor of the PLASMA matrix in tile layout.
[in]Af77LAPACK matrix.
[in]LDAThe leading dimension of the matrix Af77.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 129 of file tile.c.

References A, plasma_desc_t::dtyp, plasma_context_self(), plasma_desc_check(), plasma_dynamic_sync, PLASMA_ERR_ILLEGAL_VALUE, PLASMA_ERR_NOT_INITIALIZED, plasma_error(), plasma_fatal_error(), plasma_parallel_call_5, plasma_pctile_to_lapack(), plasma_pdtile_to_lapack(), plasma_pstile_to_lapack(), plasma_pztile_to_lapack(), plasma_sequence_create(), plasma_sequence_destroy(), PLASMA_SUCCESS, PlasmaComplexDouble, PlasmaComplexFloat, PlasmaRealDouble, PlasmaRealFloat, and plasma_sequence_t::status.

{
PLASMA_desc descA = *A;
PLASMA_sequence *sequence = NULL;
PLASMA_request request;
int status;
plasma = plasma_context_self();
if (plasma == NULL) {
plasma_fatal_error("PLASMA_Tile_to_Lapack", "PLASMA not initialized");
}
/* Check descriptor for correctness */
plasma_error("PLASMA_Tile_to_Lapack", "invalid descriptor");
}
plasma_sequence_create(plasma, &sequence);
switch( A->dtyp ) {
PLASMA_desc, descA,
float*, Af77,
int, LDA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
PLASMA_desc, descA,
double*, Af77,
int, LDA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
PLASMA_desc, descA,
int, LDA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
PLASMA_desc, descA,
int, LDA,
PLASMA_sequence*, sequence,
PLASMA_request*, &request);
break;
default:
plasma_error("PLASMA_Tile_to_Lapack", "Type unknown");
}
status = sequence->status;
plasma_sequence_destroy(plasma, sequence);
return status;
}

Here is the call graph for this function:

Here is the caller graph for this function:

int PLASMA_Version ( int *  ver_major,
int *  ver_minor,
int *  ver_micro 
)

Math function prototypes **************************************************************************** Auxiliary function prototypes

PLASMA_Version - Reports PLASMA version number.

Parameters:
[out]ver_majorPLASMA major version number.
[out]ver_minorPLASMA minor version number.
[out]ver_microPLASMA micro version number.
Returns:
Return values:
PLASMA_SUCCESSsuccessful exit

Definition at line 296 of file auxiliary.c.

References PLASMA_ERR_ILLEGAL_VALUE, PLASMA_SUCCESS, PLASMA_VERSION_MAJOR, PLASMA_VERSION_MICRO, and PLASMA_VERSION_MINOR.

{
if (! ver_major && ! ver_minor && ! ver_micro)
if (ver_major)
*ver_major = PLASMA_VERSION_MAJOR;
if (ver_minor)
*ver_minor = PLASMA_VERSION_MINOR;
if (ver_micro)
*ver_micro = PLASMA_VERSION_MICRO;
}