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
common.h File Reference
#include "global.h"
#include "context.h"
#include "control.h"
#include "core_blas.h"
#include "core_blas_dag.h"
#include "allocate.h"
#include "auxiliary.h"
#include "descriptor.h"
#include "tile.h"
#include "async.h"
#include <unistd.h>
#include "compute_s.h"
#include "compute_d.h"
#include "compute_c.h"
#include "compute_z.h"
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PLASMA_RANK   plasma_rank(plasma)
#define PLASMA_SIZE   plasma->world_size
#define PLASMA_GRPSIZE   plasma->group_size
#define PLASMA_NB   plasma->nb
#define PLASMA_IB   plasma->ib
#define PLASMA_NBNBSIZE   plasma->nbnbsize
#define PLASMA_IBNBSIZE   plasma->ibnbsize
#define PLASMA_SCHEDULING   plasma->scheduling
#define PLASMA_RHBLK   plasma->rhblock
#define PLASMA_TRANSLATION   plasma->translation
#define PlasmaIPT_NoDep   0
#define PlasmaIPT_Panel   1
#define PlasmaIPT_All   2
#define max(a, b)   ((a) > (b) ? (a) : (b))
#define min(a, b)   ((a) < (b) ? (a) : (b))
#define roundup(a, b)   (b <= 0) ? (a) : (((a) + (b)-1) & ~((b)-1))
#define ss_init(m, n, init_val)
#define ss_abort()   plasma->ss_abort = 1;
#define ss_aborted()   plasma->ss_abort
#define ss_cond_set(m, n, val)
#define ss_cond_wait(m, n, val)
#define ss_finalize()
#define COMPLEX

Functions

void plasma_pdlag2s (plasma_context_t *plasma)
void plasma_pzlag2c (plasma_context_t *plasma)
void plasma_pslag2d (plasma_context_t *plasma)
void plasma_pclag2z (plasma_context_t *plasma)

Variables

char * plasma_lapack_constants []

Detailed Description

PLASMA auxiliary routines 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
Mathieu Faverge
Date:
2010-11-15

Definition in file common.h.


Macro Definition Documentation

#define COMPLEX

Definition at line 156 of file common.h.

#define max (   a,
 
)    ((a) > (b) ? (a) : (b))

Global utilities

Definition at line 98 of file common.h.

#define min (   a,
 
)    ((a) < (b) ? (a) : (b))

Definition at line 101 of file common.h.

#define PLASMA_GRPSIZE   plasma->group_size

Definition at line 78 of file common.h.

#define PLASMA_IB   plasma->ib

Definition at line 80 of file common.h.

#define PLASMA_IBNBSIZE   plasma->ibnbsize

Definition at line 82 of file common.h.

#define PLASMA_NB   plasma->nb

Definition at line 79 of file common.h.

#define PLASMA_NBNBSIZE   plasma->nbnbsize

Definition at line 81 of file common.h.

#define PLASMA_RANK   plasma_rank(plasma)

PLASMA facilities of interest to both PLASMA core developer and also of interest to PLASMA community contributor. **************************************************************************** Determine if weak symbol are allowed **************************************************************************** Determine FORTRAN names Global shortcuts

Definition at line 76 of file common.h.

#define PLASMA_RHBLK   plasma->rhblock

Definition at line 84 of file common.h.

#define PLASMA_SCHEDULING   plasma->scheduling

Definition at line 83 of file common.h.

#define PLASMA_SIZE   plasma->world_size

Definition at line 77 of file common.h.

#define PLASMA_TRANSLATION   plasma->translation

Definition at line 85 of file common.h.

#define PlasmaIPT_All   2

Definition at line 92 of file common.h.

#define PlasmaIPT_NoDep   0

IPT internal define

Definition at line 90 of file common.h.

#define PlasmaIPT_Panel   1

Definition at line 91 of file common.h.

#define roundup (   a,
 
)    (b <= 0) ? (a) : (((a) + (b)-1) & ~((b)-1))

Definition at line 104 of file common.h.

#define ss_abort ( )    plasma->ss_abort = 1;

Definition at line 121 of file common.h.

#define ss_aborted ( )    plasma->ss_abort

Definition at line 122 of file common.h.

#define ss_cond_set (   m,
  n,
  val 
)
Value:
{ \
plasma->ss_progress[(m)+plasma->ss_ld*(n)] = (val); \
}

Definition at line 124 of file common.h.

#define ss_cond_wait (   m,
  n,
  val 
)
Value:
{ \
while (!plasma->ss_abort && \
plasma->ss_progress[(m)+plasma->ss_ld*(n)] != (val)) \
plasma_yield(); \
if (plasma->ss_abort) \
break; \
}

Definition at line 129 of file common.h.

#define ss_finalize ( )
Value:
{ \
plasma_barrier(plasma); \
if (PLASMA_RANK == 0) \
plasma_shared_free(plasma, (void*)plasma->ss_progress); \
}

Definition at line 138 of file common.h.

#define ss_init (   m,
  n,
  init_val 
)
Value:
{ \
if (PLASMA_RANK == 0) { \
plasma->ss_progress = (volatile int *)plasma_shared_alloc(plasma, (m)*(n), PlasmaInteger); \
plasma_memset_int((int*)plasma->ss_progress, (m)*(n), (init_val)); \
} \
plasma->ss_ld = (m); \
plasma->ss_abort = 0; \
plasma_barrier(plasma); \
}

Static scheduler

Definition at line 110 of file common.h.


Function Documentation

void plasma_pclag2z ( plasma_context_t plasma)

Definition at line 111 of file pzlag2c.c.

{
PLASMA_sequence *sequence;
PLASMA_request *request;
int X, Y;
int m, n;
int ldam, ldbm;
int next_m;
int next_n;
plasma_unpack_args_4(SA, B, sequence, request);
if (sequence->status != PLASMA_SUCCESS)
return;
n = 0;
while (m >= SA.mt && n < SA.nt) {
n++;
m = m-SA.mt;
}
while (n < SA.nt) {
next_m = m;
next_n = n;
next_m += PLASMA_SIZE;
while (next_m >= SA.mt && next_n < SA.nt) {
next_n++;
next_m = next_m-SA.mt;
}
X = m == SA.mt-1 ? SA.m-SA.mb*m : SA.nb;
Y = n == SA.nt-1 ? SA.n-SA.nb*n : SA.nb;
ldam = BLKLDD(SA, m);
ldbm = BLKLDD(B, m);
CORE_clag2z(X, Y, SA(m, n), ldam, B(m, n), ldbm);
m = next_m;
n = next_n;
}
}
void plasma_pdlag2s ( plasma_context_t plasma)

Definition at line 25 of file pdlag2s.c.

{
PLASMA_sequence *sequence;
PLASMA_request *request;
int X, Y;
int m, n;
int next_m;
int next_n;
int ldam, ldbm;
int info = PLASMA_SUCCESS;
plasma_unpack_args_4(A, SB, sequence, request);
if (sequence->status != PLASMA_SUCCESS)
return;
n = 0;
while (m >= A.mt && n < A.nt) {
n++;
m = m-A.mt;
}
while (n < A.nt) {
next_m = m;
next_n = n;
next_m += PLASMA_SIZE;
while (next_m >= A.mt && next_n < A.nt) {
next_n++;
next_m = next_m-A.mt;
}
X = m == A.mt-1 ? A.m-A.mb*m : A.nb;
Y = n == A.nt-1 ? A.n-A.nb*n : A.nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(SB, m);
CORE_dlag2s(X, Y, A(m, n), ldam, SB(m, n), ldbm, &info);
if (info != 0)
plasma_request_fail(sequence, request, info);
m = next_m;
n = next_n;
}
}
void plasma_pslag2d ( plasma_context_t plasma)

Definition at line 111 of file pdlag2s.c.

{
PLASMA_sequence *sequence;
PLASMA_request *request;
int X, Y;
int m, n;
int ldam, ldbm;
int next_m;
int next_n;
plasma_unpack_args_4(SA, B, sequence, request);
if (sequence->status != PLASMA_SUCCESS)
return;
n = 0;
while (m >= SA.mt && n < SA.nt) {
n++;
m = m-SA.mt;
}
while (n < SA.nt) {
next_m = m;
next_n = n;
next_m += PLASMA_SIZE;
while (next_m >= SA.mt && next_n < SA.nt) {
next_n++;
next_m = next_m-SA.mt;
}
X = m == SA.mt-1 ? SA.m-SA.mb*m : SA.nb;
Y = n == SA.nt-1 ? SA.n-SA.nb*n : SA.nb;
ldam = BLKLDD(SA, m);
ldbm = BLKLDD(B, m);
CORE_slag2d(X, Y, SA(m, n), ldam, B(m, n), ldbm);
m = next_m;
n = next_n;
}
}
void plasma_pzlag2c ( plasma_context_t plasma)

Definition at line 25 of file pzlag2c.c.

{
PLASMA_sequence *sequence;
PLASMA_request *request;
int X, Y;
int m, n;
int next_m;
int next_n;
int ldam, ldbm;
int info = PLASMA_SUCCESS;
plasma_unpack_args_4(A, SB, sequence, request);
if (sequence->status != PLASMA_SUCCESS)
return;
n = 0;
while (m >= A.mt && n < A.nt) {
n++;
m = m-A.mt;
}
while (n < A.nt) {
next_m = m;
next_n = n;
next_m += PLASMA_SIZE;
while (next_m >= A.mt && next_n < A.nt) {
next_n++;
next_m = next_m-A.mt;
}
X = m == A.mt-1 ? A.m-A.mb*m : A.nb;
Y = n == A.nt-1 ? A.n-A.nb*n : A.nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(SB, m);
CORE_zlag2c(X, Y, A(m, n), ldam, SB(m, n), ldbm, &info);
if (info != 0)
plasma_request_fail(sequence, request, info);
m = next_m;
n = next_n;
}
}

Variable Documentation

char* plasma_lapack_constants[]

Global array of LAPACK constants

LAPACK Constants

Definition at line 20 of file global.c.