libflame  revision_anchor
Functions
bl1_free_saved_contigmsr.c File Reference

(r)

Functions

void bl1_sfree_saved_contigmsr (side1_t side, uplo1_t uplo, int m, int n, float *a_save, int a_rs_save, int a_cs_save, float **a, int *a_rs, int *a_cs)
 
void bl1_dfree_saved_contigmsr (side1_t side, uplo1_t uplo, int m, int n, double *a_save, int a_rs_save, int a_cs_save, double **a, int *a_rs, int *a_cs)
 
void bl1_cfree_saved_contigmsr (side1_t side, uplo1_t uplo, int m, int n, scomplex *a_save, int a_rs_save, int a_cs_save, scomplex **a, int *a_rs, int *a_cs)
 
void bl1_zfree_saved_contigmsr (side1_t side, uplo1_t uplo, int m, int n, dcomplex *a_save, int a_rs_save, int a_cs_save, dcomplex **a, int *a_rs, int *a_cs)
 

Function Documentation

◆ bl1_cfree_saved_contigmsr()

void bl1_cfree_saved_contigmsr ( side1_t  side,
uplo1_t  uplo,
int  m,
int  n,
scomplex a_save,
int  a_rs_save,
int  a_cs_save,
scomplex **  a,
int *  a_rs,
int *  a_cs 
)
72 {
73  int dim_a;
74 
75  // Choose the dimension of the matrix based on the side parameter.
76  if ( bl1_is_left( side ) ) dim_a = m;
77  else dim_a = n;
78 
79  if ( bl1_is_gen_storage( a_rs_save, a_cs_save ) )
80  {
81  // Copy the contents of the temporary matrix back to the original.
82  bl1_ccopymt( uplo,
83  dim_a,
84  dim_a,
85  *a, *a_rs, *a_cs,
86  a_save, a_rs_save, a_cs_save );
87 
88  // Free the temporary contiguous storage for the matrix.
89  bl1_cfree( *a );
90 
91  // Restore the original matrix address.
92  *a = a_save;
93 
94  // Restore the original row and column strides.
95  *a_rs = a_rs_save;
96  *a_cs = a_cs_save;
97  }
98 }
void bl1_ccopymt(trans1_t trans, int m, int n, scomplex *a, int a_rs, int a_cs, scomplex *b, int b_rs, int b_cs)
Definition: bl1_copymt.c:215
int bl1_is_gen_storage(int rs, int cs)
Definition: bl1_is.c:100
int bl1_is_left(side1_t side)
Definition: bl1_is.c:61
void bl1_cfree(scomplex *p)
Definition: bl1_free.c:40

References bl1_ccopymt(), bl1_cfree(), bl1_is_gen_storage(), and bl1_is_left().

◆ bl1_dfree_saved_contigmsr()

void bl1_dfree_saved_contigmsr ( side1_t  side,
uplo1_t  uplo,
int  m,
int  n,
double *  a_save,
int  a_rs_save,
int  a_cs_save,
double **  a,
int *  a_rs,
int *  a_cs 
)
43 {
44  int dim_a;
45 
46  // Choose the dimension of the matrix based on the side parameter.
47  if ( bl1_is_left( side ) ) dim_a = m;
48  else dim_a = n;
49 
50  if ( bl1_is_gen_storage( a_rs_save, a_cs_save ) )
51  {
52  // Copy the contents of the temporary matrix back to the original.
53  bl1_dcopymt( uplo,
54  dim_a,
55  dim_a,
56  *a, *a_rs, *a_cs,
57  a_save, a_rs_save, a_cs_save );
58 
59  // Free the temporary contiguous storage for the matrix.
60  bl1_dfree( *a );
61 
62  // Restore the original matrix address.
63  *a = a_save;
64 
65  // Restore the original row and column strides.
66  *a_rs = a_rs_save;
67  *a_cs = a_cs_save;
68  }
69 }
void bl1_dcopymt(trans1_t trans, int m, int n, double *a, int a_rs, int a_cs, double *b, int b_rs, int b_cs)
Definition: bl1_copymt.c:148
void bl1_dfree(double *p)
Definition: bl1_free.c:35

References bl1_dcopymt(), bl1_dfree(), bl1_is_gen_storage(), and bl1_is_left().

◆ bl1_sfree_saved_contigmsr()

void bl1_sfree_saved_contigmsr ( side1_t  side,
uplo1_t  uplo,
int  m,
int  n,
float *  a_save,
int  a_rs_save,
int  a_cs_save,
float **  a,
int *  a_rs,
int *  a_cs 
)
14 {
15  int dim_a;
16 
17  // Choose the dimension of the matrix based on the side parameter.
18  if ( bl1_is_left( side ) ) dim_a = m;
19  else dim_a = n;
20 
21  if ( bl1_is_gen_storage( a_rs_save, a_cs_save ) )
22  {
23  // Copy the contents of the temporary matrix back to the original.
24  bl1_scopymt( uplo,
25  dim_a,
26  dim_a,
27  *a, *a_rs, *a_cs,
28  a_save, a_rs_save, a_cs_save );
29 
30  // Free the temporary contiguous storage for the matrix.
31  bl1_sfree( *a );
32 
33  // Restore the original matrix address.
34  *a = a_save;
35 
36  // Restore the original row and column strides.
37  *a_rs = a_rs_save;
38  *a_cs = a_cs_save;
39  }
40 }
void bl1_scopymt(trans1_t trans, int m, int n, float *a, int a_rs, int a_cs, float *b, int b_rs, int b_cs)
Definition: bl1_copymt.c:81
void bl1_sfree(float *p)
Definition: bl1_free.c:30

References bl1_is_gen_storage(), bl1_is_left(), bl1_scopymt(), and bl1_sfree().

◆ bl1_zfree_saved_contigmsr()

void bl1_zfree_saved_contigmsr ( side1_t  side,
uplo1_t  uplo,
int  m,
int  n,
dcomplex a_save,
int  a_rs_save,
int  a_cs_save,
dcomplex **  a,
int *  a_rs,
int *  a_cs 
)
101 {
102  int dim_a;
103 
104  // Choose the dimension of the matrix based on the side parameter.
105  if ( bl1_is_left( side ) ) dim_a = m;
106  else dim_a = n;
107 
108  if ( bl1_is_gen_storage( a_rs_save, a_cs_save ) )
109  {
110  // Copy the contents of the temporary matrix back to the original.
111  bl1_zcopymr( uplo,
112  dim_a,
113  dim_a,
114  *a, *a_rs, *a_cs,
115  a_save, a_rs_save, a_cs_save );
116 
117  // Free the temporary contiguous storage for the matrix.
118  bl1_zfree( *a );
119 
120  // Restore the original matrix address.
121  *a = a_save;
122 
123  // Restore the original row and column strides.
124  *a_rs = a_rs_save;
125  *a_cs = a_cs_save;
126  }
127 }
void bl1_zcopymr(uplo1_t uplo, int m, int n, dcomplex *a, int a_rs, int a_cs, dcomplex *b, int b_rs, int b_cs)
Definition: bl1_copymr.c:202
void bl1_zfree(dcomplex *p)
Definition: bl1_free.c:45

References bl1_is_gen_storage(), bl1_is_left(), bl1_zcopymr(), and bl1_zfree().