libflame  revision_anchor
Functions
FLASH_Norm1.c File Reference

(r)

Functions

FLA_Error FLASH_Norm1 (FLA_Obj H, FLA_Obj norm)
 

Function Documentation

◆ FLASH_Norm1()

FLA_Error FLASH_Norm1 ( FLA_Obj  H,
FLA_Obj  norm 
)
14 {
15  FLA_Obj F;
16 
17  // Exit early if one dimension is zero.
18  if ( FLA_Obj_has_zero_dim( H ) )
19  {
20  FLA_Set( FLA_ZERO, norm );
21  return FLA_SUCCESS;
22  }
23 
24  // Create a temporary flat copy of the hierarchical object.
26 
27  // Compute the 1-norm of F and store it in norm.
28  FLA_Norm1( F, norm );
29 
30  // Free the temporary flat object.
31  FLA_Obj_free( &F );
32 
33  return FLA_SUCCESS;
34 }
FLA_Error FLASH_Obj_create_flat_copy_of_hier(FLA_Obj H, FLA_Obj *F)
Definition: FLASH_Obj.c:623
FLA_Obj FLA_ZERO
Definition: FLA_Init.c:20
FLA_Bool FLA_Obj_has_zero_dim(FLA_Obj A)
Definition: FLA_Query.c:400
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition: FLA_Obj.c:588
FLA_Error FLA_Norm1(FLA_Obj A, FLA_Obj norm)
Definition: FLA_Norm1.c:13
FLA_Error FLA_Set(FLA_Obj alpha, FLA_Obj A)
Definition: FLA_Set.c:13
Definition: FLA_type_defs.h:159

References FLA_Norm1(), FLA_Obj_free(), FLA_Obj_has_zero_dim(), FLA_Set(), FLA_ZERO, and FLASH_Obj_create_flat_copy_of_hier().