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 );
113 ldbv = ( B->rk == -1 ) ? -1 : B->rkmax;
117 Cptr += ldcu * offy + offx;
122 if ( flops1 <= flops2 ) {
131 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
133 CBLAS_SADDR(cone), A->u, ldau,
135 CBLAS_SADDR(czero), work, M );
137 pastix_atomic_lock( lock );
138 assert( C->rk == -1 );
139 cblas_cgemm( CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)transB,
141 CBLAS_SADDR(alpha), work, M,
143 CBLAS_SADDR(beta), Cptr, ldcu );
145 pastix_atomic_unlock( lock );
156 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
158 CBLAS_SADDR(cone), B->u, ldbu,
160 CBLAS_SADDR(czero), work, K );
162 pastix_atomic_lock( lock );
163 assert( C->rk == -1 );
164 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
166 CBLAS_SADDR(alpha), A->u, ldau,
168 CBLAS_SADDR(beta), Cptr, ldcu );
171 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 );
213 ldav = ( A->rk == -1 ) ? -1 : A->rkmax;
218 Cptr += ldcu * offy + offx;
223 if ( flops1 <= flops2 ) {
232 cblas_cgemm( CblasColMajor, CblasNoTrans, (CBLAS_TRANSPOSE)transB,
234 CBLAS_SADDR(cone), A->v, ldav,
236 CBLAS_SADDR(czero), work, A->rk );
238 pastix_atomic_lock( lock );
239 assert( C->rk == -1 );
240 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
242 CBLAS_SADDR(alpha), A->u, ldau,
244 CBLAS_SADDR(beta), Cptr, ldcu );
247 pastix_atomic_unlock( lock );
258 cblas_cgemm( CblasColMajor, CblasNoTrans, CblasNoTrans,
260 CBLAS_SADDR(cone), A->u, ldau,
262 CBLAS_SADDR(czero), work, M );
264 pastix_atomic_lock( lock );
265 assert( C->rk == -1 );
266 cblas_cgemm( CblasColMajor, (CBLAS_TRANSPOSE)transA, (CBLAS_TRANSPOSE)transB,
268 CBLAS_SADDR(alpha), work, M,
270 CBLAS_SADDR(beta), Cptr, ldcu );
273 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.