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

Go to the source code of this file.

Macros

#define A(m, n)   BLKADDR(A, PLASMA_Complex32_t, m, n)
#define B(m, n)   BLKADDR(B, PLASMA_Complex32_t, m, n)

Functions

void plasma_pcgeadd (plasma_context_t *plasma)
void plasma_pcgeadd_quark (PLASMA_Complex32_t alpha, PLASMA_desc A, PLASMA_desc B, 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:
Emmanuel Agullo
Mathieu Faverge
Date:
2010-11-15 c Tue Nov 22 14:35:40 2011

Definition in file pcgeadd.c.


Macro Definition Documentation

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

Definition at line 18 of file pcgeadd.c.

#define B (   m,
 
)    BLKADDR(B, PLASMA_Complex32_t, m, n)

Definition at line 19 of file pcgeadd.c.


Function Documentation

void plasma_pcgeadd ( plasma_context_t plasma)

Declarations of parallel functions (static scheduling) - alphabetical order

Definition at line 23 of file pcgeadd.c.

References A, B, BLKLDD, CORE_cgeadd(), plasma_desc_t::m, plasma_desc_t::mb, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nb, plasma_desc_t::nt, PLASMA_RANK, PLASMA_SIZE, PLASMA_SUCCESS, plasma_unpack_args_5, and plasma_sequence_t::status.

{
PLASMA_sequence *sequence;
PLASMA_request *request;
int X, Y;
int m, n;
int next_m;
int next_n;
int ldam, ldbm;
plasma_unpack_args_5(alpha, A, B, 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(B, m);
CORE_cgeadd(X, Y, alpha, A(m, n), ldam, B(m, n), ldbm);
m = next_m;
n = next_n;
}
}

Here is the call graph for this function:

void plasma_pcgeadd_quark ( PLASMA_Complex32_t  alpha,
PLASMA_desc  A,
PLASMA_desc  B,
PLASMA_sequence sequence,
PLASMA_request request 
)

Declarations of parallel functions (dynamic scheduling) - alphabetical order

Definition at line 72 of file pcgeadd.c.

References B, BLKLDD, plasma_desc_t::m, plasma_desc_t::mb, plasma_desc_t::mt, plasma_desc_t::n, plasma_desc_t::nb, plasma_desc_t::nt, plasma_context_self(), PLASMA_SUCCESS, plasma_context_struct::quark, QUARK_CORE_cgeadd(), plasma_sequence_t::quark_sequence, QUARK_Task_Flag_Set(), Quark_Task_Flags_Initializer, plasma_sequence_t::status, and TASK_SEQUENCE.

{
int X, Y;
int m, n;
int ldam, ldbm;
plasma = plasma_context_self();
if (sequence->status != PLASMA_SUCCESS)
return;
QUARK_Task_Flag_Set(&task_flags, TASK_SEQUENCE, (intptr_t)sequence->quark_sequence);
for (m = 0; m < A.mt; m++) {
X = m == A.mt-1 ? A.m-m*A.mb : A.mb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
for (n = 0; n < A.nt; n++) {
Y = n == A.nt-1 ? A.n-n*A.nb : A.nb;
plasma->quark, &task_flags,
X, Y, A.mb,
alpha, A(m, n), ldam,
B(m, n), ldbm);
}
}
}

Here is the call graph for this function: