libflame revision_anchor
Functions
FLA_Norm1.c File Reference

(r)

Functions

FLA_Error FLA_Norm1 (FLA_Obj A, FLA_Obj norm)
 

Function Documentation

◆ FLA_Norm1()

FLA_Error FLA_Norm1 ( FLA_Obj  A,
FLA_Obj  norm 
)
14{
15 FLA_Obj AL, AR, A0, a1, A2;
16
17 FLA_Obj b;
18 FLA_Obj bL, bR, b0, beta1, b2;
19
22
23 FLA_Obj_create( FLA_Obj_datatype( A ), 1, FLA_Obj_width( A ), 0, 0, &b );
24
25 FLA_Part_1x2( A, &AL, &AR, 0, FLA_LEFT );
26
27 FLA_Part_1x2( b, &bL, &bR, 0, FLA_LEFT );
28
29 while ( FLA_Obj_width( AL ) < FLA_Obj_width( A ) ){
30
31 FLA_Repart_1x2_to_1x3( AL, /**/ AR, &A0, /**/ &a1, &A2,
32 1, FLA_RIGHT );
33
34 FLA_Repart_1x2_to_1x3( bL, /**/ bR, &b0, /**/ &beta1, &b2,
35 1, FLA_RIGHT );
36
37 /*------------------------------------------------------------*/
38
39 FLA_Asum( a1, beta1 );
40
41 /*------------------------------------------------------------*/
42
43 FLA_Cont_with_1x3_to_1x2( &AL, /**/ &AR, A0, a1, /**/ A2,
44 FLA_LEFT );
45
46 FLA_Cont_with_1x3_to_1x2( &bL, /**/ &bR, b0, beta1, /**/ b2,
47 FLA_LEFT );
48 }
49
51
52 FLA_Obj_free( &b );
53
54 return FLA_SUCCESS;
55}
FLA_Error FLA_Norm1_check(FLA_Obj A, FLA_Obj norm)
Definition FLA_Norm1_check.c:13
FLA_Error FLA_Asum(FLA_Obj x, FLA_Obj asum_x)
Definition FLA_Asum.c:13
FLA_Error FLA_Cont_with_1x3_to_1x2(FLA_Obj *AL, FLA_Obj *AR, FLA_Obj A0, FLA_Obj A1, FLA_Obj A2, FLA_Side side)
Definition FLA_View.c:475
dim_t FLA_Obj_width(FLA_Obj obj)
Definition FLA_Query.c:123
FLA_Error FLA_Obj_create(FLA_Datatype datatype, dim_t m, dim_t n, dim_t rs, dim_t cs, FLA_Obj *obj)
Definition FLA_Obj.c:55
FLA_Error FLA_Part_1x2(FLA_Obj A, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition FLA_View.c:110
FLA_Error FLA_Repart_1x2_to_1x3(FLA_Obj AL, FLA_Obj AR, FLA_Obj *A0, FLA_Obj *A1, FLA_Obj *A2, dim_t nb, FLA_Side side)
Definition FLA_View.c:267
unsigned int FLA_Check_error_level(void)
Definition FLA_Check.c:18
FLA_Error FLA_Obj_free(FLA_Obj *obj)
Definition FLA_Obj.c:588
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition FLA_Query.c:13
FLA_Error FLA_Max_abs_value(FLA_Obj A, FLA_Obj amax)
Definition FLA_Max_abs_value.c:13
int i
Definition bl1_axmyv2.c:145
Definition FLA_type_defs.h:159

References FLA_Asum(), FLA_Check_error_level(), FLA_Cont_with_1x3_to_1x2(), FLA_Max_abs_value(), FLA_Norm1_check(), FLA_Obj_create(), FLA_Obj_datatype(), FLA_Obj_free(), FLA_Obj_width(), FLA_Part_1x2(), FLA_Repart_1x2_to_1x3(), and i.

Referenced by FLASH_Norm1().