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
core_slaswp.c File Reference
#include <lapacke.h>
#include "common.h"
Include dependency graph for core_slaswp.c:

Go to the source code of this file.

Macros

#define A(m, n)   BLKADDR(descA, float, m, n)

Functions

void CORE_slaswp (int N, float *A, int LDA, int I1, int I2, int *IPIV, int INC)
void QUARK_CORE_slaswp (Quark *quark, Quark_Task_Flags *task_flags, int n, float *A, int lda, int i1, int i2, int *ipiv, int inc)
void CORE_slaswp_quark (Quark *quark)
void QUARK_CORE_slaswp_f2 (Quark *quark, Quark_Task_Flags *task_flags, int n, float *A, int lda, int i1, int i2, int *ipiv, int inc, float *fake1, int szefake1, int flag1, float *fake2, int szefake2, int flag2)
void CORE_slaswp_f2_quark (Quark *quark)
int CORE_slaswp_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc)
void QUARK_CORE_slaswp_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, float *Aij, int i1, int i2, int *ipiv, int inc, float *fakepanel)
void CORE_slaswp_ontile_quark (Quark *quark)
void QUARK_CORE_slaswp_ontile_f2 (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, float *Aij, int i1, int i2, int *ipiv, int inc, float *fake1, int szefake1, int flag1, float *fake2, int szefake2, int flag2)
void CORE_slaswp_ontile_f2_quark (Quark *quark)
int CORE_sswptr_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc, float *Akk, int ldak)
void QUARK_CORE_sswptr_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, float *Aij, int i1, int i2, int *ipiv, int inc, float *Akk, int ldak)
void CORE_sswptr_ontile_quark (Quark *quark)
int CORE_slaswpc_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc)
void QUARK_CORE_slaswpc_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, float *Aij, int i1, int i2, int *ipiv, int inc, float *fakepanel)
void CORE_slaswpc_ontile_quark (Quark *quark)

Detailed Description

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

Version:
2.4.5
Author:
Mathieu Faverge
Date:
2010-11-15 s Tue Nov 22 14:35:21 2011

Definition in file core_slaswp.c.


Macro Definition Documentation

#define A (   m,
 
)    BLKADDR(descA, float, m, n)

Definition at line 18 of file core_slaswp.c.


Function Documentation

void CORE_slaswp ( int  N,
float *  A,
int  LDA,
int  I1,
int  I2,
int *  IPIV,
int  INC 
)

Definition at line 29 of file core_slaswp.c.

{
LAPACKE_slaswp_work( LAPACK_COL_MAJOR, N, A, LDA, I1, I2, IPIV, INC );
}
void CORE_slaswp_f2_quark ( Quark quark)

Definition at line 102 of file core_slaswp.c.

References A, and quark_unpack_args_9.

{
int n, lda, i1, i2, inc;
int *ipiv;
float *A;
void *fake1, *fake2;
quark_unpack_args_9(quark, n, A, lda, i1, i2, ipiv, inc, fake1, fake2);
LAPACKE_slaswp_work(LAPACK_COL_MAJOR, n, A, lda, i1, i2, ipiv, inc );
}

Here is the caller graph for this function:

int CORE_slaswp_ontile ( PLASMA_desc  descA,
int  i1,
int  i2,
int *  ipiv,
int  inc 
)

CORE_slaswp_ontile apply the slaswp function on a matrix stored in tile layout

Parameters:
[in,out]AThe descriptor of the matrix A to permute.
[in]i1The first element of IPIV for which a row interchange will be done.
[in]i2The last element of IPIV for which a row interchange will be done.
[in]ipivThe pivot indices; Only the element in position i1 to i2 are accessed. The pivot are offset by A.i.
[in]incThe increment between successive values of IPIV. If IPIV is negative, the pivots are applied in reverse order.

Definition at line 147 of file core_slaswp.c.

References A, BLKLDD, cblas_sswap(), coreblas_error, plasma_desc_t::i, plasma_desc_t::m, plasma_desc_t::mb, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nt, and PLASMA_SUCCESS.

{
int i, j, ip, it;
float *A1;
int lda1, lda2;
/* Change i1 to C notation */
i1--;
if ( descA.nt > 1 ) {
coreblas_error(1, "Illegal value of descA.nt");
return -1;
}
if ( i1 < 0 ) {
coreblas_error(2, "Illegal value of i1");
return -2;
}
if ( (i2 < i1) || (i2 > descA.m) ) {
coreblas_error(3, "Illegal value of i2");
return -3;
}
if ( ! ( (i2 - i1 - i1%descA.mb -1) < descA.mb ) ) {
coreblas_error(2, "Illegal value of i1,i2. They have to be part of the same block.");
return -3;
}
it = i1 / descA.mb;
if (inc > 0) {
A1 = A(it, 0);
lda1 = BLKLDD(descA, 0);
for (j = i1; j < i2; ++j, ipiv+=inc) {
ip = (*ipiv) - descA.i - 1;
if ( ip != j )
{
it = ip / descA.mb;
i = ip % descA.mb;
lda2 = BLKLDD(descA, it);
cblas_sswap(descA.n, A1 + j, lda1,
A(it, 0) + i, lda2 );
}
}
}
else
{
A1 = A(it, 0);
lda1 = BLKLDD(descA, descA.mt-1);
i1--;
ipiv = &ipiv[(1-i2)*inc];
for (j = i2-1; j > i1; --j, ipiv+=inc) {
ip = (*ipiv) - descA.i - 1;
if ( ip != j )
{
it = ip / descA.mb;
i = ip % descA.mb;
lda2 = BLKLDD(descA, it);
cblas_sswap(descA.n, A1 + j, lda1,
A(it, 0) + i, lda2 );
}
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_slaswp_ontile_f2_quark ( Quark quark)

Definition at line 279 of file core_slaswp.c.

References A, CORE_slaswp_ontile(), and quark_unpack_args_8.

{
int i1, i2, inc;
int *ipiv;
float *A;
PLASMA_desc descA;
void *fake1, *fake2;
quark_unpack_args_8(quark, descA, A, i1, i2, ipiv, inc, fake1, fake2);
CORE_slaswp_ontile(descA, i1, i2, ipiv, inc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_slaswp_ontile_quark ( Quark quark)

Definition at line 238 of file core_slaswp.c.

References A, CORE_slaswp_ontile(), and quark_unpack_args_7.

{
int i1, i2, inc;
int *ipiv;
float *A, *fake;
PLASMA_desc descA;
quark_unpack_args_7(quark, descA, A, i1, i2, ipiv, inc, fake);
CORE_slaswp_ontile(descA, i1, i2, ipiv, inc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_slaswp_quark ( Quark quark)

Definition at line 61 of file core_slaswp.c.

References A, and quark_unpack_args_7.

{
int n, lda, i1, i2, inc;
int *ipiv;
float *A;
quark_unpack_args_7(quark, n, A, lda, i1, i2, ipiv, inc);
LAPACKE_slaswp_work(LAPACK_COL_MAJOR, n, A, lda, i1, i2, ipiv, inc );
}

Here is the caller graph for this function:

int CORE_slaswpc_ontile ( PLASMA_desc  descA,
int  i1,
int  i2,
int *  ipiv,
int  inc 
)

CORE_slaswpc_ontile apply the slaswp function on a matrix stored in tile layout

Parameters:
[in,out]AThe descriptor of the matrix A to permute.
[in]i1The first element of IPIV for which a column interchange will be done.
[in]i2The last element of IPIV for which a column interchange will be done.
[in]ipivThe pivot indices; Only the element in position i1 to i2 are accessed. The pivot are offset by A.i.
[in]incThe increment between successive values of IPIV. If IPIV is negative, the pivots are applied in reverse order.

Definition at line 430 of file core_slaswp.c.

References A, BLKLDD, cblas_sswap(), coreblas_error, plasma_desc_t::j, plasma_desc_t::m, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nb, and PLASMA_SUCCESS.

{
int i, j, ip, it;
float *A1;
int lda;
if ( descA.mt > 1 ) {
coreblas_error(1, "Illegal value of descA.mt");
return -1;
}
if ( i1 < 1 ) {
coreblas_error(2, "Illegal value of i1");
return -2;
}
if ( (i2 < i1) || (i2 > descA.n) ) {
coreblas_error(3, "Illegal value of i2");
return -3;
}
if ( ! ( (i2 - i1 - i1%descA.nb -1) < descA.nb ) ) {
coreblas_error(2, "Illegal value of i1,i2. They have to be part of the same block.");
return -3;
}
lda = BLKLDD(descA, 0);
it = i1 / descA.nb;
if (inc > 0) {
A1 = A(0, it);
for (j = i1-1; j < i2; ++j, ipiv+=inc) {
ip = (*ipiv) - descA.j - 1;
if ( ip != j )
{
it = ip / descA.nb;
i = ip % descA.nb;
cblas_sswap(descA.m, A1 + j*lda, 1,
A(0, it) + i*lda, 1 );
}
}
}
else
{
A1 = A(0, it);
i1 -= 2;
ipiv = &ipiv[(1-i2)*inc];
for (j = i2-1; j > i1; --j, ipiv+=inc) {
ip = (*ipiv) - descA.j - 1;
if ( ip != j )
{
it = ip / descA.nb;
i = ip % descA.nb;
cblas_sswap(descA.m, A1 + j*lda, 1,
A(0, it) + i*lda, 1 );
}
}
}
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_slaswpc_ontile_quark ( Quark quark)

Definition at line 516 of file core_slaswp.c.

References A, CORE_slaswpc_ontile(), and quark_unpack_args_7.

{
int i1, i2, inc;
int *ipiv;
float *A, *fake;
PLASMA_desc descA;
quark_unpack_args_7(quark, descA, A, i1, i2, ipiv, inc, fake);
CORE_slaswpc_ontile(descA, i1, i2, ipiv, inc);
}

Here is the call graph for this function:

Here is the caller graph for this function:

int CORE_sswptr_ontile ( PLASMA_desc  descA,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  Akk,
int  ldak 
)

CORE_sswptr_ontile apply the slaswp function on a matrix stored in tile layout, followed by a strsm on the first tile of the panel.

Parameters:
[in,out]AThe descriptor of the matrix A to permute.
[in]i1The first element of IPIV for which a row interchange will be done.
[in]i2The last element of IPIV for which a row interchange will be done.
[in]ipivThe pivot indices; Only the element in position i1 to i2 are accessed. The pivot are offset by A.i.
[in]incThe increment between successive values of IPIV. If IPIV is negative, the pivots are applied in reverse order.

Definition at line 325 of file core_slaswp.c.

References A, BLKLDD, cblas_strsm(), CblasColMajor, CblasLeft, CblasLower, CblasNoTrans, CblasUnit, CORE_slaswp_ontile(), coreblas_error, plasma_desc_t::m, plasma_desc_t::mb, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nt, and PLASMA_SUCCESS.

{
float zone = 1.0;
int lda;
int m = descA.mt == 1 ? descA.m : descA.mb;
if ( descA.nt > 1 ) {
coreblas_error(1, "Illegal value of descA.nt");
return -1;
}
if ( i1 < 1 ) {
coreblas_error(2, "Illegal value of i1");
return -2;
}
if ( (i2 < i1) || (i2 > m) ) {
coreblas_error(3, "Illegal value of i2");
return -3;
}
CORE_slaswp_ontile(descA, i1, i2, ipiv, inc);
lda = BLKLDD(descA, 0);
m, descA.n, (zone),
Akk, ldak,
A(0, 0), lda );
}

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_sswptr_ontile_quark ( Quark quark)

Definition at line 385 of file core_slaswp.c.

References A, CORE_sswptr_ontile(), and quark_unpack_args_8.

{
int i1, i2, inc, ldak;
int *ipiv;
float *A, *Akk;
PLASMA_desc descA;
quark_unpack_args_8(quark, descA, A, i1, i2, ipiv, inc, Akk, ldak);
CORE_sswptr_ontile(descA, i1, i2, ipiv, inc, Akk, ldak);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_slaswp ( Quark quark,
Quark_Task_Flags task_flags,
int  n,
float *  A,
int  lda,
int  i1,
int  i2,
int *  ipiv,
int  inc 
)

Definition at line 37 of file core_slaswp.c.

References CORE_slaswp_quark(), DAG_CORE_LASWP, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_slaswp_quark, task_flags,
sizeof(int), &n, VALUE,
sizeof(float)*lda*n, A, INOUT | LOCALITY,
sizeof(int), &lda, VALUE,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*n, ipiv, INPUT,
sizeof(int), &inc, VALUE,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_slaswp_f2 ( Quark quark,
Quark_Task_Flags task_flags,
int  n,
float *  A,
int  lda,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  fake1,
int  szefake1,
int  flag1,
float *  fake2,
int  szefake2,
int  flag2 
)

Definition at line 74 of file core_slaswp.c.

References CORE_slaswp_f2_quark(), DAG_CORE_LASWP, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_slaswp_f2_quark, task_flags,
sizeof(int), &n, VALUE,
sizeof(float)*lda*n, A, INOUT | LOCALITY,
sizeof(int), &lda, VALUE,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*n, ipiv, INPUT,
sizeof(int), &inc, VALUE,
sizeof(float)*szefake1, fake1, flag1,
sizeof(float)*szefake2, fake2, flag2,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_slaswp_ontile ( Quark quark,
Quark_Task_Flags task_flags,
PLASMA_desc  descA,
float *  Aij,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  fakepanel 
)

Definition at line 214 of file core_slaswp.c.

References CORE_slaswp_ontile_quark(), DAG_CORE_LASWP, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_slaswp_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(float)*1, Aij, INOUT | LOCALITY,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*(i2-i1+1)*abs(inc), ipiv, INPUT,
sizeof(int), &inc, VALUE,
sizeof(float)*1, fakepanel, INOUT,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_slaswp_ontile_f2 ( Quark quark,
Quark_Task_Flags task_flags,
PLASMA_desc  descA,
float *  Aij,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  fake1,
int  szefake1,
int  flag1,
float *  fake2,
int  szefake2,
int  flag2 
)

Definition at line 252 of file core_slaswp.c.

References CORE_slaswp_ontile_f2_quark(), DAG_CORE_LASWP, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_slaswp_ontile_f2_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(float)*1, Aij, INOUT | LOCALITY,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*(i2-i1+1)*abs(inc), ipiv, INPUT,
sizeof(int), &inc, VALUE,
sizeof(float)*szefake1, fake1, flag1,
sizeof(float)*szefake2, fake2, flag2,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_slaswpc_ontile ( Quark quark,
Quark_Task_Flags task_flags,
PLASMA_desc  descA,
float *  Aij,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  fakepanel 
)

Definition at line 492 of file core_slaswp.c.

References CORE_slaswpc_ontile_quark(), DAG_CORE_LASWP, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_slaswpc_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(float)*1, Aij, INOUT | LOCALITY,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*(i2-i1+1)*abs(inc), ipiv, INPUT,
sizeof(int), &inc, VALUE,
sizeof(float)*1, fakepanel, INOUT,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void QUARK_CORE_sswptr_ontile ( Quark quark,
Quark_Task_Flags task_flags,
PLASMA_desc  descA,
float *  Aij,
int  i1,
int  i2,
int *  ipiv,
int  inc,
float *  Akk,
int  ldak 
)

Definition at line 359 of file core_slaswp.c.

References CORE_sswptr_ontile_quark(), DAG_CORE_TRSM, INOUT, INPUT, LOCALITY, QUARK_Insert_Task(), and VALUE.

{
quark, CORE_sswptr_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(float)*1, Aij, INOUT | LOCALITY,
sizeof(int), &i1, VALUE,
sizeof(int), &i2, VALUE,
sizeof(int)*(i2-i1+1)*abs(inc), ipiv, INPUT,
sizeof(int), &inc, VALUE,
sizeof(float)*ldak, Akk, INPUT,
sizeof(int), &ldak, VALUE,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function: