23 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59 Cptr += ldcu * offy + offx;
61 pastix_atomic_lock( lock );
62 assert( C->rk == -1 );
67 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
69 CBLAS_SADDR(alpha), A->u, ldau,
71 CBLAS_SADDR(beta), Cptr, ldcu );
72 flops = FLOPS_CGEMM( M, N, K );
74 pastix_atomic_unlock( lock );
106 pastix_fixdbl_t flops1 = FLOPS_CGEMM( M, B->rk, K ) + FLOPS_CGEMM( M, N, B->rk );
107 pastix_fixdbl_t flops2 = FLOPS_CGEMM( K, N, B->rk ) + FLOPS_CGEMM( M, N, K );
114 ldbv = ( B->rk == -1 ) ? -1 : B->rkmax;
118 Cptr += ldcu * offy + offx;
123 if ( flops1 <= flops2 ) {
132 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
134 CBLAS_SADDR(cone), A->u, ldau,
136 CBLAS_SADDR(czero), work, M );
138 pastix_atomic_lock( lock );
139 assert( C->rk == -1 );
140 cblas_cgemm( CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)transB,
142 CBLAS_SADDR(alpha), work, M,
144 CBLAS_SADDR(beta), Cptr, ldcu );
146 pastix_atomic_unlock( lock );
157 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
159 CBLAS_SADDR(cone), B->u, ldbu,
161 CBLAS_SADDR(czero), work, K );
163 pastix_atomic_lock( lock );
164 assert( C->rk == -1 );
165 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
167 CBLAS_SADDR(alpha), A->u, ldau,
169 CBLAS_SADDR(beta), Cptr, ldcu );
172 pastix_atomic_unlock( lock );
207 pastix_fixdbl_t flops1 = FLOPS_CGEMM( A->rk, N, K ) + FLOPS_CGEMM( M, N, A->rk );
208 pastix_fixdbl_t flops2 = FLOPS_CGEMM( M, K, A->rk ) + FLOPS_CGEMM( M, N, K );
214 ldav = ( A->rk == -1 ) ? -1 : A->rkmax;
219 Cptr += ldcu * offy + offx;
224 if ( flops1 <= flops2 ) {
233 cblas_cgemm( CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)transB,
235 CBLAS_SADDR(cone), A->v, ldav,
237 CBLAS_SADDR(czero), work, A->rk );
239 pastix_atomic_lock( lock );
240 assert( C->rk == -1 );
241 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
243 CBLAS_SADDR(alpha), A->u, ldau,
245 CBLAS_SADDR(beta), Cptr, ldcu );
248 pastix_atomic_unlock( lock );
259 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
261 CBLAS_SADDR(cone), A->u, ldau,
263 CBLAS_SADDR(czero), work, M );
265 pastix_atomic_lock( lock );
266 assert( C->rk == -1 );
267 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
269 CBLAS_SADDR(alpha), work, M,
271 CBLAS_SADDR(beta), Cptr, ldcu );
274 pastix_atomic_unlock( lock );
316 Cptr += ldcu * offy + offx;
319 assert( AB.
rk != -1 );
320 assert( AB.
rkmax != -1 );
329 pastix_atomic_lock( lock );
330 assert( C->rk == -1 );
332 cblas_cgemm( CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)trans,
334 CBLAS_SADDR(alpha), AB.
u, M,
336 CBLAS_SADDR(beta), Cptr, ldcu );
337 flops = FLOPS_CGEMM( M, N, AB.
rk );
338 pastix_atomic_unlock( lock );
BEGIN_C_DECLS typedef int pastix_int_t
float _Complex pastix_complex32_t
pastix_fixdbl_t core_cfrfr2fr(core_clrmm_t *params)
Perform the full-rank operation C = alpha * op(A) * op(B) + beta C.
#define PASTE_CORE_CLRMM_PARAMS(_a_)
Initialize all the parameters of the core_clrmm family functions to ease the access.
static pastix_complex32_t * core_clrmm_getws(core_clrmm_t *params, ssize_t newsize)
Function to get a workspace pointer if space is available in the one provided.
pastix_fixdbl_t core_clrlr2fr(core_clrmm_t *params)
Perform the operation C = alpha * op(A) * op(B) + beta C, with A and B low-rank and C full-rank.
#define PASTE_CORE_CLRMM_VOID
Void all the parameters of the core_clrmm family functions to silent warnings.
pastix_fixdbl_t core_clrfr2fr(core_clrmm_t *params)
Perform the operation C = alpha * op(A) * op(B) + beta C, with B and C full-rank and A low-rank.
pastix_fixdbl_t core_clrlr2lr(core_clrmm_t *params, pastix_lrblock_t *AB, int *infomask)
Perform the operation AB = op(A) * op(B), with A, B, and AB low-rank.
pastix_fixdbl_t core_cfrlr2fr(core_clrmm_t *params)
Perform the operation C = alpha * op(A) * op(B) + beta C, with A and C full-rank and B low-rank.
Structure to store all the parameters of the core_clrmm family functions.
#define PASTIX_LRM3_ALLOCV
Macro to specify if the V part of a low-rank matrix has been allocated and need to be freed or not (U...
#define PASTIX_LRM3_TRANSB
Macro to specify if the the operator on B, still needs to be applied to the V part of the low-rank ma...
#define PASTIX_LRM3_ALLOCU
Macro to specify if the U part of a low-rank matrix has been allocated and need to be freed or not (U...
The block low-rank structure to hold a matrix in low-rank form.
enum pastix_trans_e pastix_trans_t
Transpostion.