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

Go to the source code of this file.

Macros

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

Functions

void plasma_pslaset_quark (PLASMA_enum uplo, float alpha, float beta, PLASMA_desc A, PLASMA_sequence *sequence, PLASMA_request *request)

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:
Hatem Ltaief
Date:
2010-11-15 s Tue Nov 22 14:35:41 2011

Definition in file pslaset.c.


Macro Definition Documentation

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

Definition at line 17 of file pslaset.c.


Function Documentation

void plasma_pslaset_quark ( PLASMA_enum  uplo,
float  alpha,
float  beta,
PLASMA_desc  A,
PLASMA_sequence sequence,
PLASMA_request request 
)

Parallel initialization a 2-D array A to BETA on the diagonal and ALPHA on the offdiagonals.

Definition at line 22 of file pslaset.c.

References BLKLDD, plasma_desc_t::m, plasma_desc_t::mb, min, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nb, plasma_desc_t::nt, plasma_context_self(), PLASMA_SUCCESS, PlasmaLower, PlasmaUpper, PlasmaUpperLower, plasma_context_struct::quark, QUARK_CORE_slaset(), plasma_sequence_t::quark_sequence, QUARK_Task_Flag_Set(), Quark_Task_Flags_Initializer, plasma_sequence_t::status, and TASK_SEQUENCE.

{
int i, j;
int ldai, ldaj;
int tempim;
int tempjm, tempjn;
int minmn = min(A.mt, A.nt);
plasma = plasma_context_self();
if (sequence->status != PLASMA_SUCCESS)
return;
QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
if (uplo == PlasmaLower) {
for (j = 0; j < minmn; j++){
tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
ldaj = BLKLDD(A, j);
plasma->quark, &task_flags,
PlasmaLower, tempjm, tempjn, alpha, beta,
A(j, j), ldaj);
for (i = j+1; i < A.mt; i++){
tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
ldai = BLKLDD(A, i);
plasma->quark, &task_flags,
PlasmaUpperLower, tempim, tempjn, alpha, alpha,
A(i, j), ldai);
}
}
}
else if (uplo == PlasmaUpper) {
for (j = 1; j < A.nt; j++){
tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
for (i = 0; i < min(j, A.mt); i++){
tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
ldai = BLKLDD(A, i);
plasma->quark, &task_flags,
PlasmaUpperLower, tempim, tempjn, alpha, alpha,
A(i, j), ldai);
}
}
for (j = 0; j < minmn; j++){
tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
ldaj = BLKLDD(A, j);
plasma->quark, &task_flags,
PlasmaUpper, tempjm, tempjn, alpha, beta,
A(j, j), ldaj);
}
}
else {
for (i = 0; i < A.mt; i++){
tempim = i == A.mt-1 ? A.m-i*A.mb : A.mb;
ldai = BLKLDD(A, i);
for (j = 0; j < A.nt; j++){
tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
plasma->quark, &task_flags,
PlasmaUpperLower, tempim, tempjn, alpha, alpha,
A(i, j), ldai);
}
}
for (j = 0; j < minmn; j++){
tempjm = j == A.mt-1 ? A.m-j*A.mb : A.mb;
tempjn = j == A.nt-1 ? A.n-j*A.nb : A.nb;
ldaj = BLKLDD(A, j);
plasma->quark, &task_flags,
PlasmaUpperLower, tempjm, tempjn, alpha, beta,
A(j, j), ldaj);
}
}
}

Here is the call graph for this function: