|
libflame
revision_anchor
|
Functions | |
| void | bli_smaxabsmr (uplo_t uplo, int m, int n, float *a, int a_rs, int a_cs, float *maxabs) |
| void | bli_dmaxabsmr (uplo_t uplo, int m, int n, double *a, int a_rs, int a_cs, double *maxabs) |
| void | bli_cmaxabsmr (uplo_t uplo, int m, int n, scomplex *a, int a_rs, int a_cs, float *maxabs) |
| void | bli_zmaxabsmr (uplo_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, double *maxabs) |
| void bli_cmaxabsmr | ( | uplo_t | uplo, |
| int | m, | ||
| int | n, | ||
| scomplex * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| float * | maxabs | ||
| ) |
References bli_cmaxabsv(), bli_d0(), bli_is_row_storage(), bli_is_upper(), and bli_zero_dim2().
Referenced by FLA_Max_abs_value_herm().
{
float zero = bli_d0();
scomplex* a_begin;
float maxabs_cand;
float maxabs_temp;
int inca, lda;
int n_iter;
int n_elem_max;
int n_elem;
int j;
// Return early if possible.
if ( bli_zero_dim2( m, n ) ) { *maxabs = zero; return; }
// Initialize with optimal values for column-major storage.
n_iter = n;
n_elem_max = m;
lda = a_cs;
inca = a_rs;
// An optimization: if A is row-major, then let's access the matrix by
// rows instead of by columns for increased spatial locality.
if ( bli_is_row_storage( a_rs, a_cs ) )
{
bli_swap_ints( n_iter, n_elem_max );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
}
// Initialize the maximum absolute value candidate to the first element.
bli_csabsval2( a, &maxabs_cand );
if ( bli_is_upper( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_min( j + 1, n_elem_max );
a_begin = a + j*lda;
bli_cmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
else // if ( bli_is_lower( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_max( 0, n_elem_max - j );
a_begin = a + j*lda + j*inca;
bli_cmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
*maxabs = maxabs_cand;
}
| void bli_dmaxabsmr | ( | uplo_t | uplo, |
| int | m, | ||
| int | n, | ||
| double * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| double * | maxabs | ||
| ) |
References bli_d0(), bli_dmaxabsv(), bli_is_row_storage(), bli_is_upper(), and bli_zero_dim2().
Referenced by FLA_Max_abs_value_herm().
{
double zero = bli_d0();
double* a_begin;
double maxabs_cand;
double maxabs_temp;
int inca, lda;
int n_iter;
int n_elem_max;
int n_elem;
int j;
// Return early if possible.
if ( bli_zero_dim2( m, n ) ) { *maxabs = zero; return; }
// Initialize with optimal values for column-major storage.
n_iter = n;
n_elem_max = m;
lda = a_cs;
inca = a_rs;
// An optimization: if A is row-major, then let's access the matrix by
// rows instead of by columns for increased spatial locality.
if ( bli_is_row_storage( a_rs, a_cs ) )
{
bli_swap_ints( n_iter, n_elem_max );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
}
// Initialize the maximum absolute value candidate to the first element.
bli_dabsval2( a, &maxabs_cand );
if ( bli_is_upper( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_min( j + 1, n_elem_max );
a_begin = a + j*lda;
bli_dmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
else // if ( bli_is_lower( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_max( 0, n_elem_max - j );
a_begin = a + j*lda + j*inca;
bli_dmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
*maxabs = maxabs_cand;
}
| void bli_smaxabsmr | ( | uplo_t | uplo, |
| int | m, | ||
| int | n, | ||
| float * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| float * | maxabs | ||
| ) |
References bli_is_row_storage(), bli_is_upper(), bli_s0(), bli_smaxabsv(), and bli_zero_dim2().
Referenced by FLA_Max_abs_value_herm().
{
float zero = bli_s0();
float* a_begin;
float maxabs_cand;
float maxabs_temp;
int inca, lda;
int n_iter;
int n_elem_max;
int n_elem;
int j;
// Return early if possible.
if ( bli_zero_dim2( m, n ) ) { *maxabs = zero; return; }
// Initialize with optimal values for column-major storage.
n_iter = n;
n_elem_max = m;
lda = a_cs;
inca = a_rs;
// An optimization: if A is row-major, then let's access the matrix by
// rows instead of by columns for increased spatial locality.
if ( bli_is_row_storage( a_rs, a_cs ) )
{
bli_swap_ints( n_iter, n_elem_max );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
}
// Initialize the maximum absolute value candidate to the first element.
bli_sabsval2( a, &maxabs_cand );
if ( bli_is_upper( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_min( j + 1, n_elem_max );
a_begin = a + j*lda;
bli_smaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
else // if ( bli_is_lower( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_max( 0, n_elem_max - j );
a_begin = a + j*lda + j*inca;
bli_smaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
*maxabs = maxabs_cand;
}
| void bli_zmaxabsmr | ( | uplo_t | uplo, |
| int | m, | ||
| int | n, | ||
| dcomplex * | a, | ||
| int | a_rs, | ||
| int | a_cs, | ||
| double * | maxabs | ||
| ) |
References bli_d0(), bli_is_row_storage(), bli_is_upper(), bli_zero_dim2(), and bli_zmaxabsv().
Referenced by FLA_Max_abs_value_herm().
{
double zero = bli_d0();
dcomplex* a_begin;
double maxabs_cand;
double maxabs_temp;
int inca, lda;
int n_iter;
int n_elem_max;
int n_elem;
int j;
// Return early if possible.
if ( bli_zero_dim2( m, n ) ) { *maxabs = zero; return; }
// Initialize with optimal values for column-major storage.
n_iter = n;
n_elem_max = m;
lda = a_cs;
inca = a_rs;
// An optimization: if A is row-major, then let's access the matrix by
// rows instead of by columns for increased spatial locality.
if ( bli_is_row_storage( a_rs, a_cs ) )
{
bli_swap_ints( n_iter, n_elem_max );
bli_swap_ints( lda, inca );
bli_toggle_uplo( uplo );
}
// Initialize the maximum absolute value candidate to the first element.
bli_zdabsval2( a, &maxabs_cand );
if ( bli_is_upper( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_min( j + 1, n_elem_max );
a_begin = a + j*lda;
bli_zmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
else // if ( bli_is_lower( uplo ) )
{
for ( j = 0; j < n_iter; j++ )
{
n_elem = bli_max( 0, n_elem_max - j );
a_begin = a + j*lda + j*inca;
bli_zmaxabsv( n_elem,
a_begin, inca,
&maxabs_temp );
if ( maxabs_temp > maxabs_cand ) maxabs_cand = maxabs_temp;
}
}
*maxabs = maxabs_cand;
}
1.7.6.1