PaStiX Handbook  6.3.2
bcsc_s.h
Go to the documentation of this file.
1 /**
2  * @file bcsc_s.h
3  *
4  * @copyright 2004-2023 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
5  * Univ. Bordeaux. All rights reserved.
6  *
7  * @version 6.3.2
8  * @author Mathieu Faverge
9  * @author Pierre Ramet
10  * @author Xavier Lacoste
11  * @author Vincent Bridonneau
12  * @date 2023-07-21
13  *
14  * @generated from /builds/solverstack/pastix/bcsc/bcsc_z.h, normal z -> s, Wed Dec 13 12:09:04 2023
15  *
16  **/
17 #ifndef _bcsc_s_h_
18 #define _bcsc_s_h_
19 
20 /**
21  * @addtogroup bcsc_internal
22  * @{
23  *
24  * @name PastixFloat initialization functions
25  * @{
26  */
27 void bcsc_sinit( 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_sstore_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 PastixFloat vector(s) operations
49  * @{
50  */
51 void bvec_saxpy_seq( pastix_data_t *pastix_data,
52  pastix_int_t n,
53  float alpha,
54  const float *x,
55  float *y );
56 void bvec_saxpy_smp( pastix_data_t *pastix_data,
57  pastix_int_t n,
58  float alpha,
59  const float *x,
60  float *y );
61 
62 void bvec_scopy_seq( pastix_data_t *pastix_data,
63  pastix_int_t n,
64  const float *x,
65  float *y );
66 void bvec_scopy_smp( pastix_data_t *pastix_data,
67  pastix_int_t n,
68  const float *x,
69  float *y );
70 
71 #if defined(PRECISION_z) || defined(PRECISION_c)
72 float bvec_sdot_seq( pastix_data_t *pastix_data,
73  pastix_int_t n,
74  const float *x,
75  const float *y );
76 float bvec_sdot_smp( pastix_data_t *pastix_data,
77  pastix_int_t n,
78  const float *x,
79  const float *y );
80 #endif
81 
82 float bvec_sdot_seq( pastix_data_t *pastix_data,
83  pastix_int_t n,
84  const float *x,
85  const float *y );
86 float bvec_sdot_smp( pastix_data_t *pastix_data,
87  pastix_int_t n,
88  const float *x,
89  const float *y );
90 
91 void bvec_sgemv_seq( pastix_data_t *pastix_data,
92  pastix_int_t m,
93  pastix_int_t n,
94  float alpha,
95  const float *A,
96  pastix_int_t lda,
97  const float *x,
98  float beta,
99  float *y );
100 void bvec_sgemv_smp( pastix_data_t *pastix_data,
101  pastix_int_t m,
102  pastix_int_t n,
103  float alpha,
104  const float *A,
105  pastix_int_t lda,
106  const float *x,
107  float beta,
108  float *y );
109 
110 float bvec_snrm2_seq( pastix_data_t *pastix_data,
111  pastix_int_t n,
112  const float *x );
113 float bvec_snrm2_smp( pastix_data_t *pastix_data,
114  pastix_int_t n,
115  const float *x );
116 
117 void bvec_sscal_seq( pastix_data_t *pastix_data,
118  pastix_int_t n,
119  float alpha,
120  float *x );
121 void bvec_sscal_smp( pastix_data_t *pastix_data,
122  pastix_int_t n,
123  float alpha,
124  float *x );
125 
126 #if defined( PASTIX_WITH_MPI )
127 int bvec_sexchange_data_rep( pastix_data_t *pastix_data,
128  pastix_int_t nrhs,
129  float *b,
130  pastix_int_t ldb,
131  pastix_rhs_t Pb );
132 int bvec_sallocate_buf_dst( bvec_handle_comm_t *rhs_comm );
133 int bvec_sexchange_data_dst( pastix_data_t *pastix_data,
134  pastix_dir_t dir,
135  pastix_int_t nrhs,
136  float *b,
137  pastix_int_t ldb,
138  pastix_rhs_t Pb,
139  const pastix_int_t *glob2loc );
140 #endif
141 
142 int bvec_slapmr( pastix_data_t *pastix_data,
143  pastix_dir_t dir,
144  pastix_int_t m,
145  pastix_int_t n,
146  float *A,
147  pastix_int_t lda,
148  pastix_rhs_t PA );
149 
150 /**
151  * @}
152  *
153  * @name PastixFloat matrix operations
154  * @{
155  */
156 float bcsc_snorm( pastix_normtype_t ntype,
157  const pastix_bcsc_t *bcsc );
158 
159 void bcsc_sspsv( pastix_data_t *pastix_data,
160  float *b,
161  float *work );
162 
163 void bcsc_sspmv( const pastix_data_t *pastix_data,
164  pastix_trans_t trans,
165  float alpha,
166  const float *x,
167  float beta,
168  float *y );
169 
170 void bcsc_sspmv_seq( const pastix_data_t *pastix_data,
171  pastix_trans_t trans,
172  float alpha,
173  const float *x,
174  float beta,
175  float *y );
176 void bcsc_sspmv_smp( const pastix_data_t *pastix_data,
177  pastix_trans_t trans,
178  float alpha,
179  const float *x,
180  float beta,
181  float *y );
182 
183 /**
184  * @}
185  *
186  * @name PastixFloat MPI vector operations
187  * @{
188  */
189 const float *bvec_sgather_remote( const pastix_data_t *pastix_data,
190  const float *y );
191 void bvec_snullify_remote( const pastix_data_t *pastix_data,
192  float *y );
193 void bvec_sallreduce( const pastix_data_t *pastix_data,
194  float *y );
195 /**
196  * @}
197  * @}
198  */
199 #endif /* _bcsc_s_h_ */
BEGIN_C_DECLS typedef int pastix_int_t
Definition: datatypes.h:51
void bcsc_sinit(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 float block csc.
Definition: bcsc_sinit.c:1374
int bvec_slapmr(pastix_data_t *pastix_data, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, float *A, pastix_int_t lda, pastix_rhs_t PA)
Apply a row permutation to a right hand side A (LAPACK xlatmr)
Definition: bvec_slapmr.c:816
void bvec_sgemv_seq(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, float alpha, const float *A, pastix_int_t lda, const float *x, float beta, float *y)
Compute.
const float * bvec_sgather_remote(const pastix_data_t *pastix_data, const float *y)
Gather a distributed right hand side (bvec storage) on all nodes.
float bvec_sdot_smp(pastix_data_t *pastix_data, pastix_int_t n, const float *x, const float *y)
Compute a regular scalar product x.y (Parallel version)
void bvec_scopy_smp(pastix_data_t *pastix_data, pastix_int_t n, const float *x, float *y)
Copy a vector y = x (parallel version)
void bvec_sscal_smp(pastix_data_t *pastix_data, pastix_int_t n, float alpha, float *x)
Scale a vector (Parallel version)
void bvec_sscal_seq(pastix_data_t *pastix_data, pastix_int_t n, float alpha, float *x)
Scale a vector by the scalar alpha. (Sequential version)
void bvec_saxpy_seq(pastix_data_t *pastix_data, pastix_int_t n, float alpha, const float *x, float *y)
Compute y <- alpha * x + y. (Sequential version)
void bcsc_sspsv(pastix_data_t *pastix_data, float *b, float *work)
Solve A x = b with A the sparse matrix.
void bvec_scopy_seq(pastix_data_t *pastix_data, pastix_int_t n, const float *x, float *y)
Copy a vector y = x (Sequential version)
void bcsc_sspmv_smp(const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
Perform y = alpha A x + beta y (Parallel version)
Definition: bcsc_sspmv.c:552
void bvec_sgemv_smp(pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, float alpha, const float *A, pastix_int_t lda, const float *x, float beta, float *y)
Compute.
float bvec_snrm2_smp(pastix_data_t *pastix_data, pastix_int_t n, const float *x)
Compute the norm 2 of a vector. (Parallel version)
float bcsc_snorm(pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
Compute the norm of an bcsc matrix.
Definition: bcsc_snorm.c:252
void bvec_sallreduce(const pastix_data_t *pastix_data, float *y)
Apply an all reduce of the vector on all nodes.
void bcsc_sspmv(const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
Compute the matrix-vector product y = alpha * op(A) * x + beta * y.
Definition: bcsc_sspmv.c:629
float bvec_snrm2_seq(pastix_data_t *pastix_data, pastix_int_t n, const float *x)
Compute the norm 2 of a vector. (Sequential version)
Definition: bvec_scompute.c:71
float bvec_sdot_seq(pastix_data_t *pastix_data, pastix_int_t n, const float *x, const float *y)
Compute the scalar product x.y. (Sequential version)
void bcsc_sspmv_seq(const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)
Definition: bcsc_sspmv.c:246
void bvec_snullify_remote(const pastix_data_t *pastix_data, float *y)
Set to 0 remote coefficients.
void bvec_saxpy_smp(pastix_data_t *pastix_data, pastix_int_t n, float alpha, const float *x, float *y)
Perform y = alpha * 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:67
Main PaStiX RHS structure.
Definition: pastixdata.h:150
Solver column block structure.
Definition: solver.h:200