Commit 0aaa42cc authored by BOUCHERIE Raphael's avatar BOUCHERIE Raphael

fixed alloc of diag

parent b8a9bf6d
...@@ -25,12 +25,11 @@ ...@@ -25,12 +25,11 @@
**/ **/
#include "control/common.h" #include "control/common.h"
void morse_pzgebrd_ge2gb(MORSE_desc_t A, MORSE_desc_t T, void morse_pzgebrd_ge2gb(MORSE_desc_t A, MORSE_desc_t T, MORSE_desc_t D,
MORSE_sequence_t *sequence, MORSE_request_t *request) MORSE_sequence_t *sequence, MORSE_request_t *request)
{ {
int k; int k;
int tempkm, tempkn; int tempkm, tempkn;
MORSE_desc_t D;
if (A.m >= A.n){ if (A.m >= A.n){
for (k = 0; k < A.nt; k++) { for (k = 0; k < A.nt; k++) {
tempkm = k == A.mt-1 ? A.m-k*A.mb : A.mb; tempkm = k == A.mt-1 ? A.m-k*A.mb : A.mb;
......
...@@ -460,9 +460,14 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -460,9 +460,14 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
NB = descA.mb; NB = descA.mb;
LDAB = NB + 1; LDAB = NB + 1;
uplo = M >= N ? MorseUpper : MorseLower; uplo = M >= N ? MorseUpper : MorseLower;
#if defined(CHAMELEON_COPY_DIAG)
{
morse_zdesc_alloc(D, A->mb, A->nb, A->m, A->n, 0, 0, A->m, A->n, );
Dptr = &D;
}
#endif
/* Reduction to band */ /* Reduction to band */
morse_pzgebrd_ge2gb( descA, descT, morse_pzgebrd_ge2gb( descA, descT, D,
sequence, request ); sequence, request );
/* Allocate band structure */ /* Allocate band structure */
...@@ -552,14 +557,6 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -552,14 +557,6 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
subT = NULL; subT = NULL;
subUVT = NULL; subUVT = NULL;
if ( jobu != MorseNoVec ) { if ( jobu != MorseNoVec ) {
#if defined(CHAMELEON_COPY_DIAG)
{
int n = chameleon_min(A->mt, A->nt) * A->nb;
morse_zdesc_alloc(D, A->mb, A->nb, A->m, n, 0, 0, A->m, n, );
Dptr = &D;
}
#endif
if ( M < N ){ if ( M < N ){
subA = morse_desc_submatrix(&descA, descA.mb, 0, descA.m-descA.mb, descA.n-descA.nb); subA = morse_desc_submatrix(&descA, descA.mb, 0, descA.m-descA.mb, descA.n-descA.nb);
subUVT = morse_desc_submatrix(&descU, descU.mb, 0, descU.m-descU.mb, descU.n); subUVT = morse_desc_submatrix(&descU, descU.mb, 0, descU.m-descU.mb, descU.n);
...@@ -576,14 +573,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt, ...@@ -576,14 +573,7 @@ int MORSE_zgesvd_Tile_Async(MORSE_enum jobu, MORSE_enum jobvt,
} }
if ( jobvt != MorseNoVec ) { if ( jobvt != MorseNoVec ) {
#if defined(CHAMELEON_COPY_DIAG) if ( M < N ){
{
int m = chameleon_min(A->mt, A->nt) * A->mb;
morse_zdesc_alloc(D, A->mb, A->nb, m, A->n, 0, 0, m, A->n, );
Dptr = &D;
}
#endif
if ( M < N ){
morse_pzunmlq( MorseRight, MorseNoTrans, morse_pzunmlq( MorseRight, MorseNoTrans,
&descA, &descVT, &descT, Dptr, &descA, &descVT, &descT, Dptr,
sequence, request ); sequence, request );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment