MAGMA  1.2.0
MatrixAlgebraonGPUandMulticoreArchitectures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
pztile.c File Reference
#include "common.h"
Include dependency graph for pztile.c:

Go to the source code of this file.

Macros

#define AF77(m, n)   &(Af77[ ((int64_t)A.nb*(int64_t)lda*(int64_t)(n)) + (int64_t)(A.mb*(m)) ])
#define BLKADDR(A, type, m, n)   (type *)magma_getaddr(A, m, n)
#define ABDL(m, n)   BLKADDR(dA, PLASMA_Complex64_t, m, n)

Functions

void CORE_ztile_zero (int X1, int X2, int Y1, int Y2, PLASMA_Complex64_t *A, int lda)
void magma_pzlapack_to_tile (PLASMA_Complex64_t *Af77, int lda, magma_desc_t *dA, magma_sequence_t *sequence, magma_request_t *request)
void magma_pztile_to_lapack (magma_desc_t *dA, PLASMA_Complex64_t *Af77, int lda, magma_sequence_t *sequence, magma_request_t *request)
void magma_pztile_zero (magma_desc_t *dA, magma_sequence_t *sequence, magma_request_t *request)

Macro Definition Documentation

#define ABDL (   m,
 
)    BLKADDR(dA, PLASMA_Complex64_t, m, n)

Definition at line 22 of file pztile.c.

#define AF77 (   m,
 
)    &(Af77[ ((int64_t)A.nb*(int64_t)lda*(int64_t)(n)) + (int64_t)(A.mb*(m)) ])

Definition at line 18 of file pztile.c.

#define BLKADDR (   A,
  type,
  m,
 
)    (type *)magma_getaddr(A, m, n)

Definition at line 21 of file pztile.c.


Function Documentation

void CORE_ztile_zero ( int  X1,
int  X2,
int  Y1,
int  Y2,
PLASMA_Complex64_t *  A,
int  lda 
)

Definition at line 139 of file pztile.c.

{
int x, y;
for (x = X1; x < X2; x++)
for (y = Y1; y < Y2; y++)
A[lda*x+y] = 0.0;
}

Here is the caller graph for this function:

void magma_pzlapack_to_tile ( PLASMA_Complex64_t *  Af77,
int  lda,
magma_desc_t dA,
magma_sequence_t sequence,
magma_request_t request 
)

Conversion from LAPACK F77 matrix layout to tile layout - dynamic scheduling

Definition at line 30 of file pztile.c.

References A, ABDL, AF77, BLKLDD, magma_desc_s::desc, magma_context_self(), MAGMA_SUCCESS, and magma_sequence_s::status.

{
PLASMA_Complex64_t *f77;
PLASMA_Complex64_t *bdl;
PLASMA_desc A = dA->desc;
int X1, Y1;
int X2, Y2;
int n, m, ldt;
magma = magma_context_self();
if (sequence->status != MAGMA_SUCCESS)
return;
for (m = 0; m < A.mt; m++)
{
ldt = BLKLDD(dA, m);
for (n = 0; n < A.nt; n++)
{
X1 = n == 0 ? A.j%A.nb : 0;
Y1 = m == 0 ? A.i%A.mb : 0;
X2 = n == A.nt-1 ? (A.j+A.n-1)%A.nb+1 : A.nb;
Y2 = m == A.mt-1 ? (A.i+A.m-1)%A.mb+1 : A.mb;
f77 = AF77(m, n);
bdl = ABDL(m, n);
CORE_zlacpy(
PlasmaUpperLower, (Y2-Y1), (X2-X1),
&(f77[X1*lda+Y1]), lda,
&(bdl[X1*lda+Y1]), ldt);
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

void magma_pztile_to_lapack ( magma_desc_t dA,
PLASMA_Complex64_t *  Af77,
int  lda,
magma_sequence_t sequence,
magma_request_t request 
)

Conversion from LAPACK F77 matrix layout to tile layout - dynamic scheduling

Definition at line 68 of file pztile.c.

References A, ABDL, AF77, BLKLDD, magma_desc_s::desc, magma_context_self(), MAGMA_SUCCESS, and magma_sequence_s::status.

{
PLASMA_Complex64_t *f77;
PLASMA_Complex64_t *bdl;
PLASMA_desc A = dA->desc;
int X1, Y1;
int X2, Y2;
int n, m, ldt;
magma = magma_context_self();
if (sequence->status != MAGMA_SUCCESS)
return;
for (m = 0; m < A.mt; m++)
{
ldt = BLKLDD(dA, m);
for (n = 0; n < A.nt; n++)
{
X1 = n == 0 ? A.j%A.nb : 0;
Y1 = m == 0 ? A.i%A.mb : 0;
X2 = n == A.nt-1 ? (A.j+A.n-1)%A.nb+1 : A.nb;
Y2 = m == A.mt-1 ? (A.i+A.m-1)%A.mb+1 : A.mb;
f77 = AF77(m, n);
bdl = ABDL(m, n);
CORE_zlacpy(
PlasmaUpperLower, (Y2-Y1), (X2-X1),
&(bdl[X1*lda+Y1]), ldt,
&(f77[X1*lda+Y1]), lda);
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

void magma_pztile_zero ( magma_desc_t dA,
magma_sequence_t sequence,
magma_request_t request 
)

Zeroes a submatrix in tile layout - dynamic scheduling

Definition at line 106 of file pztile.c.

References A, ABDL, BLKLDD, CORE_ztile_zero(), magma_desc_s::desc, magma_context_self(), MAGMA_SUCCESS, and magma_sequence_s::status.

{
PLASMA_Complex64_t *bdl;
PLASMA_desc A = dA->desc;
int X1, Y1;
int X2, Y2;
int n, m, ldt;
magma = magma_context_self();
if (sequence->status != MAGMA_SUCCESS)
return;
for (m = 0; m < A.mt; m++)
{
ldt = BLKLDD(dA, m);
for (n = 0; n < A.nt; n++)
{
X1 = n == 0 ? A.j%A.nb : 0;
Y1 = m == 0 ? A.i%A.mb : 0;
X2 = n == A.nt-1 ? (A.j+A.n-1)%A.nb+1 : A.nb;
Y2 = m == A.mt-1 ? (A.i+A.m-1)%A.mb+1 : A.mb;
bdl = ABDL(m, n);
CORE_ztile_zero(X1, X2, Y1, Y2, bdl, ldt);
}
}
}

Here is the call graph for this function: