本文整理汇总了C++中FLA_COMPLEX_PTR函数的典型用法代码示例。如果您正苦于以下问题:C++ FLA_COMPLEX_PTR函数的具体用法?C++ FLA_COMPLEX_PTR怎么用?C++ FLA_COMPLEX_PTR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了FLA_COMPLEX_PTR函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: FLA_Obj_create_complex_constant
FLA_Error FLA_Obj_create_complex_constant( double const_real, double const_imag, FLA_Obj *obj )
{
int* temp_i;
float* temp_s;
double* temp_d;
scomplex* temp_c;
dcomplex* temp_z;
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Obj_create_complex_constant_check( const_real, const_imag, obj );
FLA_Obj_create( FLA_CONSTANT, 1, 1, 0, 0, obj );
#ifdef FLA_ENABLE_SCC
if ( !FLA_is_owner() )
return FLA_SUCCESS;
#endif
temp_i = FLA_INT_PTR( *obj );
temp_s = FLA_FLOAT_PTR( *obj );
temp_d = FLA_DOUBLE_PTR( *obj );
temp_c = FLA_COMPLEX_PTR( *obj );
temp_z = FLA_DOUBLE_COMPLEX_PTR( *obj );
*temp_i = ( int ) const_real;
*temp_s = ( float ) const_real;
*temp_d = const_real;
temp_c->real = ( float ) const_real;
temp_c->imag = ( float ) const_imag;
temp_z->real = const_real;
temp_z->imag = const_imag;
return FLA_SUCCESS;
}
示例2: FLA_Trinv_lu_opc_var2
FLA_Error FLA_Trinv_lu_opc_var2( int mn_A,
scomplex* buff_A, int rs_A, int cs_A )
{
scomplex* buff_m1 = FLA_COMPLEX_PTR( FLA_MINUS_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
scomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Trsv_external( FLA_LOWER_TRIANGULAR, FLA_NO_TRANSPOSE, FLA_UNIT_DIAG, A22, a21 );
bl1_ctrsv( BLIS1_LOWER_TRIANGULAR,
BLIS1_NO_TRANSPOSE,
BLIS1_UNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a21, rs_A );
// FLA_Scal_external( FLA_MINUS_ONE, a21 );
bl1_cscalv( BLIS1_NO_CONJUGATE,
mn_ahead,
buff_m1,
a21, rs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
示例3: FLA_Chol_u_opt_var3
FLA_Error FLA_Chol_u_opt_var3( FLA_Obj A )
{
FLA_Error r_val = FLA_SUCCESS;
FLA_Datatype datatype;
int mn_A;
int rs_A, cs_A;
datatype = FLA_Obj_datatype( A );
mn_A = FLA_Obj_length( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
r_val = FLA_Chol_u_ops_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
r_val = FLA_Chol_u_opd_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
r_val = FLA_Chol_u_opc_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
r_val = FLA_Chol_u_opz_var3( mn_A,
buff_A, rs_A, cs_A );
break;
}
}
return r_val;
}
示例4: FLA_Tevd_eigval_v_opt_var1
FLA_Error FLA_Tevd_eigval_v_opt_var1( FLA_Obj G, FLA_Obj d, FLA_Obj e, FLA_Obj k )
{
FLA_Datatype datatype;
int m_A, n_G;
int rs_G, cs_G;
int inc_d;
int inc_e;
datatype = FLA_Obj_datatype( d );
m_A = FLA_Obj_vector_dim( d );
n_G = FLA_Obj_width( G );
rs_G = FLA_Obj_row_stride( G );
cs_G = FLA_Obj_col_stride( G );
inc_d = FLA_Obj_vector_inc( d );
inc_e = FLA_Obj_vector_inc( e );
switch ( datatype )
{
case FLA_FLOAT:
{
scomplex* buff_G = FLA_COMPLEX_PTR( G );
float* buff_d = FLA_FLOAT_PTR( d );
float* buff_e = FLA_FLOAT_PTR( e );
int* buff_k = FLA_INT_PTR( k );
FLA_Tevd_eigval_v_ops_var1( m_A,
n_G,
buff_G, rs_G, cs_G,
buff_d, inc_d,
buff_e, inc_e,
buff_k );
break;
}
case FLA_DOUBLE:
{
dcomplex* buff_G = FLA_DOUBLE_COMPLEX_PTR( G );
double* buff_d = FLA_DOUBLE_PTR( d );
double* buff_e = FLA_DOUBLE_PTR( e );
int* buff_k = FLA_INT_PTR( k );
FLA_Tevd_eigval_v_opd_var1( m_A,
n_G,
buff_G, rs_G, cs_G,
buff_d, inc_d,
buff_e, inc_e,
buff_k );
break;
}
}
return FLA_SUCCESS;
}
示例5: FLA_Absolute_value
FLA_Error FLA_Absolute_value( FLA_Obj alpha )
{
FLA_Datatype datatype;
if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING )
FLA_Absolute_value_check( alpha );
datatype = FLA_Obj_datatype( alpha );
switch ( datatype ){
case FLA_FLOAT:
{
float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
*buff_alpha = ( float ) fabs( ( double ) *buff_alpha );
break;
}
case FLA_DOUBLE:
{
double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
*buff_alpha = fabs( *buff_alpha );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
buff_alpha->real = ( float ) sqrt( ( double ) buff_alpha->real * buff_alpha->real +
buff_alpha->imag * buff_alpha->imag );
buff_alpha->imag = 0.0F;
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_alpha = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
buff_alpha->real = sqrt( buff_alpha->real * buff_alpha->real +
buff_alpha->imag * buff_alpha->imag );
buff_alpha->imag = 0.0;
break;
}
}
return FLA_SUCCESS;
}
示例6: FLA_Trinv_lu_opc_var3
FLA_Error FLA_Trinv_lu_opc_var3( int mn_A,
scomplex* buff_A, int rs_A, int cs_A )
{
scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
scomplex* buff_m1 = FLA_COMPLEX_PTR( FLA_MINUS_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
scomplex* A20 = buff_A + (0 )*cs_A + (i+1)*rs_A;
scomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
int mn_behind = i;
/*------------------------------------------------------------*/
// FLA_Scal_external( FLA_MINUS_ONE, a21 );
bl1_cscalv( BLIS1_NO_CONJUGATE,
mn_ahead,
buff_m1,
a21, rs_A );
// FLA_Ger_external( FLA_ONE, a21, a10t, A20 );
bl1_cger( BLIS1_NO_CONJUGATE,
BLIS1_NO_CONJUGATE,
mn_ahead,
mn_behind,
buff_1,
a21, rs_A,
a10t, cs_A,
A20, rs_A, cs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
示例7: FLA_Fused_Ahx_Ax_opc_var1
FLA_Error FLA_Fused_Ahx_Ax_opc_var1( int m_A,
int n_A,
scomplex* buff_A, int rs_A, int cs_A,
scomplex* buff_x, int inc_x,
scomplex* buff_v, int inc_v,
scomplex* buff_w, int inc_w )
{
scomplex* buff_0 = FLA_COMPLEX_PTR( FLA_ZERO );
int i;
bl1_csetv( m_A,
buff_0,
buff_w, inc_w );
for ( i = 0; i < n_A; ++i )
{
scomplex* a1 = buff_A + (i )*cs_A + (0 )*rs_A;
scomplex* nu1 = buff_v + (i )*inc_v;
scomplex* x = buff_x;
scomplex* chi1 = buff_x + (i )*inc_x;
scomplex* w = buff_w;
/*------------------------------------------------------------*/
bl1_cdot( BLIS1_CONJUGATE,
m_A,
a1, rs_A,
x, inc_x,
nu1 );
bl1_caxpyv( BLIS1_NO_CONJUGATE,
m_A,
chi1,
a1, rs_A,
w, inc_w );
/*
F77_caxpy( &m_A,
chi1,
a1, &rs_A,
w, &inc_w );
*/
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
示例8: FLA_Ttmm_l_opc_var3
FLA_Error FLA_Ttmm_l_opc_var3( int mn_A,
scomplex* buff_A, int rs_A, int cs_A )
{
scomplex* buff_1 = FLA_COMPLEX_PTR( FLA_ONE );
int i;
for ( i = 0; i < mn_A; ++i )
{
scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
scomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
scomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int mn_ahead = mn_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Absolute_square( alpha11 );
bl1_cabsqr( alpha11 );
// FLA_Dotcs_external( FLA_CONJUGATE, FLA_ONE, a21, a21, FLA_ONE, alpha11 );
bl1_cdots( BLIS1_CONJUGATE,
mn_ahead,
buff_1,
a21, rs_A,
a21, rs_A,
buff_1,
alpha11 );
// FLA_Trmv_external( FLA_LOWER_TRIANGULAR, FLA_CONJ_TRANSPOSE, FLA_NONUNIT_DIAG, A22, a21 );
bl1_ctrmv( BLIS1_LOWER_TRIANGULAR,
BLIS1_CONJ_TRANSPOSE,
BLIS1_NONUNIT_DIAG,
mn_ahead,
A22, rs_A, cs_A,
a21, rs_A );
/*------------------------------------------------------------*/
}
return FLA_SUCCESS;
}
示例9: FLA_Househ3UD_UT_opc
FLA_Error FLA_Househ3UD_UT_opc( int m_x1,
int m_y2,
scomplex* chi_0,
scomplex* x1, int inc_x1,
scomplex* y2, int inc_y2,
scomplex* tau )
{
scomplex one_half = *FLA_COMPLEX_PTR( FLA_ONE_HALF );
scomplex alpha;
scomplex chi_0_minus_alpha;
scomplex neg_chi_0_minus_alpha;
float abs_chi_0;
float norm_x_1;
float norm_y_2;
float lambda;
float abs_sq_chi_0_minus_alpha;
int i_one = 1;
//
// Compute the 2-norms of x_1 and y_2:
//
// norm_x_1 := || x_1 ||_2
// norm_y_2 := || y_2 ||_2
//
bl1_cnrm2( m_x1,
x1, inc_x1,
&norm_x_1 );
bl1_cnrm2( m_y2,
y2, inc_y2,
&norm_y_2 );
//
// If 2-norms of x_1, y_2 are zero, then return with trivial tau, chi_0 values.
//
if ( norm_x_1 == 0.0F &&
norm_y_2 == 0.0F )
{
chi_0->real = -(chi_0->real);
chi_0->imag = -(chi_0->imag);
tau->real = one_half.real;
tau->imag = one_half.imag;
return FLA_SUCCESS;
}
//
// Compute the absolute value (magnitude) of chi_0, which equals the 2-norm
// of chi_0:
//
// abs_chi_0 := | chi_0 | = || chi_0 ||_2
//
bl1_cnrm2( i_one,
chi_0, i_one,
&abs_chi_0 );
//
// Compute lambda:
//
// lambda := sqrt( conj(chi0) chi0 + x1' x1 - y2' y2 )
//
lambda = ( float ) sqrt( abs_chi_0 * abs_chi_0 +
norm_x_1 * norm_x_1 -
norm_y_2 * norm_y_2 );
//
// Compute alpha:
//
// alpha := - lambda * chi_0 / | chi_0 |
//
alpha.real = -chi_0->real * lambda / abs_chi_0;
alpha.imag = -chi_0->imag * lambda / abs_chi_0;
//
// Overwrite x_1 and y_2 with u_1 and v_2, respectively:
//
// x_1 := x_1 / ( chi_0 - alpha )
// y_2 := y_2 / -( chi_0 - alpha )
//
chi_0_minus_alpha.real = chi_0->real - alpha.real;
chi_0_minus_alpha.imag = chi_0->imag - alpha.imag;
bl1_cinvscalv( BLIS1_NO_CONJUGATE,
m_x1,
&chi_0_minus_alpha,
x1, inc_x1 );
neg_chi_0_minus_alpha.real = -chi_0_minus_alpha.real;
neg_chi_0_minus_alpha.imag = -chi_0_minus_alpha.imag;
bl1_cinvscalv( BLIS1_NO_CONJUGATE,
m_y2,
&neg_chi_0_minus_alpha,
y2, inc_y2 );
//.........这里部分代码省略.........
示例10: FLA_LU_piv_opc_var5
FLA_Error FLA_LU_piv_opc_var5( int m_A,
int n_A,
scomplex* buff_A, int rs_A, int cs_A,
int* buff_p, int inc_p )
{
FLA_Error r_val = FLA_SUCCESS;
scomplex* buff_m1 = FLA_COMPLEX_PTR( FLA_MINUS_ONE );
int min_m_n = min( m_A, n_A );
int i;
for ( i = 0; i < min_m_n; ++i )
{
scomplex pivot_val = czero;
scomplex* a10t = buff_A + (0 )*cs_A + (i )*rs_A;
scomplex* alpha11 = buff_A + (i )*cs_A + (i )*rs_A;
scomplex* a21 = buff_A + (i )*cs_A + (i+1)*rs_A;
scomplex* a12t = buff_A + (i+1)*cs_A + (i )*rs_A;
scomplex* A22 = buff_A + (i+1)*cs_A + (i+1)*rs_A;
int* pi1 = buff_p + i*inc_p;
int m_ahead = m_A - i - 1;
int n_ahead = n_A - i - 1;
/*------------------------------------------------------------*/
// FLA_Merge_2x1( alpha11,
// a21, &aB1 );
// FLA_Amax_external( aB1, pi1 );
bl1_camax( m_ahead + 1,
alpha11, rs_A,
pi1 );
// If a null pivot is encountered, return the index.
pivot_val = *(alpha11 + *pi1);
if ( pivot_val.real == czero.real &&
pivot_val.imag == czero.imag ) r_val = ( r_val == FLA_SUCCESS ? i : r_val );
else
{
// FLA_Merge_1x2( ABL, ABR, &AB );
// FLA_Apply_pivots( FLA_LEFT, FLA_NO_TRANSPOSE, pi1, AB );
FLA_Apply_pivots_ln_opc_var1( n_A,
a10t, rs_A, cs_A,
0,
0,
pi1, inc_p );
// FLA_Inv_scal_external( alpha11, a21 );
bl1_cinvscalv( BLIS1_NO_CONJUGATE,
m_ahead,
alpha11,
a21, rs_A );
}
// FLA_Ger_external( FLA_MINUS_ONE, a21, a12t, A22 );
bl1_cger( BLIS1_NO_CONJUGATE,
BLIS1_NO_CONJUGATE,
m_ahead,
n_ahead,
buff_m1,
a21, rs_A,
a12t, cs_A,
A22, rs_A, cs_A );
/*------------------------------------------------------------*/
}
return r_val;
}
示例11: FLA_LU_piv_opt_var5
FLA_Error FLA_LU_piv_opt_var5( FLA_Obj A, FLA_Obj p )
{
FLA_Error r_val = FLA_SUCCESS;
FLA_Datatype datatype;
int m_A, n_A;
int rs_A, cs_A;
int inc_p;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
n_A = FLA_Obj_width( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
inc_p = FLA_Obj_vector_inc( p );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
int* buff_p = FLA_INT_PTR( p );
r_val = FLA_LU_piv_ops_var5( m_A,
n_A,
buff_A, rs_A, cs_A,
buff_p, inc_p );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
int* buff_p = FLA_INT_PTR( p );
r_val = FLA_LU_piv_opd_var5( m_A,
n_A,
buff_A, rs_A, cs_A,
buff_p, inc_p );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
int* buff_p = FLA_INT_PTR( p );
r_val = FLA_LU_piv_opc_var5( m_A,
n_A,
buff_A, rs_A, cs_A,
buff_p, inc_p );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
int* buff_p = FLA_INT_PTR( p );
r_val = FLA_LU_piv_opz_var5( m_A,
n_A,
buff_A, rs_A, cs_A,
buff_p, inc_p );
break;
}
}
return r_val;
}
示例12: FLA_Trmm_external_gpu
FLA_Error FLA_Trmm_external_gpu( FLA_Side side, FLA_Uplo uplo, FLA_Trans trans, FLA_Diag diag, FLA_Obj alpha, FLA_Obj A, void* A_gpu, FLA_Obj B, void* B_gpu )
{
FLA_Datatype datatype;
int m_B, n_B;
int ldim_A;
int ldim_B;
char blas_side;
char blas_uplo;
char blas_trans;
char blas_diag;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Trmm_check( side, uplo, trans, diag, alpha, A, B );
if ( FLA_Obj_has_zero_dim( B ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
ldim_A = FLA_Obj_length( A );
m_B = FLA_Obj_length( B );
n_B = FLA_Obj_width( B );
ldim_B = FLA_Obj_length( B );
FLA_Param_map_flame_to_netlib_side( side, &blas_side );
FLA_Param_map_flame_to_netlib_uplo( uplo, &blas_uplo );
FLA_Param_map_flame_to_netlib_trans( trans, &blas_trans );
FLA_Param_map_flame_to_netlib_diag( diag, &blas_diag );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
cublasStrmm( blas_side,
blas_uplo,
blas_trans,
blas_diag,
m_B,
n_B,
*buff_alpha,
( float * ) A_gpu, ldim_A,
( float * ) B_gpu, ldim_B );
break;
}
case FLA_DOUBLE:
{
double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
cublasDtrmm( blas_side,
blas_uplo,
blas_trans,
blas_diag,
m_B,
n_B,
*buff_alpha,
( double * ) A_gpu, ldim_A,
( double * ) B_gpu, ldim_B );
break;
}
case FLA_COMPLEX:
{
cuComplex *buff_alpha = ( cuComplex * ) FLA_COMPLEX_PTR( alpha );
cublasCtrmm( blas_side,
blas_uplo,
blas_trans,
blas_diag,
m_B,
n_B,
*buff_alpha,
( cuComplex * ) A_gpu, ldim_A,
( cuComplex * ) B_gpu, ldim_B );
break;
}
case FLA_DOUBLE_COMPLEX:
{
cuDoubleComplex *buff_alpha = ( cuDoubleComplex * ) FLA_DOUBLE_COMPLEX_PTR( alpha );
cublasZtrmm( blas_side,
blas_uplo,
blas_trans,
blas_diag,
m_B,
n_B,
*buff_alpha,
( cuDoubleComplex * ) A_gpu, ldim_A,
( cuDoubleComplex * ) B_gpu, ldim_B );
break;
}
//.........这里部分代码省略.........
示例13: FLA_Hess_UT_step_opt_var4
FLA_Error FLA_Hess_UT_step_opt_var4( FLA_Obj A, FLA_Obj Y, FLA_Obj Z, FLA_Obj T )
{
FLA_Datatype datatype;
int m_A, m_T;
int rs_A, cs_A;
int rs_Y, cs_Y;
int rs_Z, cs_Z;
int rs_T, cs_T;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
m_T = FLA_Obj_length( T );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
rs_Y = FLA_Obj_row_stride( Y );
cs_Y = FLA_Obj_col_stride( Y );
rs_Z = FLA_Obj_row_stride( Z );
cs_Z = FLA_Obj_col_stride( Z );
rs_T = FLA_Obj_row_stride( T );
cs_T = FLA_Obj_col_stride( T );
switch ( datatype )
{
case FLA_FLOAT:
{
float* buff_A = FLA_FLOAT_PTR( A );
float* buff_Y = FLA_FLOAT_PTR( Y );
float* buff_Z = FLA_FLOAT_PTR( Z );
float* buff_T = FLA_FLOAT_PTR( T );
FLA_Hess_UT_step_ops_var4( m_A,
m_T,
buff_A, rs_A, cs_A,
buff_Y, rs_Y, cs_Y,
buff_Z, rs_Z, cs_Z,
buff_T, rs_T, cs_T );
break;
}
case FLA_DOUBLE:
{
double* buff_A = FLA_DOUBLE_PTR( A );
double* buff_Y = FLA_DOUBLE_PTR( Y );
double* buff_Z = FLA_DOUBLE_PTR( Z );
double* buff_T = FLA_DOUBLE_PTR( T );
FLA_Hess_UT_step_opd_var4( m_A,
m_T,
buff_A, rs_A, cs_A,
buff_Y, rs_Y, cs_Y,
buff_Z, rs_Z, cs_Z,
buff_T, rs_T, cs_T );
break;
}
case FLA_COMPLEX:
{
scomplex* buff_A = FLA_COMPLEX_PTR( A );
scomplex* buff_Y = FLA_COMPLEX_PTR( Y );
scomplex* buff_Z = FLA_COMPLEX_PTR( Z );
scomplex* buff_T = FLA_COMPLEX_PTR( T );
FLA_Hess_UT_step_opc_var4( m_A,
m_T,
buff_A, rs_A, cs_A,
buff_Y, rs_Y, cs_Y,
buff_Z, rs_Z, cs_Z,
buff_T, rs_T, cs_T );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex* buff_Y = FLA_DOUBLE_COMPLEX_PTR( Y );
dcomplex* buff_Z = FLA_DOUBLE_COMPLEX_PTR( Z );
dcomplex* buff_T = FLA_DOUBLE_COMPLEX_PTR( T );
FLA_Hess_UT_step_opz_var4( m_A,
m_T,
buff_A, rs_A, cs_A,
buff_Y, rs_Y, cs_Y,
buff_Z, rs_Z, cs_Z,
buff_T, rs_T, cs_T );
break;
}
}
return FLA_SUCCESS;
}
示例14: FLA_Herc_external
FLA_Error FLA_Herc_external( FLA_Uplo uplo, FLA_Conj conj, FLA_Obj alpha, FLA_Obj x, FLA_Obj A )
{
FLA_Datatype datatype;
int m_A;
int rs_A, cs_A;
int inc_x;
uplo_t blis_uplo;
conj_t blis_conj;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Herc_check( uplo, conj, alpha, x, A );
if ( FLA_Obj_has_zero_dim( A ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
m_A = FLA_Obj_length( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
inc_x = FLA_Obj_vector_inc( x );
FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
FLA_Param_map_flame_to_blis_conj( conj, &blis_conj );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_x = ( float * ) FLA_FLOAT_PTR( x );
float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
bli_ssyr( blis_uplo,
m_A,
buff_alpha,
buff_x, inc_x,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_x = ( double * ) FLA_DOUBLE_PTR( x );
double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
bli_dsyr( blis_uplo,
m_A,
buff_alpha,
buff_x, inc_x,
buff_A, rs_A, cs_A );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_x = ( scomplex * ) FLA_COMPLEX_PTR( x );
float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
bli_cher( blis_uplo,
blis_conj,
m_A,
buff_alpha,
buff_x, inc_x,
buff_A, rs_A, cs_A );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
dcomplex *buff_x = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( x );
double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
bli_zher( blis_uplo,
blis_conj,
m_A,
buff_alpha,
buff_x, inc_x,
buff_A, rs_A, cs_A );
break;
}
}
return FLA_SUCCESS;
}
示例15: FLA_Symm_external
FLA_Error FLA_Symm_external( FLA_Side side, FLA_Uplo uplo, FLA_Obj alpha, FLA_Obj A, FLA_Obj B, FLA_Obj beta, FLA_Obj C )
{
FLA_Datatype datatype;
int m_C, n_C;
int rs_A, cs_A;
int rs_B, cs_B;
int rs_C, cs_C;
side_t blis_side;
uplo_t blis_uplo;
if ( FLA_Check_error_level() == FLA_FULL_ERROR_CHECKING )
FLA_Symm_check( side, uplo, alpha, A, B, beta, C );
if ( FLA_Obj_has_zero_dim( C ) ) return FLA_SUCCESS;
datatype = FLA_Obj_datatype( A );
rs_A = FLA_Obj_row_stride( A );
cs_A = FLA_Obj_col_stride( A );
rs_B = FLA_Obj_row_stride( B );
cs_B = FLA_Obj_col_stride( B );
m_C = FLA_Obj_length( C );
n_C = FLA_Obj_width( C );
rs_C = FLA_Obj_row_stride( C );
cs_C = FLA_Obj_col_stride( C );
FLA_Param_map_flame_to_blis_side( side, &blis_side );
FLA_Param_map_flame_to_blis_uplo( uplo, &blis_uplo );
switch( datatype ){
case FLA_FLOAT:
{
float *buff_A = ( float * ) FLA_FLOAT_PTR( A );
float *buff_B = ( float * ) FLA_FLOAT_PTR( B );
float *buff_C = ( float * ) FLA_FLOAT_PTR( C );
float *buff_alpha = ( float * ) FLA_FLOAT_PTR( alpha );
float *buff_beta = ( float * ) FLA_FLOAT_PTR( beta );
bli_ssymm( blis_side,
blis_uplo,
m_C,
n_C,
buff_alpha,
buff_A, rs_A, cs_A,
buff_B, rs_B, cs_B,
buff_beta,
buff_C, rs_C, cs_C );
break;
}
case FLA_DOUBLE:
{
double *buff_A = ( double * ) FLA_DOUBLE_PTR( A );
double *buff_B = ( double * ) FLA_DOUBLE_PTR( B );
double *buff_C = ( double * ) FLA_DOUBLE_PTR( C );
double *buff_alpha = ( double * ) FLA_DOUBLE_PTR( alpha );
double *buff_beta = ( double * ) FLA_DOUBLE_PTR( beta );
bli_dsymm( blis_side,
blis_uplo,
m_C,
n_C,
buff_alpha,
buff_A, rs_A, cs_A,
buff_B, rs_B, cs_B,
buff_beta,
buff_C, rs_C, cs_C );
break;
}
case FLA_COMPLEX:
{
scomplex *buff_A = ( scomplex * ) FLA_COMPLEX_PTR( A );
scomplex *buff_B = ( scomplex * ) FLA_COMPLEX_PTR( B );
scomplex *buff_C = ( scomplex * ) FLA_COMPLEX_PTR( C );
scomplex *buff_alpha = ( scomplex * ) FLA_COMPLEX_PTR( alpha );
scomplex *buff_beta = ( scomplex * ) FLA_COMPLEX_PTR( beta );
bli_csymm( blis_side,
blis_uplo,
m_C,
n_C,
buff_alpha,
buff_A, rs_A, cs_A,
buff_B, rs_B, cs_B,
buff_beta,
buff_C, rs_C, cs_C );
break;
}
case FLA_DOUBLE_COMPLEX:
{
dcomplex *buff_A = ( dcomplex * ) FLA_DOUBLE_COMPLEX_PTR( A );
//.........这里部分代码省略.........