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

Go to the source code of this file.

Macros

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

Functions

void CORE_dlaswp (int N, double *A, int LDA, int I1, int I2, int *IPIV, int INC)
void QUARK_CORE_dlaswp (Quark *quark, Quark_Task_Flags *task_flags, int n, double *A, int lda, int i1, int i2, int *ipiv, int inc)
void CORE_dlaswp_quark (Quark *quark)
void QUARK_CORE_dlaswp_f2 (Quark *quark, Quark_Task_Flags *task_flags, int n, double *A, int lda, int i1, int i2, int *ipiv, int inc, double *fake1, int szefake1, int flag1, double *fake2, int szefake2, int flag2)
void CORE_dlaswp_f2_quark (Quark *quark)
int CORE_dlaswp_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc)
void QUARK_CORE_dlaswp_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, double *Aij, int i1, int i2, int *ipiv, int inc, double *fakepanel)
void CORE_dlaswp_ontile_quark (Quark *quark)
void QUARK_CORE_dlaswp_ontile_f2 (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, double *Aij, int i1, int i2, int *ipiv, int inc, double *fake1, int szefake1, int flag1, double *fake2, int szefake2, int flag2)
void CORE_dlaswp_ontile_f2_quark (Quark *quark)
int CORE_dswptr_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc, double *Akk, int ldak)
void QUARK_CORE_dswptr_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, double *Aij, int i1, int i2, int *ipiv, int inc, double *Akk, int ldak)
void CORE_dswptr_ontile_quark (Quark *quark)
int CORE_dlaswpc_ontile (PLASMA_desc descA, int i1, int i2, int *ipiv, int inc)
void QUARK_CORE_dlaswpc_ontile (Quark *quark, Quark_Task_Flags *task_flags, PLASMA_desc descA, double *Aij, int i1, int i2, int *ipiv, int inc, double *fakepanel)
void CORE_dlaswpc_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 d Tue Nov 22 14:35:21 2011

Definition in file core_dlaswp.c.


Macro Definition Documentation

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

Definition at line 18 of file core_dlaswp.c.


Function Documentation

void CORE_dlaswp ( int  N,
double *  A,
int  LDA,
int  I1,
int  I2,
int *  IPIV,
int  INC 
)

Definition at line 29 of file core_dlaswp.c.

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

Definition at line 102 of file core_dlaswp.c.

References A, and quark_unpack_args_9.

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

Here is the caller graph for this function:

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

CORE_dlaswp_ontile apply the dlaswp 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_dlaswp.c.

References A, BLKLDD, cblas_dswap(), 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;
double *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_dswap(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_dswap(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_dlaswp_ontile_f2_quark ( Quark quark)

Definition at line 279 of file core_dlaswp.c.

References A, CORE_dlaswp_ontile(), and quark_unpack_args_8.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_dlaswp_ontile_quark ( Quark quark)

Definition at line 238 of file core_dlaswp.c.

References A, CORE_dlaswp_ontile(), and quark_unpack_args_7.

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CORE_dlaswp_quark ( Quark quark)

Definition at line 61 of file core_dlaswp.c.

References A, and quark_unpack_args_7.

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

Here is the caller graph for this function:

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

CORE_dlaswpc_ontile apply the dlaswp 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_dlaswp.c.

References A, BLKLDD, cblas_dswap(), 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;
double *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_dswap(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_dswap(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_dlaswpc_ontile_quark ( Quark quark)

Definition at line 516 of file core_dlaswp.c.

References A, CORE_dlaswpc_ontile(), and quark_unpack_args_7.

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

Here is the call graph for this function:

Here is the caller graph for this function:

int CORE_dswptr_ontile ( PLASMA_desc  descA,
int  i1,
int  i2,
int *  ipiv,
int  inc,
double *  Akk,
int  ldak 
)

CORE_dswptr_ontile apply the dlaswp function on a matrix stored in tile layout, followed by a dtrsm 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_dlaswp.c.

References A, BLKLDD, cblas_dtrsm(), CblasColMajor, CblasLeft, CblasLower, CblasNoTrans, CblasUnit, CORE_dlaswp_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.

{
double 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_dlaswp_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_dswptr_ontile_quark ( Quark quark)

Definition at line 385 of file core_dlaswp.c.

References A, CORE_dswptr_ontile(), and quark_unpack_args_8.

{
int i1, i2, inc, ldak;
int *ipiv;
double *A, *Akk;
PLASMA_desc descA;
quark_unpack_args_8(quark, descA, A, i1, i2, ipiv, inc, Akk, ldak);
CORE_dswptr_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_dlaswp ( Quark quark,
Quark_Task_Flags task_flags,
int  n,
double *  A,
int  lda,
int  i1,
int  i2,
int *  ipiv,
int  inc 
)

Definition at line 37 of file core_dlaswp.c.

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

{
quark, CORE_dlaswp_quark, task_flags,
sizeof(int), &n, VALUE,
sizeof(double)*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_dlaswp_f2 ( Quark quark,
Quark_Task_Flags task_flags,
int  n,
double *  A,
int  lda,
int  i1,
int  i2,
int *  ipiv,
int  inc,
double *  fake1,
int  szefake1,
int  flag1,
double *  fake2,
int  szefake2,
int  flag2 
)

Definition at line 74 of file core_dlaswp.c.

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

{
quark, CORE_dlaswp_f2_quark, task_flags,
sizeof(int), &n, VALUE,
sizeof(double)*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(double)*szefake1, fake1, flag1,
sizeof(double)*szefake2, fake2, flag2,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 214 of file core_dlaswp.c.

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

{
quark, CORE_dlaswp_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(double)*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(double)*1, fakepanel, INOUT,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 252 of file core_dlaswp.c.

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

{
quark, CORE_dlaswp_ontile_f2_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(double)*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(double)*szefake1, fake1, flag1,
sizeof(double)*szefake2, fake2, flag2,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 492 of file core_dlaswp.c.

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

{
quark, CORE_dlaswpc_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(double)*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(double)*1, fakepanel, INOUT,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 359 of file core_dlaswp.c.

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

{
quark, CORE_dswptr_ontile_quark, task_flags,
sizeof(PLASMA_desc), &descA, VALUE,
sizeof(double)*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(double)*ldak, Akk, INPUT,
sizeof(int), &ldak, VALUE,
0);
}

Here is the call graph for this function:

Here is the caller graph for this function: