libflame  revision_anchor
Functions
bli_copymrt.c File Reference

(r)

Functions

void bli_scopymrt (uplo_t uplo, trans_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
void bli_dcopymrt (uplo_t uplo, trans_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
void bli_ccopymrt (uplo_t uplo, trans_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
void bli_zcopymrt (uplo_t uplo, trans_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
void bli_sscopymrt (uplo_t uplo, trans_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
void bli_sdcopymrt (uplo_t uplo, trans_t trans, int m, int n, float *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
void bli_sccopymrt (uplo_t uplo, trans_t trans, int m, int n, float *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
void bli_szcopymrt (uplo_t uplo, trans_t trans, int m, int n, float *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
void bli_dscopymrt (uplo_t uplo, trans_t trans, int m, int n, double *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
void bli_ddcopymrt (uplo_t uplo, trans_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
void bli_dccopymrt (uplo_t uplo, trans_t trans, int m, int n, double *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
void bli_dzcopymrt (uplo_t uplo, trans_t trans, int m, int n, double *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
void bli_cscopymrt (uplo_t uplo, trans_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
void bli_cdcopymrt (uplo_t uplo, trans_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
void bli_cccopymrt (uplo_t uplo, trans_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
void bli_czcopymrt (uplo_t uplo, trans_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
void bli_zscopymrt (uplo_t uplo, trans_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
void bli_zdcopymrt (uplo_t uplo, trans_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
void bli_zccopymrt (uplo_t uplo, trans_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
void bli_zzcopymrt (uplo_t uplo, trans_t trans, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)

Function Documentation

void bli_cccopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)

References bli_ccopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

{
    scomplex* a_begin;
    scomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_ccopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_ccopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_ccopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)

References bli_ccopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by bli_chemm(), bli_ctrmm(), bli_ctrsm(), FLA_Copyrt_external(), 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(), and FLA_Lyap_n_opc_var4().

{
    scomplex* a_begin;
    scomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_ccopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_ccopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_cdcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)

References bli_cdcopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    scomplex* a_begin;
    double*   b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_cdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_cdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_cscopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)

References bli_cscopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    scomplex* a_begin;
    float*    b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_cscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_cscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_czcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
scomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)

References bli_czcopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    scomplex* a_begin;
    dcomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_czcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_czcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_dccopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)

References bli_dccopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    double*   a_begin;
    scomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_dccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_dccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_dcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)

References bli_dcopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external(), 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(), and FLA_Lyap_n_opd_var4().

{
    double*   a_begin;
    double*   b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_dcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_dcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_ddcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)

References bli_dcopyv(), bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

{
    double*   a_begin;
    double*   b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_dcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_dcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_dscopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_dscopyv(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    double*   a_begin;
    float*    b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_dscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_dscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_dzcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
double *  a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_dzcopyv(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    double*   a_begin;
    dcomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_dzcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_dzcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_sccopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_sccopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    float*    a_begin;
    scomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_sccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_sccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_scopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_scopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external(), 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(), and FLA_Lyap_n_ops_var4().

{
    float*    a_begin;
    float*    b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_scopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_scopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_sdcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_sdcopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    float*    a_begin;
    double*   b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_sdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_sdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_sscopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_scopyv(), and bli_zero_dim2().

{
    float*    a_begin;
    float*    b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_scopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_scopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_szcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
float *  a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_szcopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    float*    a_begin;
    dcomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_szcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_szcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_zccopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
scomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_zccopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    dcomplex* a_begin;
    scomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_zccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_zccopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_zcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_zcopyv(), and bli_zero_dim2().

Referenced by bli_zhemm(), bli_ztrmm(), bli_ztrsm(), FLA_Copyrt_external(), 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(), and FLA_Lyap_n_opz_var4().

{
    dcomplex* a_begin;
    dcomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_zcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_zcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}
void bli_zdcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
double *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_zdcopyv(), and bli_zero_dim2().

Referenced by FLA_Copyrt_external().

{
    dcomplex* a_begin;
    double*   b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_zdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_zdcopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_zscopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
float *  b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_zero_dim2(), and bli_zscopyv().

Referenced by FLA_Copyrt_external().

{
    dcomplex* a_begin;
    float*    b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_zscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_zscopyv( conj,
                         n_elem,
                         a_begin, inca,
                         b_begin, incb );
        }
    }
}
void bli_zzcopymrt ( uplo_t  uplo,
trans_t  trans,
int  m,
int  n,
dcomplex a,
int  a_rs,
int  a_cs,
dcomplex b,
int  b_rs,
int  b_cs 
)

References bli_does_trans(), bli_is_col_storage(), bli_is_lower(), bli_proj_trans_to_conj(), bli_zcopyv(), and bli_zero_dim2().

{
    dcomplex* a_begin;
    dcomplex* b_begin;
    int       lda, inca;
    int       ldb, incb;
    int       n_iter;
    int       n_elem;
    int       n_elem_max;
    int       n_elem_is_descending;
    int       j;
    conj_t    conj;

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

    // Initialize variables based on storage format of B and value of uplo.
    if      ( bli_is_col_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = m;
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = TRUE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = n;
            n_elem_max = bli_min( m, n );
            lda        = a_cs;
            inca       = a_rs;
            ldb        = b_cs;
            incb       = b_rs;
            n_elem_is_descending = FALSE;
        }
    }
    else // if ( bli_is_row_storage( b_rs, b_cs ) )
    {
        if ( bli_is_lower( uplo ) )
        {
            n_iter     = m;
            n_elem_max = bli_min( m, n );
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = FALSE;
        }
        else // if ( bli_is_upper( uplo ) )
        {
            n_iter     = bli_min( m, n );
            n_elem_max = n;
            lda        = a_rs;
            inca       = a_cs;
            ldb        = b_rs;
            incb       = b_cs;
            n_elem_is_descending = TRUE;
        }
    }

    // Swap lda and inca if we're doing a transpose.
    if ( bli_does_trans( trans ) )
    {
        bli_swap_ints( lda, inca );
    }

    // Extract conj component from trans parameter.
    conj = bli_proj_trans_to_conj( trans );

    // Choose the loop based on whether n_elem will be shrinking or growing
    // with each iteration.
    if ( n_elem_is_descending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = n_elem_max - j;
            a_begin = a + j*lda + j*inca;
            b_begin = b + j*ldb + j*incb;
        
            bli_zcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
    else // if ( n_elem_is_ascending )
    {
        for ( j = 0; j < n_iter; j++ )
        {
            n_elem  = bli_min( j + 1, n_elem_max );
            a_begin = a + j*lda;
            b_begin = b + j*ldb;
        
            bli_zcopyv( conj,
                        n_elem,
                        a_begin, inca,
                        b_begin, incb );
        }
    }
}