Commit dc4b62db authored by Mathieu Faverge's avatar Mathieu Faverge

Check that all flushes are now in z*.c files with a script

parent 83d965ee
......@@ -124,7 +124,7 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescOutput, uplo,
......@@ -137,13 +137,13 @@ int MORSE_zbuild( MORSE_enum uplo, int M, int N,
morse_ztile2lap( morse, &descAl, &descAt,
MorseDescOutput, uplo, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -203,13 +203,15 @@ int MORSE_zbuild_Tile( MORSE_enum uplo, MORSE_desc_t *A,
morse_fatal_error("MORSE_zbuild_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zbuild_Tile_Async( uplo, A, user_data, user_build_callback, sequence, &request );
morse_sequence_wait(morse, sequence);
MORSE_Desc_Flush( A, sequence );
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......
......@@ -91,9 +91,9 @@
* @sa MORSE_sgeadd
*
******************************************************************************/
int MORSE_zgeadd(MORSE_enum trans, int M, int N,
MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA,
MORSE_Complex64_t beta, MORSE_Complex64_t *B, int LDB)
int MORSE_zgeadd( MORSE_enum trans, int M, int N,
MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA,
MORSE_Complex64_t beta, MORSE_Complex64_t *B, int LDB )
{
int NB;
int Am, An;
......@@ -152,7 +152,7 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N,
/* Set MT & NT & KT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInput, MorseUpperLower,
......@@ -169,14 +169,14 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N,
morse_ztile2lap( morse, &descBl, &descBt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -228,9 +228,9 @@ int MORSE_zgeadd(MORSE_enum trans, int M, int N,
* @sa MORSE_sgeadd_Tile
*
******************************************************************************/
int MORSE_zgeadd_Tile(MORSE_enum trans,
MORSE_Complex64_t alpha, MORSE_desc_t *A,
MORSE_Complex64_t beta, MORSE_desc_t *B)
int MORSE_zgeadd_Tile( MORSE_enum trans,
MORSE_Complex64_t alpha, MORSE_desc_t *A,
MORSE_Complex64_t beta, MORSE_desc_t *B )
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -242,15 +242,16 @@ int MORSE_zgeadd_Tile(MORSE_enum trans,
morse_fatal_error("MORSE_zgeadd_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgeadd_Tile_Async( trans, alpha, A, beta, B, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( B, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -283,10 +284,10 @@ int MORSE_zgeadd_Tile(MORSE_enum trans,
* @sa MORSE_sgeadd_Tile_Async
*
******************************************************************************/
int MORSE_zgeadd_Tile_Async(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)
int MORSE_zgeadd_Tile_Async( 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;
int M, N;
......@@ -361,9 +362,11 @@ int MORSE_zgeadd_Tile_Async(MORSE_enum trans,
N = B->n;
/* Quick return */
if (M == 0 || N == 0 ||
((alpha == (MORSE_Complex64_t)0.0) && beta == (MORSE_Complex64_t)1.0))
if ( (M == 0) || (N == 0) ||
((alpha == (MORSE_Complex64_t)0.0) && (beta == (MORSE_Complex64_t)1.0)) )
{
return MORSE_SUCCESS;
}
morse_pztradd( MorseUpperLower, trans, alpha, A, beta, B, sequence, request );
......
......@@ -75,9 +75,9 @@
* @sa MORSE_zgelqs
*
******************************************************************************/
int MORSE_zgelqf(int M, int N,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT)
int MORSE_zgelqf( int M, int N,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT )
{
int NB;
int status;
......@@ -120,7 +120,7 @@ int MORSE_zgelqf(int M, int N,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInout, MorseUpperLower,
......@@ -133,13 +133,13 @@ int MORSE_zgelqf(int M, int N,
morse_ztile2lap( morse, &descAl, &descAt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -194,14 +194,16 @@ int MORSE_zgelqf_Tile( MORSE_desc_t *A, MORSE_desc_t *T )
morse_fatal_error("MORSE_zgelqf_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgelqf_Tile_Async( A, T, sequence, &request );
MORSE_Desc_Flush( A, sequence );
morse_sequence_wait(morse, sequence);
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( T, sequence );
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -234,8 +236,8 @@ int MORSE_zgelqf_Tile( MORSE_desc_t *A, MORSE_desc_t *T )
* @sa MORSE_zgelqs_Tile_Async
*
******************************************************************************/
int MORSE_zgelqf_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgelqf_Tile_Async( MORSE_desc_t *A, MORSE_desc_t *T,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_context_t *morse;
MORSE_desc_t D, *Dptr = NULL;
......
......@@ -72,9 +72,9 @@
* @sa MORSE_zgelqs
*
******************************************************************************/
int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT)
int MORSE_zgelqf_param( const libhqr_tree_t *qrtree, int M, int N,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT )
{
int NB;
int status;
......@@ -117,7 +117,7 @@ int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInout, MorseUpperLower,
......@@ -130,13 +130,13 @@ int MORSE_zgelqf_param(const libhqr_tree_t *qrtree, int M, int N,
morse_ztile2lap( morse, &descAl, &descAt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -191,14 +191,17 @@ int MORSE_zgelqf_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE
morse_fatal_error("MORSE_zgelqf_param_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgelqf_param_Tile_Async( qrtree, A, TS, TT, sequence, &request );
MORSE_Desc_Flush( A, sequence );
morse_sequence_wait(morse, sequence);
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( TS, sequence );
MORSE_Desc_Flush( TT, sequence );
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -231,8 +234,8 @@ int MORSE_zgelqf_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE
* @sa MORSE_zgelqs_Tile_Async
*
******************************************************************************/
int MORSE_zgelqf_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgelqf_param_Tile_Async( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_context_t *morse;
MORSE_desc_t D, *Dptr = NULL;
......
......@@ -81,10 +81,10 @@
* @sa MORSE_zgelqf
*
******************************************************************************/
int MORSE_zgelqs(int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT,
MORSE_Complex64_t *B, int LDB)
int MORSE_zgelqs( int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT,
MORSE_Complex64_t *B, int LDB )
{
int NB;
int status;
......@@ -136,7 +136,7 @@ int MORSE_zgelqs(int M, int N, int NRHS,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInput, MorseUpperLower,
......@@ -153,14 +153,14 @@ int MORSE_zgelqs(int M, int N, int NRHS,
morse_ztile2lap( morse, &descBl, &descBt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -215,15 +215,17 @@ int MORSE_zgelqs_Tile( MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B )
morse_fatal_error("MORSE_zgelqs_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgelqs_Tile_Async( A, T, B, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( T, sequence );
MORSE_Desc_Flush( B, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -257,8 +259,8 @@ int MORSE_zgelqs_Tile( MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B )
* @sa MORSE_zgelqf_Tile_Async
*
******************************************************************************/
int MORSE_zgelqs_Tile_Async(MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgelqs_Tile_Async( MORSE_desc_t *A, MORSE_desc_t *T, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_desc_t *subB;
MORSE_desc_t *subA;
......
......@@ -83,10 +83,10 @@
* @sa MORSE_zgelqf
*
******************************************************************************/
int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT,
MORSE_Complex64_t *B, int LDB)
int MORSE_zgelqs_param( const libhqr_tree_t *qrtree, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT,
MORSE_Complex64_t *B, int LDB )
{
int NB;
int status;
......@@ -138,7 +138,7 @@ int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInput, MorseUpperLower,
......@@ -155,14 +155,14 @@ int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
morse_ztile2lap( morse, &descBl, &descBt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -208,7 +208,8 @@ int MORSE_zgelqs_param(const libhqr_tree_t *qrtree, int M, int N, int NRHS,
* @sa MORSE_zgelqf_Tile
*
******************************************************************************/
int MORSE_zgelqs_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B )
int MORSE_zgelqs_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A,
MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B )
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -220,15 +221,18 @@ int MORSE_zgelqs_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE
morse_fatal_error("MORSE_zgelqs_param_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgelqs_param_Tile_Async( qrtree, A, TS, TT, B, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( TS, sequence );
MORSE_Desc_Flush( TT, sequence );
MORSE_Desc_Flush( B, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -262,8 +266,8 @@ int MORSE_zgelqs_param_Tile( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE
* @sa MORSE_zgelqf_Tile_Async
*
******************************************************************************/
int MORSE_zgelqs_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgelqs_param_Tile_Async( const libhqr_tree_t *qrtree, MORSE_desc_t *A, MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_desc_t *subB;
MORSE_desc_t *subA;
......
......@@ -107,10 +107,10 @@
* @sa MORSE_sgels
*
******************************************************************************/
int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT,
MORSE_Complex64_t *B, int LDB)
int MORSE_zgels( MORSE_enum trans, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descT,
MORSE_Complex64_t *B, int LDB )
{
int i, j;
int NB;
......@@ -170,7 +170,7 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
if ( M >= N ) {
......@@ -195,14 +195,14 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
morse_ztile2lap( morse, &descBl, &descBt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -260,8 +260,8 @@ int MORSE_zgels(MORSE_enum trans, int M, int N, int NRHS,
* @sa MORSE_sgels_Tile
*
******************************************************************************/
int MORSE_zgels_Tile(MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *T, MORSE_desc_t *B)
int MORSE_zgels_Tile( MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *T, MORSE_desc_t *B )
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -273,15 +273,17 @@ int MORSE_zgels_Tile(MORSE_enum trans, MORSE_desc_t *A,
morse_fatal_error("MORSE_zgels_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgels_Tile_Async( trans, A, T, B, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( T, sequence );
MORSE_Desc_Flush( B, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -314,9 +316,9 @@ int MORSE_zgels_Tile(MORSE_enum trans, MORSE_desc_t *A,
* @sa MORSE_sgels_Tile_Async
*
******************************************************************************/
int MORSE_zgels_Tile_Async(MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *T, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgels_Tile_Async( MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *T, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_desc_t *subA;
MORSE_desc_t *subB;
......
......@@ -109,10 +109,10 @@
* @sa MORSE_sgels
*
******************************************************************************/
int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT,
MORSE_Complex64_t *B, int LDB)
int MORSE_zgels_param( const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int N, int NRHS,
MORSE_Complex64_t *A, int LDA,
MORSE_desc_t *descTS, MORSE_desc_t *descTT,
MORSE_Complex64_t *B, int LDB )
{
int i, j;
int NB;
......@@ -172,7 +172,7 @@ int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int
/* Set NT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
if ( M >= N ) {
......@@ -196,14 +196,14 @@ int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int
morse_ztile2lap( morse, &descBl, &descBt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
morse_ztile2lap_cleanup( morse, &descBl, &descBt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -264,8 +264,8 @@ int MORSE_zgels_param(const libhqr_tree_t *qrtree, MORSE_enum trans, int M, int
* @sa MORSE_sgels_Tile
*
******************************************************************************/
int MORSE_zgels_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B)
int MORSE_zgels_param_Tile( const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B )
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -277,15 +277,18 @@ int MORSE_zgels_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_
morse_fatal_error("MORSE_zgels_param_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgels_param_Tile_Async( qrtree, trans, A, TS, TT, B, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( TS, sequence );
MORSE_Desc_Flush( TT, sequence );
MORSE_Desc_Flush( B, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -318,9 +321,9 @@ int MORSE_zgels_param_Tile(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_
* @sa MORSE_sgels_Tile_Async
*
******************************************************************************/
int MORSE_zgels_param_Tile_Async(const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request)
int MORSE_zgels_param_Tile_Async( const libhqr_tree_t *qrtree, MORSE_enum trans, MORSE_desc_t *A,
MORSE_desc_t *TS, MORSE_desc_t *TT, MORSE_desc_t *B,
MORSE_sequence_t *sequence, MORSE_request_t *request )
{
MORSE_desc_t *subA;
MORSE_desc_t *subB;
......
......@@ -130,10 +130,10 @@
* @sa MORSE_sgemm
*
******************************************************************************/
int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA,
MORSE_Complex64_t *B, int LDB,
MORSE_Complex64_t beta, MORSE_Complex64_t *C, int LDC)
int MORSE_zgemm( MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
MORSE_Complex64_t alpha, MORSE_Complex64_t *A, int LDA,
MORSE_Complex64_t *B, int LDB,
MORSE_Complex64_t beta, MORSE_Complex64_t *C, int LDC )
{
int NB;
int Am, An, Bm, Bn;
......@@ -210,7 +210,7 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
/* Set MT & NT & KT */
NB = MORSE_NB;
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
/* Submit the matrix conversion */
morse_zlap2tile( morse, &descAl, &descAt, MorseDescInput, MorseUpperLower,
......@@ -231,7 +231,7 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
morse_ztile2lap( morse, &descCl, &descCt,
MorseDescInout, MorseUpperLower, sequence, &request );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
/* Cleanup the temporary data */
morse_ztile2lap_cleanup( morse, &descAl, &descAt );
......@@ -239,7 +239,7 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
morse_ztile2lap_cleanup( morse, &descCl, &descCt );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -300,9 +300,9 @@ int MORSE_zgemm(MORSE_enum transA, MORSE_enum transB, int M, int N, int K,
* @sa MORSE_sgemm_Tile
*
******************************************************************************/
int MORSE_zgemm_Tile(MORSE_enum transA, MORSE_enum transB,
MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B,
MORSE_Complex64_t beta, MORSE_desc_t *C)
int MORSE_zgemm_Tile( MORSE_enum transA, MORSE_enum transB,
MORSE_Complex64_t alpha, MORSE_desc_t *A, MORSE_desc_t *B,
MORSE_Complex64_t beta, MORSE_desc_t *C )
{
MORSE_context_t *morse;
MORSE_sequence_t *sequence = NULL;
......@@ -314,16 +314,17 @@ int MORSE_zgemm_Tile(MORSE_enum transA, MORSE_enum transB,
morse_fatal_error("MORSE_zgemm_Tile", "MORSE not initialized");
return MORSE_ERR_NOT_INITIALIZED;
}
morse_sequence_create(morse, &sequence);
morse_sequence_create( morse, &sequence );
MORSE_zgemm_Tile_Async( transA, transB, alpha, A, B, beta, C, sequence, &request );
MORSE_Desc_Flush( A, sequence );
MORSE_Desc_Flush( B, sequence );
MORSE_Desc_Flush( C, sequence );
morse_sequence_wait(morse, sequence);
morse_sequence_wait( morse, sequence );
status = sequence->status;
morse_sequence_destroy(morse, sequence);
morse_sequence_destroy( morse, sequence );
return status;
}
......@@ -355,10 +356,10 @@ int MORSE_zgemm_Tile(MORSE_enum transA, MORSE_enum transB,
* @sa MORSE_sgemm_Tile_Async
*
******************************************************************************/
int MORSE_zgemm_Tile_Async(MORSE_enum transA, MORSE_enum transB,
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)
int MORSE_zgemm_Tile_Async( MORSE_enum transA, MORSE_enum transB,
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 )
{
MORSE_context_t *morse;
int M, N, K;
......@@ -459,9 +460,11 @@ int MORSE_zgemm_Tile_Async(MORSE_enum transA, MORSE_enum transB,
K = An;
/* Quick return */
if (M == 0 || N == 0 ||