libflame  revision_anchor
Functions
bli_create_contigmr.c File Reference

(r)

Functions

void bli_screate_contigmr (uplo_t uplo, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
void bli_dcreate_contigmr (uplo_t uplo, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
void bli_ccreate_contigmr (uplo_t uplo, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
void bli_zcreate_contigmr (uplo_t uplo, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)

Function Documentation

void bli_ccreate_contigmr ( uplo_t  uplo,
int  m,
int  n,
scomplex a_save,
int  a_rs_save,
int  a_cs_save,
scomplex **  a,
int *  a_rs,
int *  a_cs 
)

References bli_callocm(), bli_ccopymr(), bli_is_gen_storage(), and bli_set_contig_strides().

Referenced by bli_ccreate_contigmsr(), bli_chemm(), bli_chemv(), bli_cher(), bli_cher2(), bli_cher2k(), bli_cherk(), bli_csymm(), bli_csymv(), bli_csyr(), bli_csyr2(), bli_csyr2k(), bli_csyrk(), bli_ctrmm(), bli_ctrmmsx(), bli_ctrmv(), bli_ctrmvsx(), bli_ctrsm(), bli_ctrsmsx(), bli_ctrsv(), and bli_ctrsvsx().

{
    int m_contig, n_contig;

    if ( bli_is_gen_storage( a_rs_save, a_cs_save ) )
    {
        // Initialize dimensions assuming no transposition needed during copy.
        m_contig = m;
        n_contig = n;
/*
        // Transpose the dimensions of the contiguous matrix, if requested.
        if ( bli_does_trans( trans_copy ) )
        {
            m_contig = n;
            n_contig = m;
        }
*/
        // Allocate temporary contiguous storage for the matrix.
        *a = bli_callocm( m_contig, n_contig );

        // Set the row and column strides for the temporary matrix.
        bli_set_contig_strides( m_contig, n_contig, a_rs, a_cs );

        // Initialize the contiguous matrix with the contents of the original.
        bli_ccopymr( uplo,
                     m_contig,
                     n_contig,
                     a_save, a_rs_save, a_cs_save,
                     *a,     *a_rs,     *a_cs );
    }
}
void bli_dcreate_contigmr ( uplo_t  uplo,
int  m,
int  n,
double *  a_save,
int  a_rs_save,
int  a_cs_save,
double **  a,
int *  a_rs,
int *  a_cs 
)

References bli_dallocm(), bli_dcopymr(), bli_is_gen_storage(), and bli_set_contig_strides().

Referenced by bli_dcreate_contigmsr(), bli_dsymm(), bli_dsymv(), bli_dsyr(), bli_dsyr2(), bli_dsyr2k(), bli_dsyrk(), bli_dtrmm(), bli_dtrmmsx(), bli_dtrmv(), bli_dtrmvsx(), bli_dtrsm(), bli_dtrsmsx(), bli_dtrsv(), and bli_dtrsvsx().

{
    int m_contig, n_contig;

    if ( bli_is_gen_storage( a_rs_save, a_cs_save ) )
    {
        // Initialize dimensions assuming no transposition needed during copy.
        m_contig = m;
        n_contig = n;
/*
        // Transpose the dimensions of the contiguous matrix, if requested.
        if ( bli_does_trans( trans_copy ) )
        {
            m_contig = n;
            n_contig = m;
        }
*/
        // Allocate temporary contiguous storage for the matrix.
        *a = bli_dallocm( m_contig, n_contig );

        // Set the row and column strides for the temporary matrix.
        bli_set_contig_strides( m_contig, n_contig, a_rs, a_cs );

        // Initialize the contiguous matrix with the contents of the original.
        bli_dcopymr( uplo,
                     m_contig,
                     n_contig,
                     a_save, a_rs_save, a_cs_save,
                     *a,     *a_rs,     *a_cs );
    }
}
void bli_screate_contigmr ( uplo_t  uplo,
int  m,
int  n,
float *  a_save,
int  a_rs_save,
int  a_cs_save,
float **  a,
int *  a_rs,
int *  a_cs 
)

References bli_is_gen_storage(), bli_sallocm(), bli_scopymr(), and bli_set_contig_strides().

Referenced by bli_screate_contigmsr(), bli_ssymm(), bli_ssymv(), bli_ssyr(), bli_ssyr2(), bli_ssyr2k(), bli_ssyrk(), bli_strmm(), bli_strmmsx(), bli_strmv(), bli_strmvsx(), bli_strsm(), bli_strsmsx(), bli_strsv(), and bli_strsvsx().

{
    int m_contig, n_contig;

    if ( bli_is_gen_storage( a_rs_save, a_cs_save ) )
    {
        // Initialize dimensions assuming no transposition needed during copy.
        m_contig = m;
        n_contig = n;
/*
        // Transpose the dimensions of the contiguous matrix, if requested.
        if ( bli_does_trans( trans_copy ) )
        {
            m_contig = n;
            n_contig = m;
        }
*/
        // Allocate temporary contiguous storage for the matrix.
        *a = bli_sallocm( m_contig, n_contig );

        // Set the row and column strides for the temporary matrix.
        bli_set_contig_strides( m_contig, n_contig, a_rs, a_cs );

        // Initialize the contiguous matrix with the contents of the original.
        bli_scopymr( uplo,
                     m_contig,
                     n_contig,
                     a_save, a_rs_save, a_cs_save,
                     *a,     *a_rs,     *a_cs );
    }
}
void bli_zcreate_contigmr ( uplo_t  uplo,
int  m,
int  n,
dcomplex a_save,
int  a_rs_save,
int  a_cs_save,
dcomplex **  a,
int *  a_rs,
int *  a_cs 
)

References bli_is_gen_storage(), bli_set_contig_strides(), bli_zallocm(), and bli_zcopymr().

Referenced by bli_zcreate_contigmsr(), bli_zhemm(), bli_zhemv(), bli_zher(), bli_zher2(), bli_zher2k(), bli_zherk(), bli_zsymm(), bli_zsymv(), bli_zsyr(), bli_zsyr2(), bli_zsyr2k(), bli_zsyrk(), bli_ztrmm(), bli_ztrmmsx(), bli_ztrmv(), bli_ztrmvsx(), bli_ztrsm(), bli_ztrsmsx(), bli_ztrsv(), and bli_ztrsvsx().

{
    int m_contig, n_contig;

    if ( bli_is_gen_storage( a_rs_save, a_cs_save ) )
    {
        // Initialize dimensions assuming no transposition needed during copy.
        m_contig = m;
        n_contig = n;
/*
        // Transpose the dimensions of the contiguous matrix, if requested.
        if ( bli_does_trans( trans_copy ) )
        {
            m_contig = n;
            n_contig = m;
        }
*/
        // Allocate temporary contiguous storage for the matrix.
        *a = bli_zallocm( m_contig, n_contig );

        // Set the row and column strides for the temporary matrix.
        bli_set_contig_strides( m_contig, n_contig, a_rs, a_cs );

        // Initialize the contiguous matrix with the contents of the original.
        bli_zcopymr( uplo,
                     m_contig,
                     n_contig,
                     a_save, a_rs_save, a_cs_save,
                     *a,     *a_rs,     *a_cs );
    }
}