Functions | |
FLA_Error | FLA_SPDinv (FLA_Uplo uplo, FLA_Obj A) |
Variables | |
fla_spdinv_t * | fla_spdinv_cntl |
fla_blocksize_t * | fla_spdinv_size_cutoff |
References FLA_Blocksize_extract(), FLA_Check_error_level(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_SPDinv_blk_external(), FLA_SPDinv_check(), and FLA_SPDinv_internal().
00039 { 00040 FLA_Datatype datatype; 00041 int m_A, r_val = 0; 00042 int FLA_SPDINV_CUTOFF; 00043 00044 00045 // Check parameters. 00046 if ( FLA_Check_error_level() >= FLA_MIN_ERROR_CHECKING ) 00047 FLA_SPDinv_check( uplo, A ); 00048 00049 // Determine the datatype of the operation. 00050 datatype = FLA_Obj_datatype( A ); 00051 00052 // Extract the appropriate blocksize for the given datatype. 00053 FLA_SPDINV_CUTOFF = FLA_Blocksize_extract( datatype, fla_spdinv_size_cutoff ); 00054 00055 // Determine the dimension of A. 00056 m_A = FLA_Obj_length( A ); 00057 00058 // Invoke FLA_SPDinv_internal() with an appropriate control tree. 00059 if ( m_A <= FLA_SPDINV_CUTOFF ) 00060 { 00061 r_val = FLA_SPDinv_blk_external( uplo, A ); 00062 } 00063 else if ( FLA_SPDINV_CUTOFF < m_A ) 00064 { 00065 r_val = FLA_SPDinv_internal( uplo, A, fla_spdinv_cntl ); 00066 } 00067 00068 return r_val; 00069 }