libflame  12600
Functions
blis_prototypes_level2.h File Reference

(r12600)

Go to the source code of this file.

Functions

void bl1_sgemv (trans1_t transa, conj1_t conjx, int m, int n, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
void bl1_dgemv (trans1_t transa, conj1_t conjx, int m, int n, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
void bl1_cgemv (trans1_t transa, conj1_t conjx, int m, int n, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zgemv (trans1_t transa, conj1_t conjx, int m, int n, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_sgemv_blas (trans1_t transa, int m, int n, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
void bl1_dgemv_blas (trans1_t transa, int m, int n, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
void bl1_cgemv_blas (trans1_t transa, int m, int n, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zgemv_blas (trans1_t transa, int m, int n, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_sger (conj1_t conjx, conj1_t conjy, int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
void bl1_dger (conj1_t conjx, conj1_t conjy, int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
void bl1_cger (conj1_t conjx, conj1_t conjy, int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
void bl1_zger (conj1_t conjx, conj1_t conjy, int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
void bl1_sger_blas (int m, int n, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
void bl1_dger_blas (int m, int n, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
void bl1_cgerc_blas (int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
void bl1_cgeru_blas (int m, int n, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
void bl1_zgerc_blas (int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
void bl1_zgeru_blas (int m, int n, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
void bl1_shemv (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
void bl1_dhemv (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
void bl1_chemv (uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zhemv (uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_chemv_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zhemv_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_sher (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
void bl1_dher (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
void bl1_cher (uplo1_t uplo, conj1_t conj, int m, float *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
void bl1_zher (uplo1_t uplo, conj1_t conj, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
void bl1_cher_blas (uplo1_t uplo, int m, float *alpha, scomplex *x, int incx, scomplex *a, int lda)
void bl1_zher_blas (uplo1_t uplo, int m, double *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
void bl1_sher2 (uplo1_t uplo, conj1_t conj, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
void bl1_dher2 (uplo1_t uplo, conj1_t conj, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
void bl1_cher2 (uplo1_t uplo, conj1_t conj, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
void bl1_zher2 (uplo1_t uplo, conj1_t conj, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
void bl1_cher2_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
void bl1_zher2_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
void bl1_ssymv (uplo1_t uplo, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
void bl1_dsymv (uplo1_t uplo, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
void bl1_csymv (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zsymv (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_ssymv_blas (uplo1_t uplo, int m, float *alpha, float *a, int lda, float *x, int incx, float *beta, float *y, int incy)
void bl1_dsymv_blas (uplo1_t uplo, int m, double *alpha, double *a, int lda, double *x, int incx, double *beta, double *y, int incy)
void bl1_csymv_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *a, int lda, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_zsymv_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *a, int lda, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_ssyr (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int a_rs, int a_cs)
void bl1_dsyr (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int a_rs, int a_cs)
void bl1_csyr (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int a_rs, int a_cs)
void bl1_zsyr (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int a_rs, int a_cs)
void bl1_ssyr_blas (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *a, int lda)
void bl1_dsyr_blas (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *a, int lda)
void bl1_csyr_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *a, int lda)
void bl1_zsyr_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *a, int lda)
void bl1_ssyr2 (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int a_rs, int a_cs)
void bl1_dsyr2 (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int a_rs, int a_cs)
void bl1_csyr2 (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int a_rs, int a_cs)
void bl1_zsyr2 (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int a_rs, int a_cs)
void bl1_ssyr2_blas (uplo1_t uplo, int m, float *alpha, float *x, int incx, float *y, int incy, float *a, int lda)
void bl1_dsyr2_blas (uplo1_t uplo, int m, double *alpha, double *x, int incx, double *y, int incy, double *a, int lda)
void bl1_csyr2_blas (uplo1_t uplo, int m, scomplex *alpha, scomplex *x, int incx, scomplex *y, int incy, scomplex *a, int lda)
void bl1_zsyr2_blas (uplo1_t uplo, int m, dcomplex *alpha, dcomplex *x, int incx, dcomplex *y, int incy, dcomplex *a, int lda)
void bl1_strmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
void bl1_dtrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
void bl1_ctrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
void bl1_ztrmv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
void bl1_strmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
void bl1_dtrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
void bl1_ctrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
void bl1_ztrmv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
void bl1_strsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int a_rs, int a_cs, float *x, int incx)
void bl1_dtrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int a_rs, int a_cs, double *x, int incx)
void bl1_ctrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx)
void bl1_ztrsv (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx)
void bl1_strsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *a, int lda, float *x, int incx)
void bl1_dtrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *a, int lda, double *x, int incx)
void bl1_ctrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *a, int lda, scomplex *x, int incx)
void bl1_ztrsv_blas (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *a, int lda, dcomplex *x, int incx)
void bl1_strmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
void bl1_dtrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
void bl1_ctrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_ztrmvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)
void bl1_strsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, float *alpha, float *a, int a_rs, int a_cs, float *x, int incx, float *beta, float *y, int incy)
void bl1_dtrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, double *alpha, double *a, int a_rs, int a_cs, double *x, int incx, double *beta, double *y, int incy)
void bl1_ctrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, scomplex *alpha, scomplex *a, int a_rs, int a_cs, scomplex *x, int incx, scomplex *beta, scomplex *y, int incy)
void bl1_ztrsvsx (uplo1_t uplo, trans1_t trans, diag1_t diag, int m, dcomplex *alpha, dcomplex *a, int a_rs, int a_cs, dcomplex *x, int incx, dcomplex *beta, dcomplex *y, int incy)

Function Documentation

void bl1_cgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_c0(), bl1_c1(), bl1_callocv(), bl1_caxpyv(), bl1_cconjv(), bl1_ccopyv(), bl1_ccreate_contigm(), bl1_cfree(), bl1_cfree_contigm(), bl1_cgemv_blas(), bl1_cscalv(), bl1_does_trans(), bl1_is_conj(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim2(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Accum_T_UT_fc_opc_var1(), FLA_Accum_T_UT_fr_opc_var1(), FLA_Apply_H2_UT_l_opc_var1(), FLA_Apply_H2_UT_r_opc_var1(), FLA_Apply_HUD_UT_l_opc_var1(), FLA_Bidiag_UT_u_step_ofc_var2(), FLA_Bidiag_UT_u_step_ofc_var3(), FLA_Bidiag_UT_u_step_ofc_var4(), FLA_Bidiag_UT_u_step_opc_var1(), FLA_Bidiag_UT_u_step_opc_var2(), FLA_Bidiag_UT_u_step_opc_var3(), FLA_Bidiag_UT_u_step_opc_var4(), FLA_Bidiag_UT_u_step_opc_var5(), FLA_CAQR2_UT_opc_var1(), FLA_Chol_l_opc_var2(), FLA_Chol_u_opc_var2(), FLA_Eig_gest_il_opc_var2(), FLA_Eig_gest_il_opc_var3(), FLA_Eig_gest_iu_opc_var2(), FLA_Eig_gest_iu_opc_var3(), FLA_Eig_gest_nl_opc_var2(), FLA_Eig_gest_nu_opc_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofc_var2(), FLA_Hess_UT_step_ofc_var3(), FLA_Hess_UT_step_ofc_var4(), FLA_Hess_UT_step_opc_var1(), FLA_Hess_UT_step_opc_var2(), FLA_Hess_UT_step_opc_var3(), FLA_Hess_UT_step_opc_var4(), FLA_Hess_UT_step_opc_var5(), FLA_LQ_UT_opc_var2(), FLA_LU_nopiv_opc_var2(), FLA_LU_nopiv_opc_var3(), FLA_LU_nopiv_opc_var4(), FLA_LU_piv_opc_var3(), FLA_LU_piv_opc_var4(), FLA_Lyap_h_opc_var2(), FLA_Lyap_h_opc_var3(), FLA_Lyap_n_opc_var2(), FLA_Lyap_n_opc_var3(), FLA_QR2_UT_opc_var1(), FLA_QR_UT_opc_var2(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_ofc_var3(), FLA_Tridiag_UT_l_step_opc_var1(), FLA_Tridiag_UT_l_step_opc_var2(), FLA_Tridiag_UT_l_step_opc_var3(), FLA_Ttmm_l_opc_var2(), and FLA_Ttmm_u_opc_var2().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex  zero = bl1_c0();
    scomplex  one  = bl1_c1();
    scomplex* x_conj;
    scomplex* ax;
    int       lda, inca;
    int       n_x;
    int       incx_conj;
    int       incax;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) )
    {
        int n_elem;

        if ( bl1_does_trans( transa ) ) n_elem = n;
        else                            n_elem = m;

        bl1_cscalv( BLIS1_NO_CONJUGATE,
                    n_elem,
                    beta,
                    y, incy );
        return;
    }

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_toggle_trans( transa );
    }

    // Initialize with values assuming no conjugation of x.
    x_conj    = x;
    incx_conj = incx;

    // We need a temporary vector for the cases when x is conjugated, and
    // also for the cases where A is conjugated.
    if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
    {
        if ( bl1_does_trans( transa ) ) n_x = m;
        else                            n_x = n;

        x_conj    = bl1_callocv( n_x );
        incx_conj = 1;

        bl1_ccopyv( conjx,
                    n_x,
                    x,      incx,
                    x_conj, incx_conj );
    }

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    if ( bl1_is_conjnotrans( transa ) )
    {
        // We need a temporary vector for the product A * conj(x), which is
        // conformal to y. We know we are not transposing, so y is length m.
        ax    = bl1_callocv( m );
        incax = 1;
        
        // Start by conjugating the contents of the temporary copy of x.
        bl1_cconjv( n,
                    x_conj, incx_conj );

        // Compute A * conj(x) where x is the temporary copy of x created above.
        bl1_cgemv_blas( BLIS1_NO_TRANSPOSE,
                        m,
                        n,
                        &one,
                        a,      lda,
                        x_conj, incx_conj,
                        &zero,
                        ax, incax );

        // Scale y by beta.
        bl1_cscalv( BLIS1_NO_CONJUGATE,
                    m,
                    beta,
                    y, incy );

        // And finally, accumulate alpha * conj( A * conj(x) ) into y.
        bl1_caxpyv( BLIS1_CONJUGATE,
                    m,
                    alpha,
                    ax, incax,
                    y,  incy);

        // Free the temporary vector for Ax.
        bl1_cfree( ax );
    }
    else // notrans, trans, or conjtrans
    {
        bl1_cgemv_blas( transa,
                        m,
                        n,
                        alpha,
                        a,      lda,
                        x_conj, incx_conj,
                        beta,
                        y, incy );
    }

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
        bl1_cfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_cgemv_blas ( trans1_t  transa,
int  m,
int  n,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_param_map_to_netlib_trans(), cblas_cgemv(), CblasColMajor, and F77_cgemv().

Referenced by bl1_cgemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_TRANSPOSE cblas_transa;

    bl1_param_map_to_netlib_trans( transa, &cblas_transa );

    cblas_cgemv( cblas_order,
                 cblas_transa,
                 m,
                 n,
                 alpha,
                 a, lda,
                 x, incx,
                 beta,
                 y, incy );
#else
    char blas_transa;

    bl1_param_map_to_netlib_trans( transa, &blas_transa );

    F77_cgemv( &blas_transa,
               &m,
               &n,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_cger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigm(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cgerc_blas(), bl1_cgeru_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim2(), and BLIS1_CONJUGATE.

Referenced by FLA_Apply_H2_UT_l_opc_var1(), FLA_Apply_H2_UT_r_opc_var1(), FLA_Apply_HUD_UT_l_opc_var1(), FLA_Bidiag_UT_u_step_ofc_var3(), FLA_Bidiag_UT_u_step_opc_var2(), FLA_Bidiag_UT_u_step_opc_var3(), FLA_Eig_gest_il_opc_var3(), FLA_Eig_gest_il_opc_var4(), FLA_Eig_gest_iu_opc_var3(), FLA_Eig_gest_iu_opc_var4(), FLA_Eig_gest_nl_opc_var4(), FLA_Eig_gest_nu_opc_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofc_var2(), FLA_Hess_UT_step_ofc_var3(), FLA_Hess_UT_step_ofc_var4(), FLA_Hess_UT_step_opc_var2(), FLA_Hess_UT_step_opc_var3(), FLA_Hess_UT_step_opc_var4(), FLA_LU_nopiv_opc_var5(), FLA_LU_piv_opc_var5(), FLA_Lyap_h_opc_var2(), FLA_Lyap_n_opc_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opc_var3(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var3(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var3(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var3(), and FLA_Trinv_uu_opc_var4().

{
    int       m_save    = m;
    int       n_save    = n;
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_swap_ints( incx, incy );
        bl1_swap_conj( conjx, conjy );
        bl1_cswap_pointers( x, y );
    }

    // Initialize with values assuming no conjugation of x.
    x_conj    = x;
    incx_conj = incx;

    // We need a temporary vector for the cases when x is conjugated.
    if ( bl1_is_conj( conjx ) )
    {
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    // Conjugation of y is supported in the BLAS.
    if ( bl1_is_conj( conjy ) )
    {
        bl1_cgerc_blas( m,
                        n,
                        alpha,
                        x_conj, incx_conj,
                        y,      incy, 
                        a,      lda );
    }
    else
    {
        bl1_cgeru_blas( m,
                        n,
                        alpha,
                        x_conj, incx_conj,
                        y,      incy, 
                        a,      lda );
    }

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conjx ) )
        bl1_cfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_cfree_saved_contigm( m_save,
                             n_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_cgerc_blas ( int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)

References cblas_cgerc(), CblasColMajor, and F77_cgerc().

Referenced by bl1_cger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_cgerc( cblas_order,
                 m,
                 n,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    F77_cgerc ( &m,
                &n,
                alpha,
                x, &incx,
                y, &incy,
                a, &lda );
#endif
}
void bl1_cgeru_blas ( int  m,
int  n,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)

References cblas_cgeru(), CblasColMajor, and F77_cgeru().

Referenced by bl1_cger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_cgeru( cblas_order,
                 m,
                 n,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    F77_cgeru ( &m,
                &n,
                alpha,
                x, &incx,
                y, &incy,
                a, &lda );
#endif
}
void bl1_chemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_c0(), bl1_c1(), bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_chemv_blas(), bl1_cscalv(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), BLIS1_CONJUGATE, and BLIS1_NO_CONJUGATE.

Referenced by FLA_Eig_gest_il_opc_var1(), FLA_Eig_gest_il_opc_var2(), FLA_Eig_gest_iu_opc_var1(), FLA_Eig_gest_iu_opc_var2(), FLA_Eig_gest_nl_opc_var1(), FLA_Eig_gest_nl_opc_var2(), FLA_Eig_gest_nu_opc_var1(), FLA_Eig_gest_nu_opc_var2(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Lyap_h_opc_var1(), FLA_Lyap_n_opc_var1(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_ofc_var3(), FLA_Tridiag_UT_l_step_opc_var1(), FLA_Tridiag_UT_l_step_opc_var2(), and FLA_Tridiag_UT_l_step_opc_var3().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex  zero = bl1_c0();
    scomplex  one  = bl1_c1();
    scomplex* x_conj;
    scomplex* ax;
    int       lda, inca;
    int       incx_conj;
    int       incax;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // We want to handle the case where A is conjugated, but without
    // explicitly or conjugating A. To do so, we leverage the fact that
    // computing the product conj(A) * x is equivalent to computing
    // conj( A * conj(x) ).
    if ( bl1_is_conj( conj ) )
    {
        // We need a temporary vector so we can create a conjugated copy of x.
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );

        // We need a temporary vector for the product A * conj(x), which is
        // conformal to y (and x).
        ax    = bl1_callocv( m );
        incax = 1;
        
        // Compute A * conj(x) where x is the temporary copy of x created above.
        bl1_chemv_blas( uplo,
                        m,
                        &one,
                        a,      lda,
                        x_conj, incx_conj,
                        &zero,
                        ax,     incax );

        // Scale y by beta.
        bl1_cscalv( BLIS1_NO_CONJUGATE,
                    m,
                    beta,
                    y, incy );

        // And finally, accumulate alpha * conj( A * conj(x) ) into y.
        bl1_caxpyv( BLIS1_CONJUGATE,
                    m,
                    alpha,
                    ax, incax,
                    y,  incy);

        // Free the temporary vectors for x and Ax.
        bl1_cfree( x_conj );
        bl1_cfree( ax );
    }
    else // noconj
    {
        bl1_chemv_blas( uplo,
                        m,
                        alpha,
                        a, lda,
                        x, incx,
                        beta,
                        y, incy );
    }

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_chemv_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_param_map_to_netlib_uplo(), cblas_chemv(), CblasColMajor, and F77_chemv().

Referenced by bl1_chemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_chemv( cblas_order,
                 cblas_uplo,
                 m,
                 alpha,
                 a, lda,
                 x, incx,
                 beta,
                 y, incy );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_chemv( &blas_uplo,
               &m,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_cher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float *  alpha,
scomplex x,
int  incx,
scomplex a,
int  a_rs,
int  a_cs 
)

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cher_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by FLA_Chol_l_opc_var3(), FLA_Chol_u_opc_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Ttmm_l_opc_var1(), and FLA_Ttmm_u_opc_var1().

{
    int       m_save    = m;
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // Initialize with values assuming no conjugation of ( x * x' ).
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the case where ( x * x' ) is conjugated, but
    // without explicitly conjugating the matrix. To do so, we leverage
    // the fact that computing the product conj( x * x' ) is equivalent
    // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian.
    if ( bl1_is_conj( conj ) )
    {
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_cher_blas( uplo,
                   m,
                   alpha,
                   x_conj, incx_conj,
                   a,      lda );

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conj ) )
        bl1_cfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_cfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_cher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_saved_contigm(), bl1_cher2_blas(), bl1_is_conj(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by FLA_Eig_gest_il_opc_var4(), FLA_Eig_gest_il_opc_var5(), FLA_Eig_gest_iu_opc_var4(), FLA_Eig_gest_iu_opc_var5(), FLA_Eig_gest_nl_opc_var4(), FLA_Eig_gest_nl_opc_var5(), FLA_Eig_gest_nu_opc_var4(), FLA_Eig_gest_nu_opc_var5(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Lyap_h_opc_var4(), FLA_Lyap_n_opc_var4(), FLA_Tridiag_UT_l_step_ofc_var2(), FLA_Tridiag_UT_l_step_opc_var1(), and FLA_Tridiag_UT_l_step_opc_var2().

{
    int       m_save    = m;
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_conj;
    scomplex* y_conj;
    int       incx_conj;
    int       incy_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // Initialize with values assuming no conjugation of ( x * y' ) or
    // ( y * x' ).
    x_conj    = x;
    incx_conj = incx;
    y_conj    = y;
    incy_conj = incy;

    // We want to handle the case where ( x * y' ) and ( y * x' ) are
    // conjugated, but without explicitly conjugating the matrices. To do
    // so, we leverage the fact that computing the products conj( x * y' )
    // and conj( y * x' ) is equivalent to computing ( conj(x) * conj(y)' )
    // and ( conj(y) * conj(x)' ), respectively.
    if ( bl1_is_conj( conj ) )
    {
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        y_conj    = bl1_callocv( m );
        incy_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    y,      incy,
                    y_conj, incy_conj );
    }

    bl1_cher2_blas( uplo,
                    m,
                    alpha,
                    x_conj, incx_conj,
                    y_conj, incy_conj,
                    a,      lda );

    // Free the temporary conjugated x and y vectors.
    if ( bl1_is_conj( conj ) )
    {
        bl1_cfree( x_conj );
        bl1_cfree( y_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_cfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_cher2_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_cher2(), CblasColMajor, and F77_cher2().

Referenced by bl1_cher2().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_cher2( cblas_order,
                 cblas_uplo,
                 m,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_cher2( &blas_uplo,
               &m,
               alpha,
               x, &incx,
               y, &incy,
               a, &lda );
#endif
}
void bl1_cher_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_cher(), CblasColMajor, and F77_cher().

Referenced by bl1_cher().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_cher( cblas_order,
                cblas_uplo,
                m,
                *alpha,
                x, incx,
                a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_cher( &blas_uplo,
              &m,
              alpha,
              x, &incx,
              a, &lda );
#endif
}
void bl1_csymv ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_ccreate_contigmr(), bl1_cfree_contigm(), bl1_csymv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Symv_external().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_csymv_blas( uplo,
                    m,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_csymv_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex a,
int  lda,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_side(), bl1_param_map_to_netlib_uplo(), BLIS1_LEFT, BLIS1_NO_CONJUGATE, cblas_csymm(), CblasColMajor, and F77_csymm().

Referenced by bl1_csymv().

{
    scomplex* x_copy;
    scomplex* y_copy;
    int       n   = 1;
    int       ldx = m;
    int       ldy = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_SIDE  cblas_side;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_side( BLIS1_LEFT, &cblas_side );
    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    x_copy = bl1_callocv( m );
    y_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    cblas_csymm( cblas_order,
                 cblas_side,
                 cblas_uplo,
                 m,
                 n,
                 alpha,
                 a,      lda,
                 x_copy, ldx,
                 beta,
                 y_copy, ldy );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y_copy, 1,
                y,      incy );

    bl1_cfree( x_copy );
    bl1_cfree( y_copy );

#else
    char blas_side;
    char blas_uplo;

    bl1_param_map_to_netlib_side( BLIS1_LEFT, &blas_side );
    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    x_copy = bl1_callocv( m );
    y_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    F77_csymm ( &blas_side,
                &blas_uplo,
                &m,
                &n,
                alpha,
                a,      &lda,
                x_copy, &ldx,
                beta,
                y_copy, &ldy );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y_copy, 1,
                y,      incy );

    bl1_cfree( x_copy );
    bl1_cfree( y_copy );
#endif
}
void bl1_csyr ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  a_rs,
int  a_cs 
)

References bl1_ccreate_contigmr(), bl1_cfree_saved_contigm(), bl1_csyr_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Syr_external().

{
    int       m_save    = m;
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_csyr_blas( uplo,
                   m,
                   alpha,
                   x, incx,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_cfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_csyr2 ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  a_rs,
int  a_cs 
)

References bl1_ccreate_contigmr(), bl1_cfree_saved_contigm(), bl1_csyr2_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by FLA_Syr2_external().

{
    int       m_save    = m;
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_csyr2_blas( uplo,
                    m,
                    alpha,
                    x, incx,
                    y, incy,
                    a, lda );

    // Free the temporary contiguous matrix.
    bl1_cfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_csyr2_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex y,
int  incy,
scomplex a,
int  lda 
)

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_csyr2k(), CblasColMajor, F77_csyr2k(), scomplex::imag, and scomplex::real.

Referenced by bl1_csyr2().

{
    scomplex* x_copy;
    scomplex* y_copy;
    scomplex  beta;
    int       k   = 1;
    int       ldx = m;
    int       ldy = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_UPLO      cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &cblas_trans );

    x_copy = bl1_callocv( m );
    y_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    cblas_csyr2k( cblas_order,
                  cblas_uplo,
                  cblas_trans,
                  m,
                  k,
                  alpha,
                  x_copy, ldx,
                  y_copy, ldy,
                  &beta,
                  a,      lda );

    bl1_cfree( x_copy );
    bl1_cfree( y_copy );
#else
    char blas_uplo;
    char blas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &blas_trans );

    x_copy = bl1_callocv( m );
    y_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    F77_csyr2k ( &blas_uplo,
                 &blas_trans,
                 &m,
                 &k,
                 alpha,
                 x_copy, &ldx,
                 y_copy, &ldy,
                 &beta,
                 a,      &lda );

    bl1_cfree( x_copy );
    bl1_cfree( y_copy );
#endif
}
void bl1_csyr_blas ( uplo1_t  uplo,
int  m,
scomplex alpha,
scomplex x,
int  incx,
scomplex a,
int  lda 
)

References bl1_callocv(), bl1_ccopyv(), bl1_cfree(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_csyrk(), CblasColMajor, F77_csyrk(), scomplex::imag, and scomplex::real.

Referenced by bl1_csyr().

{
    scomplex* x_copy;
    scomplex  beta;
    int       k   = 1;
    int       ldx = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_UPLO      cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &cblas_trans );

    x_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    cblas_csyrk( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 m,
                 k,
                 alpha,
                 x_copy, ldx,
                 &beta,
                 a,      lda );

    bl1_cfree( x_copy );
#else
    char blas_uplo;
    char blas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &blas_trans );

    x_copy = bl1_callocv( m );

    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    F77_csyrk ( &blas_uplo,
                &blas_trans,
                &m,
                &k,
                alpha,
                x_copy, &ldx,
                &beta,
                a,      &lda );

    bl1_cfree( x_copy );
#endif
}
void bl1_ctrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx 
)

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_ctrmv_blas(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by bl1_ctrmvsx(), FLA_CAQR2_UT_opc_var1(), FLA_Eig_gest_nl_opc_var1(), FLA_Eig_gest_nl_opc_var5(), FLA_Eig_gest_nu_opc_var1(), FLA_Eig_gest_nu_opc_var5(), FLA_Hess_UT_step_opc_var5(), FLA_Trinv_ln_opc_var1(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var1(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var1(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var1(), FLA_Trinv_uu_opc_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opc_var3(), and FLA_Ttmm_u_opc_var3().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    // Initialize with values assuming that trans is not conjnotrans.
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    // Note: strictly speaking, we don't need to create a copy of x since
    // the operation is simpler than, say, gemv. However, we create a copy
    // anyway since in practice it performs better due to increased spatial
    // locality.
    if ( bl1_is_conjnotrans( trans ) )
    {
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_ctrmv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a,      lda,
                    x_conj, incx_conj );

    // Save the contents of and then free the temporary conjugated x vector.
    if ( bl1_is_conjnotrans( trans ) )
    {
        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x_conj, incx_conj,
                    x,      incx );

        bl1_cfree( x_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ctrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  lda,
scomplex x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ctrmv(), CblasColMajor, and F77_ctrmv().

Referenced by bl1_ctrmv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_ctrmv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_ctrmv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_ctrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_cscalv(), bl1_ctrmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opc_var5().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_callocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_ctrmv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_cscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_caxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_cfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ctrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx 
)

References bl1_callocv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_ctrsv_blas(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zero_dim1(), and BLIS1_CONJUGATE.

Referenced by bl1_ctrsvsx(), FLA_Chol_l_opc_var1(), FLA_Chol_u_opc_var1(), FLA_Eig_gest_il_opc_var1(), FLA_Eig_gest_il_opc_var5(), FLA_Eig_gest_iu_opc_var1(), FLA_Eig_gest_iu_opc_var5(), FLA_Hess_UT_step_opc_var5(), FLA_LU_nopiv_opc_var1(), FLA_LU_nopiv_opc_var2(), FLA_LU_nopiv_opc_var3(), FLA_LU_piv_opc_var3(), FLA_Lyap_h_opc_var1(), FLA_Lyap_h_opc_var2(), FLA_Lyap_h_opc_var3(), FLA_Lyap_h_opc_var4(), FLA_Lyap_n_opc_var1(), FLA_Lyap_n_opc_var2(), FLA_Lyap_n_opc_var3(), FLA_Lyap_n_opc_var4(), FLA_Trinv_ln_opc_var2(), FLA_Trinv_ln_opc_var4(), FLA_Trinv_lu_opc_var2(), FLA_Trinv_lu_opc_var4(), FLA_Trinv_un_opc_var2(), FLA_Trinv_un_opc_var4(), FLA_Trinv_uu_opc_var2(), FLA_Trinv_uu_opc_var4(), and FLA_Trsv_external().

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    // Initialize with values assuming that trans is not conjnotrans.
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    // Note: strictly speaking, we don't need to create a copy of x since
    // the operation is simpler than, say, gemv. However, we create a copy
    // anyway since in practice it performs better due to increased spatial
    // locality.
    if ( bl1_is_conjnotrans( trans ) )
    {
        x_conj    = bl1_callocv( m );
        incx_conj = 1;

        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_ctrsv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a,      lda,
                    x_conj, incx_conj );

    // Save the contents of and then free the temporary conjugated x vector.
    if ( bl1_is_conjnotrans( trans ) )
    {
        bl1_ccopyv( BLIS1_CONJUGATE,
                    m,
                    x_conj, incx_conj,
                    x,      incx );

        bl1_cfree( x_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ctrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex a,
int  lda,
scomplex x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ctrsv(), CblasColMajor, and F77_ctrsv().

Referenced by bl1_ctrsv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_ctrsv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_ctrsv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_ctrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
scomplex alpha,
scomplex a,
int  a_rs,
int  a_cs,
scomplex x,
int  incx,
scomplex beta,
scomplex y,
int  incy 
)

References bl1_callocv(), bl1_caxpyv(), bl1_ccopyv(), bl1_ccreate_contigmr(), bl1_cfree(), bl1_cfree_contigm(), bl1_cscalv(), bl1_ctrsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

{
    scomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    scomplex* x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_ccreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_callocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_ccopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_ctrsv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_cscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_caxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_cfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_cfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
double *  alpha,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_dcreate_contigm(), bl1_dfree_contigm(), bl1_dgemv_blas(), bl1_does_trans(), bl1_dscalv(), bl1_is_row_storage(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Accum_T_UT_fc_opd_var1(), FLA_Accum_T_UT_fr_opd_var1(), FLA_Apply_H2_UT_l_opd_var1(), FLA_Apply_H2_UT_r_opd_var1(), FLA_Apply_HUD_UT_l_opd_var1(), FLA_Bidiag_UT_u_step_ofd_var2(), FLA_Bidiag_UT_u_step_ofd_var3(), FLA_Bidiag_UT_u_step_ofd_var4(), FLA_Bidiag_UT_u_step_opd_var1(), FLA_Bidiag_UT_u_step_opd_var2(), FLA_Bidiag_UT_u_step_opd_var3(), FLA_Bidiag_UT_u_step_opd_var4(), FLA_Bidiag_UT_u_step_opd_var5(), FLA_CAQR2_UT_opd_var1(), FLA_Chol_l_opd_var2(), FLA_Chol_u_opd_var2(), FLA_Eig_gest_il_opd_var2(), FLA_Eig_gest_il_opd_var3(), FLA_Eig_gest_iu_opd_var2(), FLA_Eig_gest_iu_opd_var3(), FLA_Eig_gest_nl_opd_var2(), FLA_Eig_gest_nu_opd_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofd_var2(), FLA_Hess_UT_step_ofd_var3(), FLA_Hess_UT_step_ofd_var4(), FLA_Hess_UT_step_opd_var1(), FLA_Hess_UT_step_opd_var2(), FLA_Hess_UT_step_opd_var3(), FLA_Hess_UT_step_opd_var4(), FLA_Hess_UT_step_opd_var5(), FLA_LQ_UT_opd_var2(), FLA_LU_nopiv_opd_var2(), FLA_LU_nopiv_opd_var3(), FLA_LU_nopiv_opd_var4(), FLA_LU_piv_opd_var3(), FLA_LU_piv_opd_var4(), FLA_Lyap_h_opd_var2(), FLA_Lyap_h_opd_var3(), FLA_Lyap_n_opd_var2(), FLA_Lyap_n_opd_var3(), FLA_QR2_UT_opd_var1(), FLA_QR_UT_opd_var2(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_ofd_var3(), FLA_Tridiag_UT_l_step_opd_var1(), FLA_Tridiag_UT_l_step_opd_var2(), FLA_Tridiag_UT_l_step_opd_var3(), FLA_Ttmm_l_opd_var2(), and FLA_Ttmm_u_opd_var2().

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) )
    {
        int n_elem;

        if ( bl1_does_trans( transa ) ) n_elem = n;
        else                            n_elem = m;

        bl1_dscalv( BLIS1_NO_CONJUGATE,
                    n_elem,
                    beta,
                    y, incy );
        return;
    }

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_toggle_trans( transa );
    }

    bl1_dgemv_blas( transa,
                    m,
                    n,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dgemv_blas ( trans1_t  transa,
int  m,
int  n,
double *  alpha,
double *  a,
int  lda,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_param_map_to_netlib_trans(), cblas_dgemv(), CblasColMajor, and F77_dgemv().

Referenced by bl1_dgemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_TRANSPOSE cblas_transa;

    bl1_param_map_to_netlib_trans( transa, &cblas_transa );

    cblas_dgemv( cblas_order,
                 cblas_transa,
                 m,
                 n,
                 *alpha,
                 a, lda,
                 x, incx,
                 *beta,
                 y, incy );
#else
    char blas_transa;

    bl1_param_map_to_netlib_trans( transa, &blas_transa );

    F77_dgemv( &blas_transa,
               &m,
               &n,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_dger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
double *  alpha,
double *  x,
int  incx,
double *  y,
int  incy,
double *  a,
int  a_rs,
int  a_cs 
)

References bl1_dcreate_contigm(), bl1_dfree_saved_contigm(), bl1_dger_blas(), bl1_is_row_storage(), and bl1_zero_dim2().

Referenced by FLA_Apply_H2_UT_l_opd_var1(), FLA_Apply_H2_UT_r_opd_var1(), FLA_Apply_HUD_UT_l_opd_var1(), FLA_Bidiag_UT_u_step_ofd_var3(), FLA_Bidiag_UT_u_step_opd_var2(), FLA_Bidiag_UT_u_step_opd_var3(), FLA_Eig_gest_il_opd_var3(), FLA_Eig_gest_il_opd_var4(), FLA_Eig_gest_iu_opd_var3(), FLA_Eig_gest_iu_opd_var4(), FLA_Eig_gest_nl_opd_var4(), FLA_Eig_gest_nu_opd_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofd_var2(), FLA_Hess_UT_step_ofd_var3(), FLA_Hess_UT_step_ofd_var4(), FLA_Hess_UT_step_opd_var2(), FLA_Hess_UT_step_opd_var3(), FLA_Hess_UT_step_opd_var4(), FLA_LU_nopiv_opd_var5(), FLA_LU_piv_opd_var5(), FLA_Lyap_h_opd_var2(), FLA_Lyap_n_opd_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opd_var3(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var3(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var3(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var3(), and FLA_Trinv_uu_opd_var4().

{
    int       m_save    = m;
    int       n_save    = n;
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_swap_ints( incx, incy );
        bl1_swap_conj( conjx, conjy );
        bl1_dswap_pointers( x, y );
    }

    // Initialize with values assuming no conjugation of x.
    bl1_dger_blas( m,
                   n,
                   alpha,
                   x, incx,
                   y, incy,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_dfree_saved_contigm( m_save,
                             n_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_dger_blas ( int  m,
int  n,
double *  alpha,
double *  x,
int  incx,
double *  y,
int  incy,
double *  a,
int  lda 
)

References cblas_dger(), CblasColMajor, and F77_dger().

Referenced by bl1_dger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_dger( cblas_order,
                m,
                n,
                *alpha,
                x, incx,
                y, incy,
                a, lda );
#else
    F77_dger( &m,
              &n,
              alpha,
              x, &incx,
              y, &incy,
              a, &lda );
#endif
}
void bl1_dhemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double *  alpha,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)
void bl1_dher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  a,
int  a_rs,
int  a_cs 
)

References bl1_dsyr().

{
    bl1_dsyr( uplo,
              m,
              alpha,
              x, incx,
              a, a_rs, a_cs );
}
void bl1_dher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  y,
int  incy,
double *  a,
int  a_rs,
int  a_cs 
)
void bl1_dsymv ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dsymv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dhemv(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Symv_external(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_ofd_var3(), FLA_Tridiag_UT_l_step_opd_var1(), FLA_Tridiag_UT_l_step_opd_var2(), and FLA_Tridiag_UT_l_step_opd_var3().

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_dsymv_blas( uplo,
                    m,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dsymv_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  a,
int  lda,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_param_map_to_netlib_uplo(), cblas_dsymv(), CblasColMajor, and F77_dsymv().

Referenced by bl1_dsymv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_dsymv( cblas_order,
                 cblas_uplo,
                 m,
                 *alpha,
                 a, lda,
                 x, incx,
                 *beta,
                 y, incy );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_dsymv( &blas_uplo,
               &m,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_dsyr ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  a,
int  a_rs,
int  a_cs 
)

References bl1_dcreate_contigmr(), bl1_dfree_saved_contigm(), bl1_dsyr_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dher(), FLA_Chol_l_opd_var3(), FLA_Chol_u_opd_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Syr_external(), FLA_Ttmm_l_opd_var1(), and FLA_Ttmm_u_opd_var1().

{
    int       m_save    = m;
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_dsyr_blas( uplo,
                   m,
                   alpha,
                   x, incx,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_dfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_dsyr2 ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  y,
int  incy,
double *  a,
int  a_rs,
int  a_cs 
)

References bl1_dcreate_contigmr(), bl1_dfree_saved_contigm(), bl1_dsyr2_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dher2(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Syr2_external(), FLA_Tridiag_UT_l_step_ofd_var2(), FLA_Tridiag_UT_l_step_opd_var1(), and FLA_Tridiag_UT_l_step_opd_var2().

{
    int       m_save    = m;
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_dsyr2_blas( uplo,
                    m,
                    alpha,
                    x, incx,
                    y, incy,
                    a, lda );

    // Free the temporary contiguous matrix.
    bl1_dfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_dsyr2_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  y,
int  incy,
double *  a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_dsyr2(), CblasColMajor, and F77_dsyr2().

Referenced by bl1_dsyr2().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_dsyr2( cblas_order,
                 cblas_uplo,
                 m,
                 *alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_dsyr2( &blas_uplo,
               &m,
               alpha,
               x, &incx,
               y, &incy,
               a, &lda );
#endif
}
void bl1_dsyr_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
double *  x,
int  incx,
double *  a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_dsyr(), CblasColMajor, and F77_dsyr().

Referenced by bl1_dsyr().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_dsyr( cblas_order,
                cblas_uplo,
                m,
                *alpha,
                x, incx,
                a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_dsyr( &blas_uplo,
              &m,
              alpha,
              x, &incx,
              a, &lda );
#endif
}
void bl1_dtrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx 
)

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dtrmv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dtrmvsx(), FLA_CAQR2_UT_opd_var1(), FLA_Eig_gest_nl_opd_var1(), FLA_Eig_gest_nl_opd_var5(), FLA_Eig_gest_nu_opd_var1(), FLA_Eig_gest_nu_opd_var5(), FLA_Hess_UT_step_opd_var5(), FLA_Trinv_ln_opd_var1(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var1(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var1(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var1(), FLA_Trinv_uu_opd_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opd_var3(), and FLA_Ttmm_u_opd_var3().

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    bl1_dtrmv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a, lda,
                    x, incx );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dtrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  a,
int  lda,
double *  x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_dtrmv(), CblasColMajor, and F77_dtrmv().

Referenced by bl1_dtrmv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_dtrmv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_dtrmv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_dtrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  alpha,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_dallocv(), bl1_daxpyv(), bl1_dcopyv(), bl1_dcreate_contigmr(), bl1_dfree(), bl1_dfree_contigm(), bl1_dscalv(), bl1_dtrmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opd_var5().

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    double*   x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_dallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_dcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_dtrmv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_dscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_daxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_dfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dtrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx 
)

References bl1_dcreate_contigmr(), bl1_dfree_contigm(), bl1_dtrsv_blas(), bl1_is_row_storage(), and bl1_zero_dim1().

Referenced by bl1_dtrsvsx(), FLA_Chol_l_opd_var1(), FLA_Chol_u_opd_var1(), FLA_Eig_gest_il_opd_var1(), FLA_Eig_gest_il_opd_var5(), FLA_Eig_gest_iu_opd_var1(), FLA_Eig_gest_iu_opd_var5(), FLA_Hess_UT_step_opd_var5(), FLA_LU_nopiv_opd_var1(), FLA_LU_nopiv_opd_var2(), FLA_LU_nopiv_opd_var3(), FLA_LU_piv_opd_var3(), FLA_Lyap_h_opd_var1(), FLA_Lyap_h_opd_var2(), FLA_Lyap_h_opd_var3(), FLA_Lyap_h_opd_var4(), FLA_Lyap_n_opd_var1(), FLA_Lyap_n_opd_var2(), FLA_Lyap_n_opd_var3(), FLA_Lyap_n_opd_var4(), FLA_Trinv_ln_opd_var2(), FLA_Trinv_ln_opd_var4(), FLA_Trinv_lu_opd_var2(), FLA_Trinv_lu_opd_var4(), FLA_Trinv_un_opd_var2(), FLA_Trinv_un_opd_var4(), FLA_Trinv_uu_opd_var2(), FLA_Trinv_uu_opd_var4(), and FLA_Trsv_external().

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    bl1_dtrsv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a, lda,
                    x, incx );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_dtrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  a,
int  lda,
double *  x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_dtrsv(), CblasColMajor, and F77_dtrsv().

Referenced by bl1_dtrsv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_dtrsv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_dtrsv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_dtrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
double *  alpha,
double *  a,
int  a_rs,
int  a_cs,
double *  x,
int  incx,
double *  beta,
double *  y,
int  incy 
)

References bl1_dallocv(), bl1_daxpyv(), bl1_dcopyv(), bl1_dcreate_contigmr(), bl1_dfree(), bl1_dfree_contigm(), bl1_dscalv(), bl1_dtrsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

{
    double*   a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    double*   x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_dcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_dallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_dcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_dtrsv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_dscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_daxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_dfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_dfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_sgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
float *  alpha,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_does_trans(), bl1_is_row_storage(), bl1_screate_contigm(), bl1_sfree_contigm(), bl1_sgemv_blas(), bl1_sscalv(), bl1_zero_dim2(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Accum_T_UT_fc_ops_var1(), FLA_Accum_T_UT_fr_ops_var1(), FLA_Apply_H2_UT_l_ops_var1(), FLA_Apply_H2_UT_r_ops_var1(), FLA_Apply_HUD_UT_l_ops_var1(), FLA_Bidiag_UT_u_step_ofs_var2(), FLA_Bidiag_UT_u_step_ofs_var3(), FLA_Bidiag_UT_u_step_ofs_var4(), FLA_Bidiag_UT_u_step_ops_var1(), FLA_Bidiag_UT_u_step_ops_var2(), FLA_Bidiag_UT_u_step_ops_var3(), FLA_Bidiag_UT_u_step_ops_var4(), FLA_Bidiag_UT_u_step_ops_var5(), FLA_CAQR2_UT_ops_var1(), FLA_Chol_l_ops_var2(), FLA_Chol_u_ops_var2(), FLA_Eig_gest_il_ops_var2(), FLA_Eig_gest_il_ops_var3(), FLA_Eig_gest_iu_ops_var2(), FLA_Eig_gest_iu_ops_var3(), FLA_Eig_gest_nl_ops_var2(), FLA_Eig_gest_nu_ops_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofs_var2(), FLA_Hess_UT_step_ofs_var3(), FLA_Hess_UT_step_ofs_var4(), FLA_Hess_UT_step_ops_var1(), FLA_Hess_UT_step_ops_var2(), FLA_Hess_UT_step_ops_var3(), FLA_Hess_UT_step_ops_var4(), FLA_Hess_UT_step_ops_var5(), FLA_LQ_UT_ops_var2(), FLA_LU_nopiv_ops_var2(), FLA_LU_nopiv_ops_var3(), FLA_LU_nopiv_ops_var4(), FLA_LU_piv_ops_var3(), FLA_LU_piv_ops_var4(), FLA_Lyap_h_ops_var2(), FLA_Lyap_h_ops_var3(), FLA_Lyap_n_ops_var2(), FLA_Lyap_n_ops_var3(), FLA_QR2_UT_ops_var1(), FLA_QR_UT_ops_var2(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ofs_var3(), FLA_Tridiag_UT_l_step_ops_var1(), FLA_Tridiag_UT_l_step_ops_var2(), FLA_Tridiag_UT_l_step_ops_var3(), FLA_Ttmm_l_ops_var2(), and FLA_Ttmm_u_ops_var2().

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) )
    {
        int n_elem;

        if ( bl1_does_trans( transa ) ) n_elem = n;
        else                            n_elem = m;

        bl1_sscalv( BLIS1_NO_CONJUGATE,
                    n_elem,
                    beta,
                    y, incy );
        return;
    }

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_toggle_trans( transa );
    }

    bl1_sgemv_blas( transa,
                    m,
                    n,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_sgemv_blas ( trans1_t  transa,
int  m,
int  n,
float *  alpha,
float *  a,
int  lda,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_param_map_to_netlib_trans(), cblas_sgemv(), CblasColMajor, and F77_sgemv().

Referenced by bl1_sgemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_TRANSPOSE cblas_transa;

    bl1_param_map_to_netlib_trans( transa, &cblas_transa );

    cblas_sgemv( cblas_order,
                 cblas_transa,
                 m,
                 n,
                 *alpha,
                 a, lda,
                 x, incx,
                 *beta,
                 y, incy );
#else
    char blas_transa;

    bl1_param_map_to_netlib_trans( transa, &blas_transa );

    F77_sgemv( &blas_transa,
               &m,
               &n,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_sger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
float *  alpha,
float *  x,
int  incx,
float *  y,
int  incy,
float *  a,
int  a_rs,
int  a_cs 
)

References bl1_is_row_storage(), bl1_screate_contigm(), bl1_sfree_saved_contigm(), bl1_sger_blas(), and bl1_zero_dim2().

Referenced by FLA_Apply_H2_UT_l_ops_var1(), FLA_Apply_H2_UT_r_ops_var1(), FLA_Apply_HUD_UT_l_ops_var1(), FLA_Bidiag_UT_u_step_ofs_var3(), FLA_Bidiag_UT_u_step_ops_var2(), FLA_Bidiag_UT_u_step_ops_var3(), FLA_Eig_gest_il_ops_var3(), FLA_Eig_gest_il_ops_var4(), FLA_Eig_gest_iu_ops_var3(), FLA_Eig_gest_iu_ops_var4(), FLA_Eig_gest_nl_ops_var4(), FLA_Eig_gest_nu_ops_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofs_var2(), FLA_Hess_UT_step_ofs_var3(), FLA_Hess_UT_step_ofs_var4(), FLA_Hess_UT_step_ops_var2(), FLA_Hess_UT_step_ops_var3(), FLA_Hess_UT_step_ops_var4(), FLA_LU_nopiv_ops_var5(), FLA_LU_piv_ops_var5(), FLA_Lyap_h_ops_var2(), FLA_Lyap_n_ops_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_ops_var3(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var3(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var3(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var3(), and FLA_Trinv_uu_ops_var4().

{
    int       m_save    = m;
    int       n_save    = n;
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_swap_ints( incx, incy );
        bl1_swap_conj( conjx, conjy );
        bl1_sswap_pointers( x, y );
    }

    // Initialize with values assuming no conjugation of x.
    bl1_sger_blas( m,
                   n,
                   alpha,
                   x, incx,
                   y, incy,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_sfree_saved_contigm( m_save,
                             n_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_sger_blas ( int  m,
int  n,
float *  alpha,
float *  x,
int  incx,
float *  y,
int  incy,
float *  a,
int  lda 
)

References cblas_sger(), CblasColMajor, and F77_sger().

Referenced by bl1_sger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_sger( cblas_order,
                m,
                n,
                *alpha,
                x, incx,
                y, incy,
                a, lda );
#else
    F77_sger( &m,
              &n,
              alpha,
              x, &incx,
              y, &incy,
              a, &lda );
#endif
}
void bl1_shemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float *  alpha,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)
void bl1_sher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  a,
int  a_rs,
int  a_cs 
)

References bl1_ssyr().

{
    bl1_ssyr( uplo,
              m,
              alpha,
              x, incx,
              a, a_rs, a_cs );
}
void bl1_sher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  y,
int  incy,
float *  a,
int  a_rs,
int  a_cs 
)
void bl1_ssymv ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_ssymv_blas(), and bl1_zero_dim1().

Referenced by bl1_shemv(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Symv_external(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ofs_var3(), FLA_Tridiag_UT_l_step_ops_var1(), FLA_Tridiag_UT_l_step_ops_var2(), and FLA_Tridiag_UT_l_step_ops_var3().

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_ssymv_blas( uplo,
                    m,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ssymv_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  a,
int  lda,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_param_map_to_netlib_uplo(), cblas_ssymv(), CblasColMajor, and F77_ssymv().

Referenced by bl1_ssymv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_ssymv( cblas_order,
                 cblas_uplo,
                 m,
                 *alpha,
                 a, lda,
                 x, incx,
                 *beta,
                 y, incy );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_ssymv( &blas_uplo,
               &m,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_ssyr ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  a,
int  a_rs,
int  a_cs 
)

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_saved_contigm(), bl1_ssyr_blas(), and bl1_zero_dim1().

Referenced by bl1_sher(), FLA_Chol_l_ops_var3(), FLA_Chol_u_ops_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Syr_external(), FLA_Ttmm_l_ops_var1(), and FLA_Ttmm_u_ops_var1().

{
    int       m_save    = m;
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_ssyr_blas( uplo,
                   m,
                   alpha,
                   x, incx,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_sfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_ssyr2 ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  y,
int  incy,
float *  a,
int  a_rs,
int  a_cs 
)

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_saved_contigm(), bl1_ssyr2_blas(), and bl1_zero_dim1().

Referenced by bl1_sher2(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Syr2_external(), FLA_Tridiag_UT_l_step_ofs_var2(), FLA_Tridiag_UT_l_step_ops_var1(), and FLA_Tridiag_UT_l_step_ops_var2().

{
    int       m_save    = m;
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_ssyr2_blas( uplo,
                    m,
                    alpha,
                    x, incx,
                    y, incy,
                    a, lda );

    // Free the temporary contiguous matrix.
    bl1_sfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_ssyr2_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  y,
int  incy,
float *  a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_ssyr2(), CblasColMajor, and F77_ssyr2().

Referenced by bl1_ssyr2().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_ssyr2( cblas_order,
                 cblas_uplo,
                 m,
                 *alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_ssyr2( &blas_uplo,
               &m,
               alpha,
               x, &incx,
               y, &incy,
               a, &lda );
#endif
}
void bl1_ssyr_blas ( uplo1_t  uplo,
int  m,
float *  alpha,
float *  x,
int  incx,
float *  a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_ssyr(), CblasColMajor, and F77_ssyr().

Referenced by bl1_ssyr().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_ssyr( cblas_order,
                cblas_uplo,
                m,
                *alpha,
                x, incx,
                a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_ssyr( &blas_uplo,
              &m,
              alpha,
              x, &incx,
              a, &lda );
#endif
}
void bl1_strmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx 
)

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_strmv_blas(), and bl1_zero_dim1().

Referenced by bl1_strmvsx(), FLA_CAQR2_UT_ops_var1(), FLA_Eig_gest_nl_ops_var1(), FLA_Eig_gest_nl_ops_var5(), FLA_Eig_gest_nu_ops_var1(), FLA_Eig_gest_nu_ops_var5(), FLA_Hess_UT_step_ops_var5(), FLA_Trinv_ln_ops_var1(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var1(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var1(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var1(), FLA_Trinv_uu_ops_var4(), FLA_Trmv_external(), FLA_Ttmm_l_ops_var3(), and FLA_Ttmm_u_ops_var3().

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    bl1_strmv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a, lda,
                    x, incx );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_strmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  a,
int  lda,
float *  x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_strmv(), CblasColMajor, and F77_strmv().

Referenced by bl1_strmv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_strmv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_strmv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_strmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  alpha,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_sallocv(), bl1_saxpyv(), bl1_scopyv(), bl1_screate_contigmr(), bl1_sfree(), bl1_sfree_contigm(), bl1_sscalv(), bl1_strmv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_ops_var5().

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    float*    x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_sallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_scopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_strmv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_sscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_saxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_sfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_strsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx 
)

References bl1_is_row_storage(), bl1_screate_contigmr(), bl1_sfree_contigm(), bl1_strsv_blas(), and bl1_zero_dim1().

Referenced by bl1_strsvsx(), FLA_Chol_l_ops_var1(), FLA_Chol_u_ops_var1(), FLA_Eig_gest_il_ops_var1(), FLA_Eig_gest_il_ops_var5(), FLA_Eig_gest_iu_ops_var1(), FLA_Eig_gest_iu_ops_var5(), FLA_Hess_UT_step_ops_var5(), FLA_LU_nopiv_ops_var1(), FLA_LU_nopiv_ops_var2(), FLA_LU_nopiv_ops_var3(), FLA_LU_piv_ops_var3(), FLA_Lyap_h_ops_var1(), FLA_Lyap_h_ops_var2(), FLA_Lyap_h_ops_var3(), FLA_Lyap_h_ops_var4(), FLA_Lyap_n_ops_var1(), FLA_Lyap_n_ops_var2(), FLA_Lyap_n_ops_var3(), FLA_Lyap_n_ops_var4(), FLA_Trinv_ln_ops_var2(), FLA_Trinv_ln_ops_var4(), FLA_Trinv_lu_ops_var2(), FLA_Trinv_lu_ops_var4(), FLA_Trinv_un_ops_var2(), FLA_Trinv_un_ops_var4(), FLA_Trinv_uu_ops_var2(), FLA_Trinv_uu_ops_var4(), and FLA_Trsv_external().

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    bl1_strsv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a, lda,
                    x, incx );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_strsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  a,
int  lda,
float *  x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_strsv(), CblasColMajor, and F77_strsv().

Referenced by bl1_strsv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_strsv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_strsv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_strsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
float *  alpha,
float *  a,
int  a_rs,
int  a_cs,
float *  x,
int  incx,
float *  beta,
float *  y,
int  incy 
)

References bl1_sallocv(), bl1_saxpyv(), bl1_scopyv(), bl1_screate_contigmr(), bl1_sfree(), bl1_sfree_contigm(), bl1_sscalv(), bl1_strsv(), bl1_zero_dim1(), and BLIS1_NO_CONJUGATE.

{
    float*    a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    float*    x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_screate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_sallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_scopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_strsv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_sscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_saxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_sfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_sfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_zgemv ( trans1_t  transa,
conj1_t  conjx,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_does_trans(), bl1_is_conj(), bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_z0(), bl1_z1(), bl1_zallocv(), bl1_zaxpyv(), bl1_zconjv(), bl1_zcopyv(), bl1_zcreate_contigm(), bl1_zero_dim2(), bl1_zfree(), bl1_zfree_contigm(), bl1_zgemv_blas(), bl1_zscalv(), BLIS1_CONJUGATE, BLIS1_NO_CONJUGATE, and BLIS1_NO_TRANSPOSE.

Referenced by FLA_Accum_T_UT_fc_opz_var1(), FLA_Accum_T_UT_fr_opz_var1(), FLA_Apply_H2_UT_l_opz_var1(), FLA_Apply_H2_UT_r_opz_var1(), FLA_Apply_HUD_UT_l_opz_var1(), FLA_Bidiag_UT_u_step_ofz_var2(), FLA_Bidiag_UT_u_step_ofz_var3(), FLA_Bidiag_UT_u_step_ofz_var4(), FLA_Bidiag_UT_u_step_opz_var1(), FLA_Bidiag_UT_u_step_opz_var2(), FLA_Bidiag_UT_u_step_opz_var3(), FLA_Bidiag_UT_u_step_opz_var4(), FLA_Bidiag_UT_u_step_opz_var5(), FLA_CAQR2_UT_opz_var1(), FLA_Chol_l_opz_var2(), FLA_Chol_u_opz_var2(), FLA_Eig_gest_il_opz_var2(), FLA_Eig_gest_il_opz_var3(), FLA_Eig_gest_iu_opz_var2(), FLA_Eig_gest_iu_opz_var3(), FLA_Eig_gest_nl_opz_var2(), FLA_Eig_gest_nu_opz_var2(), FLA_Gemv_external(), FLA_Gemvc_external(), FLA_Hess_UT_step_ofz_var2(), FLA_Hess_UT_step_ofz_var3(), FLA_Hess_UT_step_ofz_var4(), FLA_Hess_UT_step_opz_var1(), FLA_Hess_UT_step_opz_var2(), FLA_Hess_UT_step_opz_var3(), FLA_Hess_UT_step_opz_var4(), FLA_Hess_UT_step_opz_var5(), FLA_LQ_UT_opz_var2(), FLA_LU_nopiv_opz_var2(), FLA_LU_nopiv_opz_var3(), FLA_LU_nopiv_opz_var4(), FLA_LU_piv_opz_var3(), FLA_LU_piv_opz_var4(), FLA_Lyap_h_opz_var2(), FLA_Lyap_h_opz_var3(), FLA_Lyap_n_opz_var2(), FLA_Lyap_n_opz_var3(), FLA_QR2_UT_opz_var1(), FLA_QR_UT_opz_var2(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_ofz_var3(), FLA_Tridiag_UT_l_step_opz_var1(), FLA_Tridiag_UT_l_step_opz_var2(), FLA_Tridiag_UT_l_step_opz_var3(), FLA_Ttmm_l_opz_var2(), and FLA_Ttmm_u_opz_var2().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex  zero = bl1_z0();
    dcomplex  one  = bl1_z1();
    dcomplex* x_conj;
    dcomplex* ax;
    int       lda, inca;
    int       n_x;
    int       incx_conj;
    int       incax;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) )
    {
        int n_elem;

        if ( bl1_does_trans( transa ) ) n_elem = n;
        else                            n_elem = m;

        bl1_zscalv( BLIS1_NO_CONJUGATE,
                    n_elem,
                    beta,
                    y, incy );
        return;
    }

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_toggle_trans( transa );
    }

    // Initialize with values assuming no conjugation of x.
    x_conj    = x;
    incx_conj = incx;

    // We need a temporary vector for the cases when x is conjugated, and
    // also for the cases where A is conjugated.
    if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
    {
        if ( bl1_does_trans( transa ) ) n_x = m;
        else                            n_x = n;

        x_conj    = bl1_zallocv( n_x );
        incx_conj = 1;

        bl1_zcopyv( conjx,
                    n_x,
                    x,      incx,
                    x_conj, incx_conj );
    }

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    if ( bl1_is_conjnotrans( transa ) )
    {
        // We need a temporary vector for the product A * conj(x), which is
        // conformal to y. We know we are not transposing, so y is length m.
        ax    = bl1_zallocv( m );
        incax = 1;
        
        // Start by conjugating the contents of the temporary copy of x.
        bl1_zconjv( n,
                    x_conj, incx_conj );

        // Compute A * conj(x) where x is the temporary copy of x created above.
        bl1_zgemv_blas( BLIS1_NO_TRANSPOSE,
                        m,
                        n,
                        &one,
                        a,      lda,
                        x_conj, incx_conj,
                        &zero,
                        ax,     incax );

        // Scale y by beta.
        bl1_zscalv( BLIS1_NO_CONJUGATE,
                    m,
                    beta,
                    y, incy );

        // And finally, accumulate alpha * conj( A * conj(x) ) into y.
        bl1_zaxpyv( BLIS1_CONJUGATE,
                    m,
                    alpha,
                    ax, incax,
                    y,  incy);

        // Free the temporary vector for Ax.
        bl1_zfree( ax );
    }
    else // notrans, trans, or conjtrans
    {
        bl1_zgemv_blas( transa,
                        m,
                        n,
                        alpha,
                        a,      lda,
                        x_conj, incx_conj,
                        beta,
                        y,      incy );
    }

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conjx ) || bl1_is_conjnotrans( transa ) )
        bl1_zfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_zgemv_blas ( trans1_t  transa,
int  m,
int  n,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_param_map_to_netlib_trans(), cblas_zgemv(), CblasColMajor, and F77_zgemv().

Referenced by bl1_zgemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_TRANSPOSE cblas_transa;

    bl1_param_map_to_netlib_trans( transa, &cblas_transa );

    cblas_zgemv( cblas_order,
                 cblas_transa,
                 m,
                 n,
                 alpha,
                 a, lda,
                 x, incx,
                 beta,
                 y, incy );
#else
    char blas_transa;

    bl1_param_map_to_netlib_trans( transa, &blas_transa );

    F77_zgemv( &blas_transa,
               &m,
               &n,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_zger ( conj1_t  conjx,
conj1_t  conjy,
int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigm(), bl1_zero_dim2(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zgerc_blas(), bl1_zgeru_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Apply_H2_UT_l_opz_var1(), FLA_Apply_H2_UT_r_opz_var1(), FLA_Apply_HUD_UT_l_opz_var1(), FLA_Bidiag_UT_u_step_ofz_var3(), FLA_Bidiag_UT_u_step_opz_var2(), FLA_Bidiag_UT_u_step_opz_var3(), FLA_Eig_gest_il_opz_var3(), FLA_Eig_gest_il_opz_var4(), FLA_Eig_gest_iu_opz_var3(), FLA_Eig_gest_iu_opz_var4(), FLA_Eig_gest_nl_opz_var4(), FLA_Eig_gest_nu_opz_var4(), FLA_Ger_external(), FLA_Gerc_external(), FLA_Hess_UT_step_ofz_var2(), FLA_Hess_UT_step_ofz_var3(), FLA_Hess_UT_step_ofz_var4(), FLA_Hess_UT_step_opz_var2(), FLA_Hess_UT_step_opz_var3(), FLA_Hess_UT_step_opz_var4(), FLA_LU_nopiv_opz_var5(), FLA_LU_piv_opz_var5(), FLA_Lyap_h_opz_var2(), FLA_Lyap_n_opz_var2(), FLA_SA_LU_unb(), FLA_Trinv_ln_opz_var3(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var3(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var3(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var3(), and FLA_Trinv_uu_opz_var4().

{
    int       m_save    = m;
    int       n_save    = n;
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim2( m, n ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigm( m,
                         n,
                         a_save, a_rs_save, a_cs_save,
                         &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( m, n );
        bl1_swap_ints( lda, inca );
        bl1_swap_ints( incx, incy );
        bl1_swap_conj( conjx, conjy );
        bl1_zswap_pointers( x, y );
    }

    // Initialize with values assuming no conjugation of x.
    x_conj    = x;
    incx_conj = incx;

    // We need a temporary vector for the cases when x is conjugated.
    if ( bl1_is_conj( conjx ) )
    {
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    // Conjugation of y is supported in the BLAS.
    if ( bl1_is_conj( conjy ) )
    {
        bl1_zgerc_blas( m,
                        n,
                        alpha,
                        x_conj, incx_conj,
                        y,      incy, 
                        a,      lda );
    }
    else
    {
        bl1_zgeru_blas( m,
                        n,
                        alpha,
                        x_conj, incx_conj,
                        y,      incy, 
                        a,      lda );
    }

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conjx ) )
        bl1_zfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_zfree_saved_contigm( m_save,
                             n_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_zgerc_blas ( int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)

References cblas_zgerc(), CblasColMajor, and F77_zgerc().

Referenced by bl1_zger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_zgerc( cblas_order,
                 m,
                 n,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    F77_zgerc ( &m,
                &n,
                alpha,
                x, &incx,
                y, &incy,
                a, &lda );
#endif
}
void bl1_zgeru_blas ( int  m,
int  n,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)

References cblas_zgeru(), CblasColMajor, and F77_zgeru().

Referenced by bl1_zger().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;

    cblas_zgeru( cblas_order,
                 m,
                 n,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    F77_zgeru ( &m,
                &n,
                alpha,
                x, &incx,
                y, &incy,
                a, &lda );
#endif
}
void bl1_zhemv ( uplo1_t  uplo,
conj1_t  conj,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_is_conj(), bl1_is_row_storage(), bl1_z0(), bl1_z1(), bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zhemv_blas(), bl1_zscalv(), BLIS1_CONJUGATE, and BLIS1_NO_CONJUGATE.

Referenced by FLA_Eig_gest_il_opz_var1(), FLA_Eig_gest_il_opz_var2(), FLA_Eig_gest_iu_opz_var1(), FLA_Eig_gest_iu_opz_var2(), FLA_Eig_gest_nl_opz_var1(), FLA_Eig_gest_nl_opz_var2(), FLA_Eig_gest_nu_opz_var1(), FLA_Eig_gest_nu_opz_var2(), FLA_Hemv_external(), FLA_Hemvc_external(), FLA_Lyap_h_opz_var1(), FLA_Lyap_n_opz_var1(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_ofz_var3(), FLA_Tridiag_UT_l_step_opz_var1(), FLA_Tridiag_UT_l_step_opz_var2(), and FLA_Tridiag_UT_l_step_opz_var3().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex  zero = bl1_z0();
    dcomplex  one  = bl1_z1();
    dcomplex* x_conj;
    dcomplex* ax;
    int       lda, inca;
    int       incx_conj;
    int       incax;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // We want to handle the case where A is conjugated, but without
    // explicitly or conjugating A. To do so, we leverage the fact that
    // computing the product conj(A) * x is equivalent to computing
    // conj( A * conj(x) ).
    if ( bl1_is_conj( conj ) )
    {
        // We need a temporary vector so we can create a conjugated copy of x.
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );

        // We need a temporary vector for the product A * conj(x), which is
        // conformal to y (and x).
        ax    = bl1_zallocv( m );
        incax = 1;
        
        // Compute A * conj(x) where x is the temporary copy of x created above.
        bl1_zhemv_blas( uplo,
                        m,
                        &one,
                        a,      lda,
                        x_conj, incx_conj,
                        &zero,
                        ax,     incax );

        // Scale y by beta.
        bl1_zscalv( BLIS1_NO_CONJUGATE,
                    m,
                    beta,
                    y, incy );

        // And finally, accumulate alpha * conj( A * conj(x) ) into y.
        bl1_zaxpyv( BLIS1_CONJUGATE,
                    m,
                    alpha,
                    ax, incax,
                    y,  incy);

        // Free the temporary vectors for x and Ax.
        bl1_zfree( x_conj );
        bl1_zfree( ax );
    }
    else // noconj
    {
        bl1_zhemv_blas( uplo,
                        m,
                        alpha,
                        a, lda,
                        x, incx,
                        beta,
                        y, incy );
    }

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_zhemv_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_param_map_to_netlib_uplo(), cblas_zhemv(), CblasColMajor, and F77_zhemv().

Referenced by bl1_zhemv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_zhemv( cblas_order,
                 cblas_uplo,
                 m,
                 alpha,
                 a, lda,
                 x, incx,
                 beta,
                 y, incy );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_zhemv( &blas_uplo,
               &m,
               alpha,
               a, &lda,
               x, &incx,
               beta,
               y, &incy );
#endif
}
void bl1_zher ( uplo1_t  uplo,
conj1_t  conj,
int  m,
double *  alpha,
dcomplex x,
int  incx,
dcomplex a,
int  a_rs,
int  a_cs 
)

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zher_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Chol_l_opz_var3(), FLA_Chol_u_opz_var3(), FLA_Her_external(), FLA_Herc_external(), FLA_Ttmm_l_opz_var1(), and FLA_Ttmm_u_opz_var1().

{
    int       m_save    = m;
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // Initialize with values assuming no conjugation of ( x * x' ).
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the case where ( x * x' ) is conjugated, but
    // without explicitly conjugating the matrix. To do so, we leverage
    // the fact that computing the product conj( x * x' ) is equivalent
    // to computing ( conj(x) * conj(x)' ), since ( x * x' ) is Hermitian.
    if ( bl1_is_conj( conj ) )
    {
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_zher_blas( uplo,
                   m,
                   alpha,
                   x_conj, incx_conj,
                   a,      lda );

    // Free the temporary conjugated x vector.
    if ( bl1_is_conj( conj ) )
        bl1_zfree( x_conj );

    // Free the temporary contiguous matrix.
    bl1_zfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_zher2 ( uplo1_t  uplo,
conj1_t  conj,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)

References bl1_is_conj(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_saved_contigm(), bl1_zher2_blas(), and BLIS1_CONJUGATE.

Referenced by FLA_Eig_gest_il_opz_var4(), FLA_Eig_gest_il_opz_var5(), FLA_Eig_gest_iu_opz_var4(), FLA_Eig_gest_iu_opz_var5(), FLA_Eig_gest_nl_opz_var4(), FLA_Eig_gest_nl_opz_var5(), FLA_Eig_gest_nu_opz_var4(), FLA_Eig_gest_nu_opz_var5(), FLA_Her2_external(), FLA_Her2c_external(), FLA_Lyap_h_opz_var4(), FLA_Lyap_n_opz_var4(), FLA_Tridiag_UT_l_step_ofz_var2(), FLA_Tridiag_UT_l_step_opz_var1(), and FLA_Tridiag_UT_l_step_opz_var2().

{
    int       m_save    = m;
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_conj;
    dcomplex* y_conj;
    int       incx_conj;
    int       incy_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_conj( conj );
    }

    // Initialize with values assuming no conjugation of ( x * y' ) or
    // ( y * x' ).
    x_conj    = x;
    incx_conj = incx;
    y_conj    = y;
    incy_conj = incy;

    // We want to handle the case where ( x * y' ) and ( y * x' ) are
    // conjugated, but without explicitly conjugating the matrices. To do
    // so, we leverage the fact that computing the products conj( x * y' )
    // and conj( y * x' ) is equivalent to computing ( conj(x) * conj(y)' )
    // and ( conj(y) * conj(x)' ), respectively.
    if ( bl1_is_conj( conj ) )
    {
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        y_conj    = bl1_zallocv( m );
        incy_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    y,      incy,
                    y_conj, incy_conj );
    }

    bl1_zher2_blas( uplo,
                    m,
                    alpha,
                    x_conj, incx_conj,
                    y_conj, incy_conj,
                    a,      lda );

    // Free the temporary conjugated x and y vectors.
    if ( bl1_is_conj( conj ) )
    {
        bl1_zfree( x_conj );
        bl1_zfree( y_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_zfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_zher2_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_zher2(), CblasColMajor, and F77_zher2().

Referenced by bl1_zher2().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_zher2( cblas_order,
                 cblas_uplo,
                 m,
                 alpha,
                 x, incx,
                 y, incy,
                 a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_zher2( &blas_uplo,
               &m,
               alpha,
               x, &incx,
               y, &incy,
               a, &lda );
#endif
}
void bl1_zher_blas ( uplo1_t  uplo,
int  m,
double *  alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)

References bl1_param_map_to_netlib_uplo(), cblas_zher(), CblasColMajor, and F77_zher().

Referenced by bl1_zher().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    cblas_zher( cblas_order,
                cblas_uplo,
                m,
                *alpha,
                x, incx,
                a, lda );
#else
    char blas_uplo;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    F77_zher( &blas_uplo,
              &m,
              alpha,
              x, &incx,
              a, &lda );
#endif
}
void bl1_zsymv ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_contigm(), and bl1_zsymv_blas().

Referenced by FLA_Symv_external().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_zsymv_blas( uplo,
                    m,
                    alpha,
                    a, lda,
                    x, incx,
                    beta,
                    y, incy );

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_zsymv_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex a,
int  lda,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_param_map_to_netlib_side(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_LEFT, BLIS1_NO_CONJUGATE, cblas_zsymm(), CblasColMajor, and F77_zsymm().

Referenced by bl1_zsymv().

{
    dcomplex*        x_copy;
    dcomplex*        y_copy;
    int              n   = 1;
    int              ldx = m;
    int              ldy = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_SIDE  cblas_side;
    enum CBLAS_UPLO  cblas_uplo;

    bl1_param_map_to_netlib_side( BLIS1_LEFT, &cblas_side );
    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );

    x_copy = bl1_zallocv( m );
    y_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    cblas_zsymm( cblas_order,
                 cblas_side,
                 cblas_uplo,
                 m,
                 n,
                 alpha,
                 a,      lda,
                 x_copy, ldx,
                 beta,
                 y_copy, ldy );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y_copy, 1,
                y,      incy );

    bl1_zfree( x_copy );
    bl1_zfree( y_copy );

#else
    char blas_side;
    char blas_uplo;

    bl1_param_map_to_netlib_side( BLIS1_LEFT, &blas_side );
    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );

    x_copy = bl1_zallocv( m );
    y_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    F77_zsymm ( &blas_side,
                &blas_uplo,
                &m,
                &n,
                alpha,
                a,      &lda,
                x_copy, &ldx,
                beta,
                y_copy, &ldy );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y_copy, 1,
                y,      incy );

    bl1_zfree( x_copy );
    bl1_zfree( y_copy );
#endif
}
void bl1_zsyr ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  a_rs,
int  a_cs 
)

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_saved_contigm(), and bl1_zsyr_blas().

Referenced by FLA_Syr_external().

{
    int       m_save    = m;
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_zsyr_blas( uplo,
                   m,
                   alpha,
                   x, incx,
                   a, lda );

    // Free the temporary contiguous matrix.
    bl1_zfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_zsyr2 ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  a_rs,
int  a_cs 
)

References bl1_is_row_storage(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree_saved_contigm(), and bl1_zsyr2_blas().

Referenced by FLA_Syr2_external().

{
    int       m_save    = m;
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
    }

    bl1_zsyr2_blas( uplo,
                    m,
                    alpha,
                    x, incx,
                    y, incy,
                    a, lda );

    // Free the temporary contiguous matrix.
    bl1_zfree_saved_contigm( m_save,
                             m_save,
                             a_save, a_rs_save, a_cs_save,
                             &a,     &a_rs,     &a_cs );
}
void bl1_zsyr2_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex y,
int  incy,
dcomplex a,
int  lda 
)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_zsyr2k(), CblasColMajor, F77_zsyr2k(), dcomplex::imag, and dcomplex::real.

Referenced by bl1_zsyr2().

{
    dcomplex* x_copy;
    dcomplex* y_copy;
    dcomplex  beta;
    int       k   = 1;
    int       ldx = m;
    int       ldy = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_UPLO      cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &cblas_trans );

    x_copy = bl1_zallocv( m );
    y_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    cblas_zsyr2k( cblas_order,
                  cblas_uplo,
                  cblas_trans,
                  m,
                  k,
                  alpha,
                  x_copy, ldx,
                  y_copy, ldy,
                  &beta,
                  a,      lda );

    bl1_zfree( x_copy );
    bl1_zfree( y_copy );
#else
    char blas_uplo;
    char blas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &blas_trans );

    x_copy = bl1_zallocv( m );
    y_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                y,      incy,
                y_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    F77_zsyr2k ( &blas_uplo,
                 &blas_trans,
                 &m,
                 &k,
                 alpha,
                 x_copy, &ldx,
                 y_copy, &ldy,
                 &beta,
                 a,      &lda );

    bl1_zfree( x_copy );
    bl1_zfree( y_copy );
#endif
}
void bl1_zsyr_blas ( uplo1_t  uplo,
int  m,
dcomplex alpha,
dcomplex x,
int  incx,
dcomplex a,
int  lda 
)

References bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), bl1_zallocv(), bl1_zcopyv(), bl1_zfree(), BLIS1_NO_CONJUGATE, BLIS1_NO_TRANSPOSE, cblas_zsyrk(), CblasColMajor, F77_zsyrk(), dcomplex::imag, and dcomplex::real.

Referenced by bl1_zsyr().

{
    dcomplex* x_copy;
    dcomplex  beta;
    int       k   = 1;
    int       ldx = m;

#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER     cblas_order = CblasColMajor;
    enum CBLAS_UPLO      cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &cblas_trans );

    x_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    cblas_zsyrk( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 m,
                 k,
                 alpha,
                 x_copy, ldx,
                 &beta,
                 a,      lda );

    bl1_zfree( x_copy );
#else
    char blas_uplo;
    char blas_trans;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( BLIS1_NO_TRANSPOSE, &blas_trans );

    x_copy = bl1_zallocv( m );

    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_copy, 1 );

    beta.real = 1.0;
    beta.imag = 0.0;

    F77_zsyrk ( &blas_uplo,
                &blas_trans,
                &m,
                &k,
                alpha,
                x_copy, &ldx,
                &beta,
                a,      &lda );

    bl1_zfree( x_copy );
#endif
}
void bl1_ztrmv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx 
)

References bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_ztrmv_blas(), and BLIS1_CONJUGATE.

Referenced by bl1_ztrmvsx(), FLA_CAQR2_UT_opz_var1(), FLA_Eig_gest_nl_opz_var1(), FLA_Eig_gest_nl_opz_var5(), FLA_Eig_gest_nu_opz_var1(), FLA_Eig_gest_nu_opz_var5(), FLA_Hess_UT_step_opz_var5(), FLA_Trinv_ln_opz_var1(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var1(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var1(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var1(), FLA_Trinv_uu_opz_var4(), FLA_Trmv_external(), FLA_Ttmm_l_opz_var3(), and FLA_Ttmm_u_opz_var3().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    // Initialize with values assuming that trans is not conjnotrans.
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    // Note: strictly speaking, we don't need to create a copy of x since
    // the operation is simpler than, say, gemv. However, we create a copy
    // anyway since in practice it performs better due to increased spatial
    // locality.
    if ( bl1_is_conjnotrans( trans ) )
    {
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_ztrmv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a,      lda,
                    x_conj, incx_conj );

    // Save the contents of and then free the temporary conjugated x vector.
    if ( bl1_is_conjnotrans( trans ) )
    {
        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x_conj, incx_conj,
                    x,      incx );

        bl1_zfree( x_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ztrmv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  lda,
dcomplex x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ztrmv(), CblasColMajor, and F77_ztrmv().

Referenced by bl1_ztrmv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_ztrmv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_ztrmv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_ztrmvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zscalv(), bl1_ztrmv(), and BLIS1_NO_CONJUGATE.

Referenced by FLA_Hess_UT_step_opz_var5().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_zallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_ztrmv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_zscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_zaxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_zfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ztrsv ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx 
)

References bl1_is_conjnotrans(), bl1_is_row_storage(), bl1_zallocv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_ztrsv_blas(), and BLIS1_CONJUGATE.

Referenced by bl1_ztrsvsx(), FLA_Chol_l_opz_var1(), FLA_Chol_u_opz_var1(), FLA_Eig_gest_il_opz_var1(), FLA_Eig_gest_il_opz_var5(), FLA_Eig_gest_iu_opz_var1(), FLA_Eig_gest_iu_opz_var5(), FLA_Hess_UT_step_opz_var5(), FLA_LU_nopiv_opz_var1(), FLA_LU_nopiv_opz_var2(), FLA_LU_nopiv_opz_var3(), FLA_LU_piv_opz_var3(), FLA_Lyap_h_opz_var1(), FLA_Lyap_h_opz_var2(), FLA_Lyap_h_opz_var3(), FLA_Lyap_h_opz_var4(), FLA_Lyap_n_opz_var1(), FLA_Lyap_n_opz_var2(), FLA_Lyap_n_opz_var3(), FLA_Lyap_n_opz_var4(), FLA_Trinv_ln_opz_var2(), FLA_Trinv_ln_opz_var4(), FLA_Trinv_lu_opz_var2(), FLA_Trinv_lu_opz_var4(), FLA_Trinv_un_opz_var2(), FLA_Trinv_un_opz_var4(), FLA_Trinv_uu_opz_var2(), FLA_Trinv_uu_opz_var4(), and FLA_Trsv_external().

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_conj;
    int       incx_conj;
    int       lda, inca;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Initialize with values assuming column-major storage.
    lda  = a_cs;
    inca = a_rs;

    // If A is a row-major matrix, then we can use the underlying column-major
    // BLAS implementation by fiddling with the parameters.
    if ( bl1_is_row_storage( a_rs, a_cs ) )
    {
        bl1_swap_ints( lda, inca );
        bl1_toggle_uplo( uplo );
        bl1_toggle_trans( trans );
    }

    // Initialize with values assuming that trans is not conjnotrans.
    x_conj    = x;
    incx_conj = incx;

    // We want to handle the conjnotrans case, but without explicitly
    // conjugating A. To do so, we leverage the fact that computing the
    // product conj(A) * x is equivalent to computing conj( A * conj(x) ).
    // Note: strictly speaking, we don't need to create a copy of x since
    // the operation is simpler than, say, gemv. However, we create a copy
    // anyway since in practice it performs better due to increased spatial
    // locality.
    if ( bl1_is_conjnotrans( trans ) )
    {
        x_conj    = bl1_zallocv( m );
        incx_conj = 1;

        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x,      incx,
                    x_conj, incx_conj );
    }

    bl1_ztrsv_blas( uplo,
                    trans,
                    diag,
                    m,
                    a,      lda,
                    x_conj, incx_conj );

    // Save the contents of and then free the temporary conjugated x vector.
    if ( bl1_is_conjnotrans( trans ) )
    {
        bl1_zcopyv( BLIS1_CONJUGATE,
                    m,
                    x_conj, incx_conj,
                    x,      incx );

        bl1_zfree( x_conj );
    }

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}
void bl1_ztrsv_blas ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex a,
int  lda,
dcomplex x,
int  incx 
)

References bl1_param_map_to_netlib_diag(), bl1_param_map_to_netlib_trans(), bl1_param_map_to_netlib_uplo(), cblas_ztrsv(), CblasColMajor, and F77_ztrsv().

Referenced by bl1_ztrsv().

{
#ifdef BLIS1_ENABLE_CBLAS_INTERFACES
    enum CBLAS_ORDER cblas_order = CblasColMajor;
    enum CBLAS_UPLO  cblas_uplo;
    enum CBLAS_TRANSPOSE cblas_trans;
    enum CBLAS_DIAG  cblas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &cblas_uplo );
    bl1_param_map_to_netlib_trans( trans, &cblas_trans );
    bl1_param_map_to_netlib_diag( diag, &cblas_diag );

    cblas_ztrsv( cblas_order,
                 cblas_uplo,
                 cblas_trans,
                 cblas_diag,
                 m,
                 a, lda,
                 x, incx );
#else
    char blas_uplo;
    char blas_trans;
    char blas_diag;

    bl1_param_map_to_netlib_uplo( uplo, &blas_uplo );
    bl1_param_map_to_netlib_trans( trans, &blas_trans );
    bl1_param_map_to_netlib_diag( diag, &blas_diag );

    F77_ztrsv( &blas_uplo,
               &blas_trans,
               &blas_diag,
               &m,
               a, &lda,
               x, &incx );
#endif
}
void bl1_ztrsvsx ( uplo1_t  uplo,
trans1_t  trans,
diag1_t  diag,
int  m,
dcomplex alpha,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex x,
int  incx,
dcomplex beta,
dcomplex y,
int  incy 
)

References bl1_zallocv(), bl1_zaxpyv(), bl1_zcopyv(), bl1_zcreate_contigmr(), bl1_zero_dim1(), bl1_zfree(), bl1_zfree_contigm(), bl1_zscalv(), bl1_ztrsv(), and BLIS1_NO_CONJUGATE.

{
    dcomplex* a_save    = a;
    int       a_rs_save = a_rs;
    int       a_cs_save = a_cs;
    dcomplex* x_temp;
    int       incx_temp;

    // Return early if possible.
    if ( bl1_zero_dim1( m ) ) return;

    // If necessary, allocate, initialize, and use a temporary contiguous
    // copy of the matrix rather than the original matrix.
    bl1_zcreate_contigmr( uplo,
                          m,
                          m,
                          a_save, a_rs_save, a_cs_save,
                          &a,     &a_rs,     &a_cs );

    // Allocate a temporary vector conformal to x.
    x_temp    = bl1_zallocv( m );
    incx_temp = 1;

    // Copy x to a temporary vector.
    bl1_zcopyv( BLIS1_NO_CONJUGATE,
                m,
                x,      incx,
                x_temp, incx_temp );

    // Perform the operation, storing the result to x_temp.
    bl1_ztrsv( uplo,
               trans,
               diag,
               m,
               a,      a_rs, a_cs,
               x_temp, incx_temp );

    // Scale y by beta.
    bl1_zscalv( BLIS1_NO_CONJUGATE,
                m,
                beta,
                y, incy );

    // Axpy the partial result in x_temp into y.
    bl1_zaxpyv( BLIS1_NO_CONJUGATE,
                m,
                alpha,
                x_temp, incx_temp,
                y,      incy );

    // Free the temporary vector.
    bl1_zfree( x_temp );

    // Free the temporary contiguous matrix.
    bl1_zfree_contigm( a_save, a_rs_save, a_cs_save,
                       &a,     &a_rs,     &a_cs );
}