diff --git a/compute/ztile.c b/compute/ztile.c index 02af3dfb8e41ff40fa207662203be81491760e89..bf7b97794d200afe8d3a8cb6ac4154347af3840b 100644 --- a/compute/ztile.c +++ b/compute/ztile.c @@ -30,6 +30,12 @@ * ******************************************************************************* * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * * @param[in] Af77 * LAPACK matrix. * @@ -55,7 +61,7 @@ * @sa CHAMELEON_sLapack_to_Tile * */ -int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) +int CHAMELEON_zLapack_to_Tile( cham_uplo_t uplo, CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ) { CHAM_context_t *chamctxt; RUNTIME_sequence_t *sequence = NULL; @@ -87,7 +93,7 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t /* Start the computation */ chameleon_sequence_create( chamctxt, &sequence ); - chameleon_pzlacpy( ChamUpperLower, B, A, sequence, &request ); + chameleon_pzlacpy( uplo, B, A, sequence, &request ); CHAMELEON_Desc_Flush( B, sequence ); CHAMELEON_Desc_Flush( A, sequence ); @@ -111,6 +117,12 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t * ******************************************************************************* * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * * @param[in] A * Descriptor of the CHAMELEON matrix in tile layout. * @@ -136,7 +148,7 @@ int CHAMELEON_zLapack_to_Tile( CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t * @sa CHAMELEON_sTile_to_Lapack * */ -int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) +int CHAMELEON_zTile_to_Lapack( cham_uplo_t uplo, CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ) { CHAM_context_t *chamctxt; RUNTIME_sequence_t *sequence = NULL; @@ -167,7 +179,7 @@ int CHAMELEON_zTile_to_Lapack( CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int /* Start the computation */ chameleon_sequence_create( chamctxt, &sequence ); - chameleon_pzlacpy( ChamUpperLower, A, B, sequence, &request ); + chameleon_pzlacpy( uplo, A, B, sequence, &request ); CHAMELEON_Desc_Flush( A, sequence ); CHAMELEON_Desc_Flush( B, sequence ); diff --git a/control/chameleon_f77.c b/control/chameleon_f77.c index 7de2fe850557b483ab887d19cd95b951d572b34e..1dddefaf8053ed96c1643c92bfc2b63ea246704d 100644 --- a/control/chameleon_f77.c +++ b/control/chameleon_f77.c @@ -96,11 +96,11 @@ extern "C" { /** * FORTRAN API - conversion from LAPACK F77 matrix layout to tile layout */ - void CHAMELEON_LAPACK_TO_TILE(intptr_t *Af77, int *LDA, intptr_t *A, int *INFO) - { *INFO = CHAMELEON_Lapack_to_Tile( (void *)Af77, *LDA, (CHAM_desc_t *)(*A)); } + void CHAMELEON_LAPACK_TO_TILE(cham_uplo_t *uplo, intptr_t *Af77, int *LDA, intptr_t *A, int *INFO) + { *INFO = CHAMELEON_Lapack_to_Tile(*uplo, (void *)Af77, *LDA, (CHAM_desc_t *)(*A)); } - void CHAMELEON_TILE_TO_LAPACK(intptr_t *A, intptr_t *Af77, int *LDA, int *INFO) - { *INFO = CHAMELEON_Tile_to_Lapack((CHAM_desc_t *)(*A), (void *)Af77, *LDA); } + void CHAMELEON_TILE_TO_LAPACK(cham_uplo_t *uplo, intptr_t *A, intptr_t *Af77, int *LDA, int *INFO) + { *INFO = CHAMELEON_Tile_to_Lapack(*uplo, (CHAM_desc_t *)(*A), (void *)Af77, *LDA); } #ifdef __cplusplus } diff --git a/control/chameleon_f90.f90 b/control/chameleon_f90.f90 index db2b926fc274cb9fcace33d9478eed42e3e31042..51e8ed1354faff4c90b7c100925cb18eeac412fc 100644 --- a/control/chameleon_f90.f90 +++ b/control/chameleon_f90.f90 @@ -385,85 +385,93 @@ module chameleon end subroutine chameleon_disable ! overloaded: single precision - subroutine chameleon_lapack_to_tile_s(a_lpk,lda,a_pma,info) + subroutine chameleon_lapack_to_tile_s(uplo,a_lpk,lda,a_pma,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda real(kind=sp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(out) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_lapack_to_tile_c(c_loc(a_lpk),lda,a_pma) + info = chameleon_lapack_to_tile_c(uplo,c_loc(a_lpk),lda,a_pma) end subroutine chameleon_lapack_to_tile_s ! overloaded: double precision - subroutine chameleon_lapack_to_tile_d(a_lpk,lda,a_pma,info) + subroutine chameleon_lapack_to_tile_d(uplo,a_lpk,lda,a_pma,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda real(kind=dp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(out) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_lapack_to_tile_c(c_loc(a_lpk),lda,a_pma) + info = chameleon_lapack_to_tile_c(uplo,c_loc(a_lpk),lda,a_pma) end subroutine chameleon_lapack_to_tile_d ! overloaded: single precision complex - subroutine chameleon_lapack_to_tile_cpx(a_lpk,lda,a_pma,info) + subroutine chameleon_lapack_to_tile_cpx(uplo,a_lpk,lda,a_pma,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda complex(kind=sp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(out) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_lapack_to_tile_c(c_loc(a_lpk),lda,a_pma) + info = chameleon_lapack_to_tile_c(uplo,c_loc(a_lpk),lda,a_pma) end subroutine chameleon_lapack_to_tile_cpx ! overloaded: double precision complex - subroutine chameleon_lapack_to_tile_z(a_lpk,lda,a_pma,info) + subroutine chameleon_lapack_to_tile_z(uplo,a_lpk,lda,a_pma,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda complex(kind=dp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(out) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_lapack_to_tile_c(c_loc(a_lpk),lda,a_pma) + info = chameleon_lapack_to_tile_c(uplo,c_loc(a_lpk),lda,a_pma) end subroutine chameleon_lapack_to_tile_z ! overloaded: single precision - subroutine chameleon_tile_to_lapack_s(a_pma,a_lpk,lda,info) + subroutine chameleon_tile_to_lapack_s(uplo,a_pma,a_lpk,lda,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda real(kind=sp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(in) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_tile_to_lapack_c(a_pma,c_loc(a_lpk),lda) + info = chameleon_tile_to_lapack_c(uplo,a_pma,c_loc(a_lpk),lda) end subroutine chameleon_tile_to_lapack_s ! overloaded: double precision - subroutine chameleon_tile_to_lapack_d(a_pma,a_lpk,lda,info) + subroutine chameleon_tile_to_lapack_d(uplo,a_pma,a_lpk,lda,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda real(kind=dp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(in) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_tile_to_lapack_c(a_pma,c_loc(a_lpk),lda) + info = chameleon_tile_to_lapack_c(uplo,a_pma,c_loc(a_lpk),lda) end subroutine chameleon_tile_to_lapack_d ! overloaded: single precision complex - subroutine chameleon_tile_to_lapack_cpx(a_pma,a_lpk,lda,info) + subroutine chameleon_tile_to_lapack_cpx(uplo,a_pma,a_lpk,lda,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda complex(kind=sp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(in) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_tile_to_lapack_c(a_pma,c_loc(a_lpk),lda) + info = chameleon_tile_to_lapack_c(uplo,a_pma,c_loc(a_lpk),lda) end subroutine chameleon_tile_to_lapack_cpx ! overloaded: double precision complex - subroutine chameleon_tile_to_lapack_z(a_pma,a_lpk,lda,info) + subroutine chameleon_tile_to_lapack_z(uplo,a_pma,a_lpk,lda,info) use iso_c_binding implicit none + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: lda complex(kind=dp), intent(out), target :: a_lpk(lda,*) type(c_ptr), intent(in) :: a_pma integer(kind=c_int), intent(out) :: info - info = chameleon_tile_to_lapack_c(a_pma,c_loc(a_lpk),lda) + info = chameleon_tile_to_lapack_c(uplo,a_pma,c_loc(a_lpk),lda) end subroutine chameleon_tile_to_lapack_z ! overloaded: single precision diff --git a/control/chameleon_zf77.c b/control/chameleon_zf77.c index 6162950adc36ea39555323e6eab694c8e15b640b..6616717fd0931bae6abb335900cbba7a1cbcc4b9 100644 --- a/control/chameleon_zf77.c +++ b/control/chameleon_zf77.c @@ -280,11 +280,11 @@ /** * FORTRAN API - math functions (simple interface) */ -void CHAMELEON_ZLAPACK_TO_TILE(CHAMELEON_Complex64_t *Af77, int *LDA, CHAM_desc_t *A, int *info) -{ *info = CHAMELEON_zLapack_to_Tile(Af77, *LDA, A); } +void CHAMELEON_ZLAPACK_TO_TILE(cham_uplo_t *uplo, CHAMELEON_Complex64_t *Af77, int *LDA, CHAM_desc_t *A, int *info) +{ *info = CHAMELEON_zLapack_to_Tile(*uplo, Af77, *LDA, A); } -void CHAMELEON_ZTILE_TO_LAPACK(CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int *LDA, int *info) -{ *info = CHAMELEON_zTile_to_Lapack(A, Af77, *LDA); } +void CHAMELEON_ZTILE_TO_LAPACK(cham_uplo_t *uplo, CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int *LDA, int *info) +{ *info = CHAMELEON_zTile_to_Lapack(*uplo, A, Af77, *LDA); } //void CHAMELEON_ZGEBRD(int *M, int *N, CHAMELEON_Complex64_t *A, int *LDA, double *D, double *E, CHAM_desc_t **descT, int *info) //{ *info = CHAMELEON_zgebrd(*M, *N, A, *LDA, D, E, *descT); } diff --git a/control/chameleon_zf90.F90 b/control/chameleon_zf90.F90 index 447c82a9723c9a3fef4d0cfbe0c778f0c278c88b..f9409a78dc9c481bfab22e9db92afeb95f2a5e08 100644 --- a/control/chameleon_zf90.F90 +++ b/control/chameleon_zf90.F90 @@ -92,6 +92,7 @@ module chameleon_z use iso_c_binding implicit none integer(kind=c_int) :: CHAMELEON_zLapack_to_Tile_c + integer(kind=c_int), value :: uplo type(c_ptr), value :: Af77 integer(kind=c_int), value :: LDA type(c_ptr), value :: A @@ -104,6 +105,7 @@ module chameleon_z use iso_c_binding implicit none integer(kind=c_int) :: CHAMELEON_zTile_to_Lapack_c + integer(kind=c_int), value :: uplo type(c_ptr), value :: A type(c_ptr), value :: Af77 integer(kind=c_int), value :: LDA @@ -5461,24 +5463,26 @@ contains info = CHAMELEON_Alloc_Workspace_zgetri_Tile_Async_c(A,W) end subroutine CHAMELEON_Alloc_Workspace_zgetri_Tile_Async - subroutine CHAMELEON_zLapack_to_Tile(Af77,LDA,A,info) + subroutine CHAMELEON_zLapack_to_Tile(uplo,Af77,LDA,A,info) use iso_c_binding implicit none - integer(kind=c_int), intent(out) :: info + integer(kind=c_int), value :: uplo + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: LDA complex(kind=c_double_complex), intent(in), target :: Af77(LDA,*) type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran - info = CHAMELEON_zLapack_to_Tile_c(c_loc(Af77),LDA,A) + info = CHAMELEON_zLapack_to_Tile_c(uplo,c_loc(Af77),LDA,A) end subroutine CHAMELEON_zLapack_to_Tile - subroutine CHAMELEON_zTile_to_Lapack(A,Af77,LDA,info) + subroutine CHAMELEON_zTile_to_Lapack(uplo,A,Af77,LDA,info) use iso_c_binding implicit none integer(kind=c_int), intent(out) :: info + integer(kind=c_int), intent(in) :: uplo integer(kind=c_int), intent(in) :: LDA complex(kind=c_double_complex), intent(out), target :: Af77(LDA,*) type(c_ptr), value :: A ! Arg managed by CHAMELEON: opaque to Fortran - info = CHAMELEON_zTile_to_Lapack_c(A,c_loc(Af77),LDA) + info = CHAMELEON_zTile_to_Lapack_c(uplo,A,c_loc(Af77),LDA) end subroutine CHAMELEON_zTile_to_Lapack end module chameleon_z diff --git a/control/tile.c b/control/tile.c index c32b0355a38018b3e519aac491530084a514573e..80163efe1e589c7bf9e29c924c7091be75a5106b 100644 --- a/control/tile.c +++ b/control/tile.c @@ -33,13 +33,19 @@ * ****************************************************************************** * + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * * @param[in] Af77 * LAPACK matrix. * * @param[in] LDA * The leading dimension of the matrix Af77. * - * @param[out] A + * @param[in,out] A * Descriptor of the CHAMELEON matrix in tile layout. * ****************************************************************************** @@ -47,21 +53,21 @@ * @retval CHAMELEON_SUCCESS successful exit * */ -int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) +int CHAMELEON_Lapack_to_Tile( cham_uplo_t uplo, void *Af77, int LDA, CHAM_desc_t *A ) { switch( A->dtyp ) { case ChamComplexDouble: - return CHAMELEON_zLapack_to_Tile( (CHAMELEON_Complex64_t *)Af77, LDA, A ); + return CHAMELEON_zLapack_to_Tile( uplo, (CHAMELEON_Complex64_t *)Af77, LDA, A ); break; case ChamComplexFloat: - return CHAMELEON_cLapack_to_Tile( (CHAMELEON_Complex32_t *)Af77, LDA, A ); + return CHAMELEON_cLapack_to_Tile( uplo, (CHAMELEON_Complex32_t *)Af77, LDA, A ); break; case ChamRealFloat: - return CHAMELEON_sLapack_to_Tile( (float *)Af77, LDA, A ); + return CHAMELEON_sLapack_to_Tile( uplo, (float *)Af77, LDA, A ); break; case ChamRealDouble: default: - return CHAMELEON_dLapack_to_Tile( (double *)Af77, LDA, A ); + return CHAMELEON_dLapack_to_Tile( uplo, (double *)Af77, LDA, A ); } return CHAMELEON_ERR_ILLEGAL_VALUE; } @@ -74,10 +80,16 @@ int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) * ****************************************************************************** * - * @param[out] A + * @param[in] uplo + * Specifies the shape of the matrix A: + * = ChamUpper: A is upper triangular; + * = ChamLower: A is lower triangular; + * = ChamUpperLower: A is general. + * + * @param[in] A * Descriptor of the CHAMELEON matrix in tile layout. * - * @param[in] Af77 + * @param[in,out] Af77 * LAPACK matrix (only needed on proc 0). * * @param[in] LDA @@ -88,21 +100,21 @@ int CHAMELEON_Lapack_to_Tile(void *Af77, int LDA, CHAM_desc_t *A) * @retval CHAMELEON_SUCCESS successful exit * */ -int CHAMELEON_Tile_to_Lapack(CHAM_desc_t *A, void *Af77, int LDA) +int CHAMELEON_Tile_to_Lapack( cham_uplo_t uplo, CHAM_desc_t *A, void *Af77, int LDA ) { switch( A->dtyp ) { case ChamComplexDouble: - return CHAMELEON_zTile_to_Lapack( A, (CHAMELEON_Complex64_t *)Af77, LDA ); + return CHAMELEON_zTile_to_Lapack( uplo, A, (CHAMELEON_Complex64_t *)Af77, LDA ); break; case ChamComplexFloat: - return CHAMELEON_cTile_to_Lapack( A, (CHAMELEON_Complex32_t *)Af77, LDA ); + return CHAMELEON_cTile_to_Lapack( uplo, A, (CHAMELEON_Complex32_t *)Af77, LDA ); break; case ChamRealFloat: - return CHAMELEON_sTile_to_Lapack( A, (float *)Af77, LDA ); + return CHAMELEON_sTile_to_Lapack( uplo, A, (float *)Af77, LDA ); break; case ChamRealDouble: default: - return CHAMELEON_dTile_to_Lapack( A, (double *)Af77, LDA ); + return CHAMELEON_dTile_to_Lapack( uplo, A, (double *)Af77, LDA ); } return CHAMELEON_ERR_ILLEGAL_VALUE; } diff --git a/include/chameleon.h b/include/chameleon.h index a66b980e876c51a9040be6761dc7bf040eace6bf..9803ad5457e1d4b68f08e4a32cc83c894d6d58c3 100644 --- a/include/chameleon.h +++ b/include/chameleon.h @@ -91,8 +91,8 @@ int CHAMELEON_Distributed_start (void); int CHAMELEON_Distributed_stop (void); int CHAMELEON_Comm_size (void); int CHAMELEON_Comm_rank (void); -int CHAMELEON_Lapack_to_Tile (void *Af77, int LDA, CHAM_desc_t *A); -int CHAMELEON_Tile_to_Lapack (CHAM_desc_t *A, void *Af77, int LDA); +int CHAMELEON_Lapack_to_Tile (cham_uplo_t uplo, void *Af77, int LDA, CHAM_desc_t *A); +int CHAMELEON_Tile_to_Lapack (cham_uplo_t uplo, CHAM_desc_t *A, void *Af77, int LDA); int CHAMELEON_Distributed_start (void); int CHAMELEON_Distributed_stop (void); int CHAMELEON_Distributed_size (int *size); diff --git a/include/chameleon/chameleon_z.h b/include/chameleon/chameleon_z.h index 928a6d3c5c8fca1d1372dbf1610861d2e23588fe..91615b3e4e7769682f4f8b3f369b19fd9d9184e9 100644 --- a/include/chameleon/chameleon_z.h +++ b/include/chameleon/chameleon_z.h @@ -321,8 +321,8 @@ int CHAMELEON_Alloc_Workspace_zgetrf_incpiv_Tile(int N, CHAM_desc_t **descL, int /** * Auxiliary function prototypes */ -int CHAMELEON_zLapack_to_Tile(CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A); -int CHAMELEON_zTile_to_Lapack(CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA); +int CHAMELEON_zLapack_to_Tile( cham_uplo_t uplo, CHAMELEON_Complex64_t *Af77, int LDA, CHAM_desc_t *A ); +int CHAMELEON_zTile_to_Lapack( cham_uplo_t uplo, CHAM_desc_t *A, CHAMELEON_Complex64_t *Af77, int LDA ); /** * User Builder function prototypes diff --git a/testing/testing_zcheck.c b/testing/testing_zcheck.c index a5e2a73690db37b01f39d030214ac9bddef7f35a..3ff44d0246a78ecf04a4e816df26efd402f02fec 100644 --- a/testing/testing_zcheck.c +++ b/testing/testing_zcheck.c @@ -79,8 +79,8 @@ int check_zmatrices( run_arg_list_t *args, cham_uplo_t uplo, CHAM_desc_t *descA, } /* Converts the matrices to LAPACK layout in order to compare them on the main process */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descB, B, LDA ); + CHAMELEON_Tile_to_Lapack( uplo, descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( uplo, descB, B, LDA ); if ( rank == 0 ) { double *work = (double *)malloc(LDA*N*sizeof(double)); @@ -174,7 +174,7 @@ int check_znorm( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_normtype } /* Converts the matrix to LAPACK layout in order to use the LAPACK norm function */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( uplo, descA, A, LDA ); if ( rank == 0 ) { double *work = (double*) malloc(chameleon_max(M, N)*sizeof(double)); @@ -292,6 +292,7 @@ int check_zsum ( run_arg_list_t *args, cham_uplo_t uplo, cham_trans_t trans, CHAMELEON_Complex64_t *Bref = NULL; CHAMELEON_Complex64_t *Bcham = NULL; CHAMELEON_Complex64_t mzone = -1.0; + cham_uplo_t uploA = uplo; if ( rank == 0 ) { A = malloc(An*LDA*sizeof(CHAMELEON_Complex64_t)); @@ -309,16 +310,16 @@ int check_zsum ( run_arg_list_t *args, cham_uplo_t uplo, cham_trans_t trans, Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo, ChamNonUnit, descA ); } else { - cham_uplo_t uplo_inv = (uplo == ChamUpper) ? ChamLower : ChamUpper; - Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo_inv, ChamNonUnit, descA ); + uploA = (uplo == ChamUpper) ? ChamLower : ChamUpper; + Anorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uploA, ChamNonUnit, descA ); } Binitnorm = CHAMELEON_zlantr_Tile( ChamMaxNorm, uplo, ChamNonUnit, descBref ); } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descBref, Bref, LDB ); - CHAMELEON_Tile_to_Lapack( descBcham, Bcham, LDB ); + CHAMELEON_Tile_to_Lapack( uploA, descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( uplo, descBref, Bref, LDB ); + CHAMELEON_Tile_to_Lapack( uplo, descBcham, Bcham, LDB ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -408,7 +409,7 @@ int check_zscale( run_arg_list_t *args, cham_uplo_t uplo, CHAMELEON_Complex64_t } /* Converts the matrix to LAPACK layout in order to scale with BLAS */ - CHAMELEON_Tile_to_Lapack( descA1, Ainit, M ); + CHAMELEON_Tile_to_Lapack( uplo, descA1, Ainit, M ); if ( rank == 0 ) { /* Scales using core function */ @@ -417,7 +418,7 @@ int check_zscale( run_arg_list_t *args, cham_uplo_t uplo, CHAMELEON_Complex64_t /* Converts back into Chameleon to compare with check_zmatrices */ descBlas = CHAMELEON_Desc_CopyOnZero( descA1, NULL ); - CHAMELEON_Lapack_to_Tile( Ainit, M, descBlas ); + CHAMELEON_Lapack_to_Tile( uplo, Ainit, M, descBlas ); /* Compares the two matrices */ info_solution = check_zmatrices( args, uplo, descA2, descBlas ); @@ -516,10 +517,10 @@ int check_zgemm( run_arg_list_t *args, cham_trans_t transA, cham_trans_t transB, C = (CHAMELEON_Complex64_t *)malloc(N *LDC*sizeof(CHAMELEON_Complex64_t)); } - CHAMELEON_Tile_to_Lapack(descA, A, LDA); - CHAMELEON_Tile_to_Lapack(descB, B, LDB); - CHAMELEON_Tile_to_Lapack(descCref, Cref, LDC); - CHAMELEON_Tile_to_Lapack(descC, C, LDC); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descB, B, LDB ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descCref, Cref, LDC ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descC, C, LDC ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -651,10 +652,10 @@ int check_zsymm( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_side_t s } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descB, B, LDB ); - CHAMELEON_Tile_to_Lapack( descCref, Cref, LDC ); - CHAMELEON_Tile_to_Lapack( descC, C, LDC ); + CHAMELEON_Tile_to_Lapack( uplo, descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descB, B, LDB ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descCref, Cref, LDC ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descC, C, LDC ); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e'); @@ -799,11 +800,11 @@ int check_zsyrk( run_arg_list_t *args, cham_mtxtype_t matrix_type, cham_uplo_t u } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack( descA, A, LDA ); - CHAMELEON_Tile_to_Lapack( descCref, Cref, LDC ); - CHAMELEON_Tile_to_Lapack( descC, C, LDC ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descA, A, LDA ); + CHAMELEON_Tile_to_Lapack( uplo, descCref, Cref, LDC ); + CHAMELEON_Tile_to_Lapack( uplo, descC, C, LDC ); if ( descB != NULL ) { - CHAMELEON_Tile_to_Lapack( descB, B, LDA ); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descB, B, LDA ); } if ( rank == 0 ) { @@ -970,9 +971,9 @@ int check_ztrmm( run_arg_list_t *args, int check_func, cham_side_t side, cham_up } /* Creates the LAPACK version of the matrices */ - CHAMELEON_Tile_to_Lapack(descA, A, LDA); - CHAMELEON_Tile_to_Lapack(descB, B, LDB); - CHAMELEON_Tile_to_Lapack(descBref, Bref, LDB); + CHAMELEON_Tile_to_Lapack( uplo, descA, A, LDA); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descB, B, LDB); + CHAMELEON_Tile_to_Lapack( ChamUpperLower, descBref, Bref, LDB); if ( rank == 0 ) { double eps = LAPACKE_dlamch_work('e');