libflame  revision_anchor
Functions
FLA_Apply_pivots_rt.h File Reference

(r)

Go to the source code of this file.

Functions

FLA_Error FLA_Apply_pivots_rt_opt_var1 (FLA_Obj p, FLA_Obj A)
 

Function Documentation

◆ FLA_Apply_pivots_rt_opt_var1()

FLA_Error FLA_Apply_pivots_rt_opt_var1 ( FLA_Obj  p,
FLA_Obj  A 
)

References FLA_Apply_pivots_ln_opc_var1(), FLA_Apply_pivots_ln_opd_var1(), FLA_Apply_pivots_ln_opi_var1(), FLA_Apply_pivots_ln_ops_var1(), FLA_Apply_pivots_ln_opz_var1(), FLA_Obj_col_stride(), FLA_Obj_datatype(), FLA_Obj_length(), FLA_Obj_row_stride(), FLA_Obj_vector_dim(), and FLA_Obj_vector_inc().

Referenced by FLA_Apply_pivots_rt().

14 {
15  FLA_Datatype datatype;
16  int m_A;
17  int rs_A, cs_A;
18  int inc_p;
19  int k1_0, k2_0;
20 
21  datatype = FLA_Obj_datatype( A );
22 
23  m_A = FLA_Obj_length( A );
24 
25  // Swap the stride; FLA_Apply_pivots_ln_ops_var1 already consider the memory access pattern.
26  cs_A = FLA_Obj_row_stride( A );
27  rs_A = FLA_Obj_col_stride( A );
28 
29  // Use minus increment of the ln version.
30  inc_p = FLA_Obj_vector_inc( p );
31 
32  // Use zero-based indices.
33  k1_0 = 0;
34  k2_0 = ( int ) FLA_Obj_vector_dim( p ) - 1;
35 
36  switch ( datatype )
37  {
38  case FLA_INT:
39  {
40  int* buff_A = FLA_INT_PTR( A );
41  int* buff_p = FLA_INT_PTR( p );
42 
44  buff_A, rs_A, cs_A,
45  k1_0,
46  k2_0,
47  buff_p, inc_p );
48 
49  break;
50  }
51 
52  case FLA_FLOAT:
53  {
54  float* buff_A = FLA_FLOAT_PTR( A );
55  int* buff_p = FLA_INT_PTR( p );
56 
58  buff_A, rs_A, cs_A,
59  k1_0,
60  k2_0,
61  buff_p, inc_p );
62 
63  break;
64  }
65 
66  case FLA_DOUBLE:
67  {
68  double* buff_A = FLA_DOUBLE_PTR( A );
69  int* buff_p = FLA_INT_PTR( p );
70 
72  buff_A, rs_A, cs_A,
73  k1_0,
74  k2_0,
75  buff_p, inc_p );
76 
77  break;
78  }
79 
80  case FLA_COMPLEX:
81  {
82  scomplex* buff_A = FLA_COMPLEX_PTR( A );
83  int* buff_p = FLA_INT_PTR( p );
84 
86  buff_A, rs_A, cs_A,
87  k1_0,
88  k2_0,
89  buff_p, inc_p );
90 
91  break;
92  }
93 
94  case FLA_DOUBLE_COMPLEX:
95  {
96  dcomplex* buff_A = FLA_DOUBLE_COMPLEX_PTR( A );
97  int* buff_p = FLA_INT_PTR( p );
98 
100  buff_A, rs_A, cs_A,
101  k1_0,
102  k2_0,
103  buff_p, inc_p );
104 
105  break;
106  }
107  }
108 
109  return FLA_SUCCESS;
110 }
FLA_Error FLA_Apply_pivots_ln_opz_var1(int n, dcomplex *a, int a_rs, int a_cs, int k1, int k2, int *p, int incp)
Definition: FLA_Apply_pivots_ln_opt_var1.c:438
dim_t FLA_Obj_row_stride(FLA_Obj obj)
Definition: FLA_Query.c:167
FLA_Error FLA_Apply_pivots_ln_opc_var1(int n, scomplex *a, int a_rs, int a_cs, int k1, int k2, int *p, int incp)
Definition: FLA_Apply_pivots_ln_opt_var1.c:356
FLA_Error FLA_Apply_pivots_ln_ops_var1(int n, float *a, int a_rs, int a_cs, int k1, int k2, int *p, int incp)
Definition: FLA_Apply_pivots_ln_opt_var1.c:192
FLA_Datatype FLA_Obj_datatype(FLA_Obj obj)
Definition: FLA_Query.c:13
Definition: blis_type_defs.h:132
FLA_Error FLA_Apply_pivots_ln_opd_var1(int n, double *a, int a_rs, int a_cs, int k1, int k2, int *p, int incp)
Definition: FLA_Apply_pivots_ln_opt_var1.c:274
dim_t FLA_Obj_vector_dim(FLA_Obj obj)
Definition: FLA_Query.c:137
int FLA_Datatype
Definition: FLA_type_defs.h:49
dim_t FLA_Obj_col_stride(FLA_Obj obj)
Definition: FLA_Query.c:174
FLA_Error FLA_Apply_pivots_ln_opi_var1(int n, int *a, int a_rs, int a_cs, int k1, int k2, int *p, int incp)
Definition: FLA_Apply_pivots_ln_opt_var1.c:110
dim_t FLA_Obj_vector_inc(FLA_Obj obj)
Definition: FLA_Query.c:145
dim_t FLA_Obj_length(FLA_Obj obj)
Definition: FLA_Query.c:116
Definition: blis_type_defs.h:137