/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_zgetrf_incpiv_Tile - Allocates workspace for * PLASMA_zgesv_incpiv_Tile or PLASMA_zgesv_incpiv_Tile_Async routines. * ******************************************************************************* * * @param[in] N * The number of linear equations, i.e., the order of the matrix A. N >= 0. * * @param[out] descL * On exit, PLASMA descriptor on workspace handle for storage of the extra * L factors required by the tile LU factorization. * * @param[out] IPIV * On exit, workspace handle for storage of pivot indexes required by the tile LU * factorization (not equivalent to LAPACK). * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_zgetrf_incpiv_Tile(int N, PLASMA_desc **descL, int **IPIV) { int status = plasma_alloc_ibnb_tile(N, N, PLASMA_FUNC_ZGESV, PlasmaComplexDouble, descL); if (status != PLASMA_SUCCESS) return status; return plasma_alloc_ipiv(N, N, PLASMA_FUNC_ZGESV, (void **)IPIV); }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_zgebrd - Allocates workspace for PLASMA_zgebrd or PLASMA_zgebrd_Tile routine. * ******************************************************************************* * * @param[in] M * The number of rows of the matrix A. M >= 0. * * @param[in] N * The number of columns of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile BRD. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_zgebrd(int M, int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(M, N, PLASMA_FUNC_ZGEBRD, PlasmaComplexDouble, descT); }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_zhegv - Allocates workspace for PLASMA_zhegv or PLASMA_zhegv_Tile routine. * ******************************************************************************* * * @param[in] M * The number of rows of the matrix A. M >= 0. * * @param[in] N * The number of columns of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile TRD. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_zhegv(int M, int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(M, N, PLASMA_FUNC_ZHEGV, PlasmaComplexDouble, descT); }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_zgeev - Allocates workspace for PLASMA_zgeev or PLASMA_zgeev_Tile routine. * ******************************************************************************* * * @param[in] N * The order of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile Hessenberg. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_zgeev(int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(N, N, PLASMA_FUNC_ZGEEV, PlasmaComplexDouble, descT); }
static double RunTest(real_Double_t *t_, struct user_parameters* params) { double t; PLASMA_desc *descT; int64_t N = params->matrix_size; int64_t IB = params->iblocksize; int64_t NB = params->blocksize; int check = params->check; double check_res = 0; /* Allocate Data */ PLASMA_desc *descA = NULL; double *ptr = (double*)malloc(N * N * sizeof(double)); PLASMA_Desc_Create(&descA, ptr, PlasmaRealDouble, NB, NB, NB*NB, N, N, 0, 0, N, N); #pragma omp parallel { #pragma omp single { plasma_pdpltmg_quark(*descA, 5373 ); } } /* Save A for check */ double *A = NULL; if ( check ) { A = (double*)malloc(N * N * sizeof(double)); plasma_pdtile_to_lapack_quark(*descA, (void*)A, N); } /* Allocate Workspace */ plasma_alloc_ibnb_tile(N, N, PlasmaRealDouble, &descT, IB, NB); /* Do the computations */ START_TIMING(); #pragma omp parallel { #pragma omp single { plasma_pdgeqrf_quark( *descA, *descT , IB); } } STOP_TIMING(); /* Check the solution */ if ( check ) { /* Allocate B for check */ PLASMA_desc *descB = NULL; double* ptr = (double*)malloc(N * sizeof(double)); PLASMA_Desc_Create(&descB, ptr, PlasmaRealDouble, NB, NB, NB*NB, N, 1, 0, 0, N, 1); /* Initialize and save B */ plasma_pdpltmg_seq(*descB, 2264 ); double *B = (double*)malloc(N * sizeof(double)); plasma_pdtile_to_lapack_quark(*descB, (void*)B, N); /* Compute the solution */ PLASMA_dgeqrs_Tile( descA, descT, descB , IB); /* Copy solution to X */ double *X = (double*)malloc(N * sizeof(double)); plasma_pdtile_to_lapack_quark(*descB, (void*)X, N); check_res = d_check_solution(N, N, 1, A, N, B, X, N); /* Free checking structures */ PASTE_CODE_FREE_MATRIX( descB ); free( A ); free( B ); free( X ); } /* Free data */ PLASMA_Dealloc_Handle_Tile(&descT); PASTE_CODE_FREE_MATRIX( descA ); return check_res; }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_cgebrd - Allocates workspace for PLASMA_cgebrd or PLASMA_cgebrd_Tile routine. * ******************************************************************************* * * @param[in] M * The number of rows of the matrix A. M >= 0. * * @param[in] N * The number of columns of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile BRD. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_cgebrd(int M, int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(M, N, PLASMA_FUNC_CGEBRD, PlasmaComplexFloat, descT); }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_chegv - Allocates workspace for PLASMA_chegv or PLASMA_chegv_Tile routine. * ******************************************************************************* * * @param[in] M * The number of rows of the matrix A. M >= 0. * * @param[in] N * The number of columns of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile TRD. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_chegv(int M, int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(M, N, PLASMA_FUNC_CHEGV, PlasmaComplexFloat, descT); }
/***************************************************************************//** * * @ingroup Auxiliary * * PLASMA_Alloc_Workspace_cgeev - Allocates workspace for PLASMA_cgeev or PLASMA_cgeev_Tile routine. * ******************************************************************************* * * @param[in] N * The order of the matrix A. N >= 0. * * @param[out] T * On exit, workspace handle for storage of the extra T factors required by the tile Hessenberg. * ******************************************************************************* * * @return * \retval PLASMA_SUCCESS successful exit * ******************************************************************************/ int PLASMA_Alloc_Workspace_cgeev(int N, PLASMA_desc **descT) { return plasma_alloc_ibnb_tile(N, N, PLASMA_FUNC_CGEEV, PlasmaComplexFloat, descT); }