Commit b4b0b315 authored by Mathieu Faverge's avatar Mathieu Faverge

Integrate the GEADD/TRADD routines from plasma

parent 998c7a2a
......@@ -65,7 +65,9 @@ set(ZSRC
pztrmm.c
pztrsm.c
pztrsmpl.c
pztradd.c
###
zgeadd.c
zgemm.c
zhemm.c
zher2k.c
......@@ -73,13 +75,13 @@ set(ZSRC
zsymm.c
zsyr2k.c
zsyrk.c
ztradd.c
ztrmm.c
ztrsm.c
ztrsmpl.c
##################
# LAPACK
##################
pzgeadd.c
pzgelqf.c
pzgelqfrh.c
pzgeqrf.c
......
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file pzgeadd.c
*
* MORSE auxiliary routines
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.5.0
* @comment This file has been automatically generated
* from Plasma 2.5.0 for MORSE 1.0.0
* @author Mathieu Faverge
* @author Emmanuel Agullo
* @author Cedric Castagnede
* @date 2010-11-15
* @precisions normal z -> s d c
*
**/
#include "control/common.h"
#define A(m,n) A, m, n
#define B(m,n) B, m, n
/***************************************************************************//**
*
**/
/***************************************************************************//**
*
**/
void morse_pzgeadd(MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
{
MORSE_context_t *morse;
MORSE_option_t options;
int X, Y;
int m, n;
int ldam, ldbm;
morse = morse_context_self();
if (sequence->status != MORSE_SUCCESS)
return;
RUNTIME_options_init(&options, morse, sequence, request);
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;
MORSE_TASK_zgeadd(
&options,
X, Y,
alpha, A(m, n), ldam,
B(m, n), ldbm);
}
}
RUNTIME_options_finalize(&options, morse);
MORSE_TASK_dataflush_all();
}
......@@ -114,9 +114,9 @@ void morse_pzlange(MORSE_enum norm, MORSE_desc_t *A, double *result,
for(m = 0; m < A->mt; m++) {
MORSE_TASK_dgeadd(
&options,
1, tempkn, 1.0,
VECNORMS_STEP1(m, n), 1,
VECNORMS_STEP2(0, n), 1);
MorseNoTrans, 1, tempkn, A->mb,
1.0, VECNORMS_STEP1(m, n), 1,
1.0, VECNORMS_STEP2(0, n), 1);
}
/*
......@@ -215,18 +215,18 @@ void morse_pzlange(MORSE_enum norm, MORSE_desc_t *A, double *result,
for(n = A->myrank % A->q + A->q; n < A->nt; n+=A->q) {
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP1(m, A->myrank % A->q), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP1(m, A->myrank % A->q), tempkm);
}
/* compute vector sums between tiles in rows between ranks */
for(n = 0; n < A->q; n++) {
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP2(m, 0), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP2(m, 0), tempkm);
}
/*
......
......@@ -160,9 +160,9 @@ void morse_pzlanhe(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *re
for(n = 0; n < A->nt; n++) {
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP2(m, 0), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP2(m, 0), tempkm);
}
/*
* Compute max norm of each segment of the final vector in the
......
......@@ -160,9 +160,9 @@ void morse_pzlansy(MORSE_enum norm, MORSE_enum uplo, MORSE_desc_t *A, double *re
for(n = 0; n < A->nt; n++) {
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP2(m, 0), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP2(m, 0), tempkm);
}
/*
* Compute max norm of each segment of the final vector in the
......
......@@ -128,9 +128,9 @@ void morse_pzlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
tempkn = n == A->nt-1 ? A->n-n*A->nb : A->nb;
MORSE_TASK_dgeadd(
&options,
1, tempkn, 1.0,
VECNORMS_STEP1(m, n), 1,
VECNORMS_STEP2(0, n), 1);
MorseNoTrans, 1, tempkn, A->mb,
1.0, VECNORMS_STEP1(m, n), 1,
1.0, VECNORMS_STEP2(0, n), 1);
}
}
}
......@@ -178,9 +178,9 @@ void morse_pzlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
for(m = n; m < A->mt; m++) {
MORSE_TASK_dgeadd(
&options,
1, tempkn, 1.0,
VECNORMS_STEP1(m, n), 1,
VECNORMS_STEP2(0, n), 1);
MorseNoTrans, 1, tempkn, A->mb,
1.0, VECNORMS_STEP1(m, n), 1,
1.0, VECNORMS_STEP2(0, n), 1);
}
}
}
......@@ -292,9 +292,9 @@ void morse_pzlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
for(n = m; n < A->nt; n++) {
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP2(m, 0), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP2(m, 0), tempkm);
}
}
......@@ -347,9 +347,9 @@ void morse_pzlantr(MORSE_enum norm, MORSE_enum uplo, MORSE_enum diag,
tempkm = m == A->mt-1 ? A->m-m*A->mb : A->mb;
MORSE_TASK_dgeadd(
&options,
tempkm, 1, 1.0,
VECNORMS_STEP1(m, n), tempkm,
VECNORMS_STEP2(m, 0), tempkm);
MorseNoTrans, tempkm, 1, A->mb,
1.0, VECNORMS_STEP1(m, n), tempkm,
1.0, VECNORMS_STEP2(m, 0), tempkm);
}
}
}
......
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file pztradd.c
*
* MORSE auxiliary routines
* MORSE is a software package provided by Univ. of Tennessee,
* Univ. of California Berkeley and Univ. of Colorado Denver
*
* @version 2.7.1
* @comment This file has been automatically generated
* from Plasma 2.5.0 for MORSE 1.0.0
* @author Emmanuel Agullo
* @author Mathieu Faverge
* @date 2011-11-03
* @precisions normal z -> s d c
*
**/
#include "control/common.h"
#define A(m, n) A, m, n
#define B(m, n) B, m, n
/***************************************************************************//**
* Parallel tile matrix-matrix multiplication - dynamic scheduling
**/
void morse_pztradd(MORSE_enum uplo, MORSE_enum trans,
MORSE_Complex64_t alpha, MORSE_desc_t *A,
MORSE_Complex64_t beta, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
{
MORSE_context_t *morse;
MORSE_option_t options;
int tempmm, tempnn, tempmn, tempnm;
int m, n;
int ldam, ldan, ldbm, ldbn;
morse = morse_context_self();
if (sequence->status != MORSE_SUCCESS)
return;
RUNTIME_options_init(&options, morse, sequence, request);
switch(uplo){
case MorseLower:
if (trans == MorseNoTrans) {
for (n = 0; n < min(B->mt,B->nt); n++) {
tempnm = n == B->mt-1 ? B->m-n*B->mb : B->mb;
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n);
ldbn = BLKLDD(B, n);
MORSE_TASK_ztradd(
&options,
uplo, trans, tempnm, tempnn, B->mb,
alpha, A(n, n), ldan,
beta, B(n, n), ldbn);
for (m = n+1; m < B->mt; m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(m, n), ldam,
beta, B(m, n), ldbm);
}
}
}
else {
for (n = 0; n < min(B->mt,B->nt); n++) {
tempnm = n == B->mt-1 ? B->m-n*B->mb : B->mb;
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n);
ldbn = BLKLDD(B, n);
MORSE_TASK_ztradd(
&options,
uplo, trans, tempnm, tempnn, B->mb,
alpha, A(n, n), ldan,
beta, B(n, n), ldbn);
for (m = n+1; m < B->mt; m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
ldbm = BLKLDD(B, m);
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(n, m), ldan,
beta, B(m, n), ldbm);
}
}
}
break;
case MorseUpper:
if (trans == MorseNoTrans) {
for (m = 0; m < min(B->mt,B->nt); m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
tempmn = m == B->nt-1 ? B->n-m*B->nb : B->nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
MORSE_TASK_ztradd(
&options,
uplo, trans, tempmm, tempmn, B->mb,
alpha, A(m, m), ldam,
beta, B(m, m), ldbm);
for (n = m+1; n < B->nt; n++) {
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(m, n), ldam,
beta, B(m, n), ldbm);
}
}
}
else {
for (m = 0; m < min(B->mt,B->nt); m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
tempmn = m == B->nt-1 ? B->n-m*B->nb : B->nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
MORSE_TASK_ztradd(
&options,
uplo, trans, tempmm, tempmn, B->mb,
alpha, A(m, m), ldam,
beta, B(m, m), ldbm);
for (n = m+1; n < B->nt; n++) {
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n);
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(n, m), ldan,
beta, B(m, n), ldbm);
}
}
}
break;
case MorseUpperLower:
default:
if (trans == MorseNoTrans) {
for (m = 0; m < B->mt; m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
for (n = 0; n < B->nt; n++) {
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(m, n), ldam,
beta, B(m, n), ldbm);
}
}
}
else {
for (m = 0; m < B->mt; m++) {
tempmm = m == B->mt-1 ? B->m-B->mb*m : B->nb;
ldam = BLKLDD(A, m);
ldbm = BLKLDD(B, m);
for (n = 0; n < B->nt; n++) {
tempnn = n == B->nt-1 ? B->n-n*B->nb : B->nb;
ldan = BLKLDD(A, n);
MORSE_TASK_zgeadd(
&options,
trans, tempmm, tempnn, B->mb,
alpha, A(n, m), ldan,
beta, B(m, n), ldbm);
}
}
}
}
}
This diff is collapsed.
......@@ -157,12 +157,12 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
morse_error("MORSE_zgemm", "illegal value of transB");
return -2;
}
if ( transA == MorseNoTrans ) {
if ( transA == MorseNoTrans ) {
Am = M; An = K;
} else {
Am = K; An = M;
}
if ( transB == MorseNoTrans ) {
if ( transB == MorseNoTrans ) {
Bm = K; Bn = N;
} else {
Bm = N; Bn = K;
......
This diff is collapsed.
......@@ -84,7 +84,6 @@ int morse_zshift(MORSE_context_t *morse, int m, int n, MORSE_Complex64_t *A,
/***************************************************************************//**
* Declarations of parallel functions (dynamic scheduling) - alphabetical order
**/
void morse_pzgeadd(MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzbarrier_tl2pnl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzbarrier_pnl2tl(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzbarrier_tl2row(MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
......@@ -134,6 +133,7 @@ void morse_pzsymm(MORSE_enum side, MORSE_enum uplo, MORSE_Complex64_t alpha, MOR
void morse_pzsyrk(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzsyr2k(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_Complex64_t beta, MORSE_desc_t *C, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pzsytrf(MORSE_enum uplo, MORSE_desc_t *A, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pztradd(MORSE_enum uplo, MORSE_enum trans, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_Complex64_t beta, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pztrmm(MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pztrsm(MORSE_enum side, MORSE_enum uplo, MORSE_enum transA, MORSE_enum diag, MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B, MORSE_sequence_t *sequence, MORSE_request_t *request);
void morse_pztrsmpl(MORSE_desc_t *A, MORSE_desc_t *B, MORSE_desc_t *L, int *IPIV, MORSE_sequence_t *sequence, MORSE_request_t *request);
......
......@@ -46,7 +46,7 @@ set(ZSRC
core_zhemm.c
core_zher2k.c
core_zherk.c
core_zhessq.c
core_zhessq.c
core_zlacpy.c
core_zlag2c.c
core_zlange.c
......@@ -69,6 +69,7 @@ set(ZSRC
core_zsyrk.c
core_zsyssq.c
core_zsytf2_nopiv.c
core_ztradd.c
core_ztrasm.c
core_ztrmm.c
core_ztrsm.c
......
......@@ -21,40 +21,55 @@
* from Plasma 2.5.0 for MORSE 1.0.0
* @author Mathieu Faverge
* @author Emmanuel Agullo
* @author Cedric Castagnede
* @date 2010-11-15
* @date 2015-11-03
* @precisions normal z -> c d s
*
**/
#include "coreblas/include/coreblas.h"
/***************************************************************************//**
/**
******************************************************************************
*
* @ingroup CORE_MORSE_Complex64_t
*
* CORE_zgeadd adds to matrices together.
* CORE_zgeadd adds to matrices together as in PBLAS pzgeadd.
*
* B <- alpha * op(A) + beta * B,
*
* B <- alpha * A + B
* where op(X) = X, X', or conj(X')
*
*******************************************************************************
*
* @param[in] trans
* Specifies whether the matrix A is non-transposed, transposed, or
* conjugate transposed
* = MorseNoTrans: op(A) = A
* = MorseTrans: op(A) = A'
* = MorseConjTrans: op(A) = conj(A')
*
* @param[in] M
* Number of rows of the matrices A and B.
* Number of rows of the matrices op(A) and B.
*
* @param[in] N
* Number of columns of the matrices A and B.
* Number of columns of the matrices op(A) and B.
*
* @param[in] alpha
* Scalar factor of A.
*
* @param[in] A
* Matrix of size LDA-by-N.
* Matrix of size LDA-by-N, if trans = MorseNoTrans, LDA-by-M
* otherwise.
*
* @param[in] LDA
* Leading dimension of the array A. LDA >= max(1,M)
* Leading dimension of the array A. LDA >= max(1,k), with k=M, if
* trans = MorseNoTrans, and k=N otherwise.
*
* @param[in] beta
* Scalar factor of B.
*
* @param[in,out] B
* Matrix of size LDB-by-N.
* On exit, B = alpha * op(A) + beta * B
*
* @param[in] LDB
* Leading dimension of the array B. LDB >= max(1,M)
......@@ -66,39 +81,75 @@
* \retval <0 if -i, the i-th argument had an illegal value
*
******************************************************************************/
int CORE_zgeadd(int M, int N, MORSE_Complex64_t alpha,
#if defined(MORSE_HAVE_WEAK)
#pragma weak CORE_zgeadd = PCORE_zgeadd
#define CORE_zgeadd PCORE_zgeadd
#endif
int CORE_zgeadd(MORSE_enum trans, int M, int N,
MORSE_Complex64_t alpha,
const MORSE_Complex64_t *A, int LDA,
MORSE_Complex64_t beta,
MORSE_Complex64_t *B, int LDB)
{
int j;
int i, j;
if (M < 0) {
coreblas_error(1, "Illegal value of M");
if ((trans != MorseNoTrans) &&
(trans != MorseTrans) &&
(trans != MorseConjTrans))
{
coreblas_error(1, "illegal value of trans");
return -1;
}
if (N < 0) {
coreblas_error(2, "Illegal value of N");
if (M < 0) {
coreblas_error(2, "Illegal value of M");
return -2;
}
if ( (LDA < max(1,M)) && (M > 0) ) {
coreblas_error(5, "Illegal value of LDA");
return -5;
if (N < 0) {
coreblas_error(3, "Illegal value of N");
return -3;
}
if ( ((trans == MorseNoTrans) && (LDA < max(1,M)) && (M > 0)) ||
((trans != MorseNoTrans) && (LDA < max(1,N)) && (N > 0)) )
{
coreblas_error(6, "Illegal value of LDA");
return -6;
}
if ( (LDB < max(1,M)) && (M > 0) ) {
coreblas_error(7, "Illegal value of LDB");
return -7;
coreblas_error(8, "Illegal value of LDB");
return -8;
}
if (M == LDA && M == LDB)
cblas_zaxpy(M*N, CBLAS_SADDR(alpha), A, 1, B, 1);
else {
for (j = 0; j < N; j++)
cblas_zaxpy(M, CBLAS_SADDR(alpha), A + j*LDA, 1, B + j*LDB, 1);
}
switch( trans ) {
#if defined(PRECISION_z) || defined(PRECISION_c)
case MorseConjTrans:
for (j=0; j<N; j++, A++) {
for(i=0; i<M; i++, B++) {
*B = beta * (*B) + alpha * conj(A[LDA*i]);
}
B += LDB-M;
}
break;
#endif /* defined(PRECISION_z) || defined(PRECISION_c) */
case MorseTrans:
for (j=0; j<N; j++, A++) {
for(i=0; i<M; i++, B++) {
*B = beta * (*B) + alpha * A[LDA*i];
}
B += LDB-M;
}
break;
case MorseNoTrans:
default:
for (j=0; j<N; j++) {
for(i=0; i<M; i++, B++, A++) {
*B = beta * (*B) + alpha * (*A);
}
A += LDA-M;
B += LDB-M;
}
}
return MORSE_SUCCESS;
}
/**
*
* @copyright (c) 2009-2014 The University of Tennessee and The University
* of Tennessee Research Foundation.
* All rights reserved.
* @copyright (c) 2012-2014 Inria. All rights reserved.
* @copyright (c) 2012-2014 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria, Univ. Bordeaux. All rights reserved.
*
**/
/**
*
* @file core_ztradd.c
*
* 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.5.0
* @comment This file has been automatically generated
* from Plasma 2.5.0 for MORSE 1.0.0
* @author Mathieu Faverge
* @date 2015-11-03
* @precisions normal z -> c d s
*
**/
#include "coreblas/include/coreblas.h"
/**
******************************************************************************
*
* @ingroup CORE_MORSE_Complex64_t
*
* CORE_ztradd adds to matrices together as in PBLAS pztradd.
*
* B <- alpha * op(A) + beta * B,
*
* where op(X) = X, X', or conj(X')
*
*******************************************************************************
*
* @param[in] uplo
* Specifies the shape of A and B matrices:
* = MorseUpperLower: A and B are general matrices.
* = MorseUpper: op(A) and B are upper trapezoidal matrices.
* = MorseLower: op(A) and B are lower trapezoidal matrices.
*
* @param[in] trans
* Specifies whether the matrix A is non-transposed, transposed, or
* conjugate transposed
* = MorseNoTrans: op(A) = A
* = MorseTrans: op(A) = A'
* = MorseConjTrans: op(A) = conj(A')
*
* @param[in] M
* Number of rows of the matrices A and B.
*
* @param[in] N
* Number of columns of the matrices A and B.
*
* @param[in] alpha
* Scalar factor of A.
*
* @param[in] A
* Matrix of size LDA-by-N.
*
* @param[in] LDA
* Leading dimension of the array A. LDA >= max(1,M)
*
* @param[in] beta
* Scalar factor of B.
*
* @param[in,out] B
* Matrix of size LDB-by-N.
* On exit, B = alpha * op(A) + beta * B
*
* @param[in] LDB
* Leading dimension of the array B. LDB >= max(1,M)
*
*******************************************************************************
*
* @return
* \retval MORSE_SUCCESS successful exit
* \retval <0 if -i, the i-th argument had an illegal value
*
******************************************************************************/
#if defined(MORSE_HAVE_WEAK)
#pragma weak CORE_ztradd = PCORE_ztradd
#define CORE_ztradd PCORE_ztradd
#define CORE_zgeadd PCORE_zgeadd