text: /*
  
      Copyright (C) 2014, The University of Texas at Austin
  
      This file is part of libflame and is available under the 3-Clause
      BSD license, which can be found in the LICENSE file at the top-level
      directory, or at http://opensource.org/licenses/BSD-3-Clause
  
  */
  
  #include "FLAME.h"
  
  #ifdef FLA_ENABLE_NON_CRITICAL_CODE
  
  FLA_Error FLA_Herk_un_unb_var5( FLA_Obj alpha, FLA_Obj A, FLA_Obj beta, FLA_Obj C )
  {
    FLA_Obj AL,    AR,       A0,  a1,  A2;
  
    FLA_Scalr_external( FLA_UPPER_TRIANGULAR, beta, C );
  
    FLA_Part_1x2( A,    &AL,  &AR,      0, FLA_LEFT );
  
    while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
  
      FLA_Repart_1x2_to_1x3( AL,  /**/ AR,        &A0, /**/ &a1, &A2,
                             1, FLA_RIGHT );
  
      /*------------------------------------------------------------*/
  
      /* C := C + a1 * a1' */ 
      FLA_Her_external( FLA_UPPER_TRIANGULAR, alpha, a1, C );
  
      /*------------------------------------------------------------*/
  
      FLA_Cont_with_1x3_to_1x2( &AL,  /**/ &AR,        A0, a1, /**/ A2,
                                FLA_LEFT );
  
    }
  
    return FLA_SUCCESS;
  }
  
  #endif
  