PaStiX Handbook  6.4.0
bcsc_z.h
Go to the documentation of this file.
1 /**
2  * @file bcsc_z.h
3  *
4  * @copyright 2004-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
5  * Univ. Bordeaux. All rights reserved.
6  *
7  * @version 6.4.0
8  * @author Mathieu Faverge
9  * @author Pierre Ramet
10  * @author Xavier Lacoste
11  * @author Vincent Bridonneau
12  * @date 2024-07-05
13  *
14  * @generated from /builds/solverstack/pastix/bcsc/bcsc_z.h, normal z -> z, Tue Oct 8 14:17:10 2024
15  *
16  **/
17 #ifndef _bcsc_z_h_
18 #define _bcsc_z_h_
19 
20 /**
21  * @addtogroup bcsc_internal
22  * @{
23  *
24  * @name PastixComplex64 initialization functions
25  * @{
26  */
27 void bcsc_zinit( const spmatrix_t *spm,
28  const pastix_order_t *ord,
29  const SolverMatrix *solvmtx,
30  int initAt,
31  pastix_bcsc_t *bcsc,
32  pastix_int_t valuesize );
33 
34 #if defined(PASTIX_WITH_MPI)
35 void bcsc_zstore_data( const spmatrix_t *spm,
36  const pastix_order_t *ord,
37  const pastix_int_t *col2cblk,
38  bcsc_handle_comm_t *bcsc_comm );
39 #endif
40 
41 /**
42  * @}
43  * @}
44  *
45  * @addtogroup bcsc
46  * @{
47  *
48  * @name PastixComplex64 vector(s) operations
49  * @{
50  */
51 void bvec_zaxpy_seq( pastix_data_t *pastix_data,
52  pastix_int_t n,
53  pastix_complex64_t alpha,
54  const pastix_complex64_t *x,
55  pastix_complex64_t *y );
56 void bvec_zaxpy_smp( pastix_data_t *pastix_data,
57  pastix_int_t n,
58  pastix_complex64_t alpha,
59  const pastix_complex64_t *x,
60  pastix_complex64_t *y );
61 
62 void bvec_zcopy_seq( pastix_data_t *pastix_data,
63  pastix_int_t n,
64  const pastix_complex64_t *x,
65  pastix_complex64_t *y );
66 void bvec_zcopy_smp( pastix_data_t *pastix_data,
67  pastix_int_t n,
68  const pastix_complex64_t *x,
69  pastix_complex64_t *y );
70 
71 #if defined(PRECISION_z) || defined(PRECISION_c)
72 pastix_complex64_t bvec_zdotc_seq( pastix_data_t *pastix_data,
73  pastix_int_t n,
74  const pastix_complex64_t *x,
75  const pastix_complex64_t *y );
76 pastix_complex64_t bvec_zdotc_smp( pastix_data_t *pastix_data,
77  pastix_int_t n,
78  const pastix_complex64_t *x,
79  const pastix_complex64_t *y );
80 #endif
81 
82 pastix_complex64_t bvec_zdotu_seq( pastix_data_t *pastix_data,
83  pastix_int_t n,
84  const pastix_complex64_t *x,
85  const pastix_complex64_t *y );
86 pastix_complex64_t bvec_zdotu_smp( pastix_data_t *pastix_data,
87  pastix_int_t n,
88  const pastix_complex64_t *x,
89  const pastix_complex64_t *y );
90 
91 void bvec_zgemv_seq( pastix_data_t *pastix_data,
92  pastix_int_t m,
93  pastix_int_t n,
94  pastix_complex64_t alpha,
95  const pastix_complex64_t *A,
96  pastix_int_t lda,
97  const pastix_complex64_t *x,
98  pastix_complex64_t beta,
99  pastix_complex64_t *y );
100 void bvec_zgemv_smp( pastix_data_t *pastix_data,
101  pastix_int_t m,
102  pastix_int_t n,
103  pastix_complex64_t alpha,
104  const pastix_complex64_t *A,
105  pastix_int_t lda,
106  const pastix_complex64_t *x,
107  pastix_complex64_t beta,
108  pastix_complex64_t *y );
109 
110 double bvec_znrm2_seq( pastix_data_t *pastix_data,
111  pastix_int_t n,
112  const pastix_complex64_t *x );
113 double bvec_znrm2_smp( pastix_data_t *pastix_data,
114  pastix_int_t n,
115  const pastix_complex64_t *x );
116 
117 void bvec_zscal_seq( pastix_data_t *pastix_data,
118  pastix_int_t n,
119  pastix_complex64_t alpha,
120  pastix_complex64_t *x );
121 void bvec_zscal_smp( pastix_data_t *pastix_data,
122  pastix_int_t n,
123  pastix_complex64_t alpha,
124  pastix_complex64_t *x );
125 
126 #if defined( PASTIX_WITH_MPI )
127 int bvec_zexchange_data_rep( pastix_data_t *pastix_data,
128  pastix_int_t nrhs,
129  pastix_complex64_t *b,
130  pastix_int_t ldb,
131  pastix_rhs_t Pb );
132 int bvec_zallocate_buf_dst( bvec_handle_comm_t *rhs_comm );
133 int bvec_zexchange_data_dst( pastix_data_t *pastix_data,
134  pastix_dir_t dir,
135  pastix_int_t nrhs,
136  pastix_complex64_t *b,
137  pastix_int_t ldb,
138  pastix_rhs_t Pb,
139  const pastix_int_t *glob2loc );
140 #endif
141 
142 int bvec_zlapmr( pastix_data_t *pastix_data,
143  pastix_dir_t dir,
144  pastix_int_t m,
145  pastix_int_t n,
146  pastix_complex64_t *A,
147  pastix_int_t lda,
148  pastix_rhs_t PA );
149 
150 /**
151  * @}
152  *
153  * @name PastixComplex64 matrix operations
154  * @{
155  */
156 double bcsc_znorm( pastix_normtype_t ntype,
157  const pastix_bcsc_t *bcsc );
158 
159 void bcsc_zspsv( pastix_data_t *pastix_data,
160  pastix_complex64_t *b,
161  pastix_complex32_t *work );
162 
163 void bcsc_zspmv( const pastix_data_t *pastix_data,
164  pastix_trans_t trans,
165  pastix_complex64_t alpha,
166  const pastix_complex64_t *x,
167  pastix_complex64_t beta,
168  pastix_complex64_t *y );
169 
170 void bcsc_zspmv_seq( const pastix_data_t *pastix_data,
171  pastix_trans_t trans,
172  pastix_complex64_t alpha,
173  const pastix_complex64_t *x,
174  pastix_complex64_t beta,
175  pastix_complex64_t *y );
176 void bcsc_zspmv_smp( const pastix_data_t *pastix_data,
177  pastix_trans_t trans,
178  pastix_complex64_t alpha,
179  const pastix_complex64_t *x,
180  pastix_complex64_t beta,
181  pastix_complex64_t *y );
182 
183 /**
184  * @}
185  *
186  * @name PastixComplex64 MPI vector operations
187  * @{
188  */
189 const pastix_complex64_t *bvec_zgather_remote( const pastix_data_t *pastix_data,
190  const pastix_complex64_t *y );
191 void bvec_znullify_remote( const pastix_data_t *pastix_data,
192  pastix_complex64_t *y );
193 void bvec_zallreduce( const pastix_data_t *pastix_data,
194  pastix_complex64_t *y );
195 /**
196  * @}
197  * @}
198  */
199 #endif /* _bcsc_z_h_ */
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
float _Complex pastix_complex32_t
Definition: datatypes.h:76
void bcsc_zinit(const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, int initAt, pastix_bcsc_t *bcsc, pastix_int_t valuesize)
Initializes a centralize pastix_complex64_t block csc.
Definition: bcsc_zinit.c:1378
double bcsc_znorm(pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
Compute the norm of an bcsc matrix.
Definition: bcsc_znorm.c:252
void bvec_zcopy_seq(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, pastix_complex64_t *y)
Copy a vector y = x (Sequential version)
void bvec_zgemv_seq(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *A, pastix_int_t lda, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
Compute.
void bvec_znullify_remote(const pastix_data_t *pastix_data, pastix_complex64_t *y)
Set to 0 remote coefficients.
void bvec_zaxpy_seq(pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t *y)
Compute y <- alpha * x + y. (Sequential version)
pastix_complex64_t bvec_zdotu_seq(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, const pastix_complex64_t *y)
Compute the scalar product x.y. (Sequential version)
void bvec_zallreduce(const pastix_data_t *pastix_data, pastix_complex64_t *y)
Apply an all reduce of the vector on all nodes.
double bvec_znrm2_smp(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x)
Compute the norm 2 of a vector. (Parallel version)
int bvec_zlapmr(pastix_data_t *pastix_data, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, pastix_complex64_t *A, pastix_int_t lda, pastix_rhs_t PA)
Apply a row permutation to a right hand side A (LAPACK xlatmr)
Definition: bvec_zlapmr.c:816
double bvec_znrm2_seq(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x)
Compute the norm 2 of a vector. (Sequential version)
Definition: bvec_zcompute.c:71
void bcsc_zspmv_smp(const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
Perform y = alpha A x + beta y (Parallel version)
Definition: bcsc_zspmv.c:552
void bvec_zgemv_smp(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *A, pastix_int_t lda, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
Compute.
void bvec_zcopy_smp(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, pastix_complex64_t *y)
Copy a vector y = x (parallel version)
void bvec_zscal_smp(pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, pastix_complex64_t *x)
Scale a vector (Parallel version)
void bvec_zaxpy_smp(pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t *y)
Perform y = alpha * x + y (Parallel version)
const pastix_complex64_t * bvec_zgather_remote(const pastix_data_t *pastix_data, const pastix_complex64_t *y)
Gather a distributed right hand side (bvec storage) on all nodes.
void bcsc_zspmv(const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
Compute the matrix-vector product y = alpha * op(A) * x + beta * y.
Definition: bcsc_zspmv.c:629
void bvec_zscal_seq(pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, pastix_complex64_t *x)
Scale a vector by the scalar alpha. (Sequential version)
void bcsc_zspsv(pastix_data_t *pastix_data, pastix_complex64_t *b, pastix_complex32_t *work)
Solve A x = b with A the sparse matrix.
void bcsc_zspmv_seq(const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)
Definition: bcsc_zspmv.c:246
pastix_complex64_t bvec_zdotu_smp(pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, const pastix_complex64_t *y)
Compute a regular scalar product x.y (Parallel version)
Structure to manage communications with distributed spm.
Definition: bcsc.h:92
Structure to manage communications with distributed rhs.
Definition: bvec.h:66
enum pastix_normtype_e pastix_normtype_t
Norms.
enum pastix_dir_e pastix_dir_t
Direction.
enum pastix_trans_e pastix_trans_t
Transpostion.
Order structure.
Definition: order.h:47
Main PaStiX data structure.
Definition: pastixdata.h:68
Main PaStiX RHS structure.
Definition: pastixdata.h:155
Solver column block structure.
Definition: solver.h:203