24 #include "kernels_trace.h"
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 #define MAXSIZEOFBLOCKS 64
28 static double done = 1.0;
29 static double mdone = -1.0;
71 pastix_int_t *nbpivots,
80 if ( fabs(*Akk) < criterion ) {
81 (*Akk) = (double)criterion;
88 pastix_print_error(
"Negative diagonal term\n" );
95 cblas_dscal(n-k-1, ( alpha ), Amk, 1 );
100 cblas_dsyr(CblasColMajor, CblasLower,
147 pastix_int_t *nbpivots,
150 pastix_int_t k, blocknbr, blocksize, matrixsize;
151 double *tmp,*tmp1,*tmp2;
154 blocknbr = pastix_iceil( n, MAXSIZEOFBLOCKS );
156 for (k=0; k<blocknbr; k++) {
158 blocksize = pastix_imin(MAXSIZEOFBLOCKS, n-k*MAXSIZEOFBLOCKS);
159 tmp = A+(k*MAXSIZEOFBLOCKS)*(lda+1);
164 if ((k*MAXSIZEOFBLOCKS+blocksize) < n) {
166 tmp1 = tmp + blocksize;
167 tmp2 = tmp1 + blocksize * lda;
169 matrixsize = n-(k*MAXSIZEOFBLOCKS+blocksize);
175 cblas_dtrsm(CblasColMajor,
176 CblasRight, CblasLower,
177 CblasTrans, CblasNonUnit,
178 matrixsize, blocksize,
183 cblas_dsyrk(CblasColMajor, CblasLower, CblasNoTrans,
184 matrixsize, blocksize,
185 (
double)mdone, tmp1, lda,
186 (
double)done, tmp2, lda);
224 pastix_int_t ncols, stride;
225 pastix_int_t nbpivots = 0;
226 pastix_fixdbl_t time, flops;
229 double criterion = solvmtx->diagthreshold;
231 time = kernel_trace_start( PastixKernelPOTRF );
234 stride = (cblk->
cblktype & CBLK_LAYOUT_2D) ? ncols : cblk->
stride;
240 if ( cblk->
cblktype & CBLK_COMPRESSED ) {
246 assert( lrL->
rk == -1 );
247 assert( stride == lrL->
rkmax );
253 flops = FLOPS_DPOTRF( ncols );
254 kernel_trace_start_lvl2( PastixKernelLvl2POTRF );
256 kernel_trace_stop_lvl2( flops );
258 kernel_trace_stop( cblk->
fblokptr->
inlast, PastixKernelPOTRF, ncols, 0, 0, flops, time );
261 pastix_atomic_add_32b( &(solvmtx->nbpivots), nbpivots );
296 pastix_int_t nbpivots;
301 cblk, L, L, &(solvmtx->lowrank) );
342 pastix_int_t nbpivots;
350 for( ; blok < lblk; blok++ )
352 fcblk = solvmtx->cblktab + blok->
fcblknm;
354 if ( fcblk->
cblktype & CBLK_FANIN ) {
361 work, lwork, &(solvmtx->lowrank) );
static void core_dpotf2sp(pastix_int_t n, double *A, pastix_int_t lda, pastix_int_t *nbpivots, double criterion)
Compute the sequential static pivoting Cholesky factorization of the matrix n-by-n A = L * L^t .
void core_dpotrfsp(pastix_int_t n, double *A, pastix_int_t lda, pastix_int_t *nbpivots, double criterion)
Compute the block static pivoting Cholesky factorization of the matrix n-by-n A = L * L^t .
void cpucblk_dalloc(pastix_coefside_t side, SolverCblk *cblk)
Allocate the cblk structure to store the coefficient.
void cpucblk_dtrsmsp(pastix_side_t side, pastix_uplo_t uplo, pastix_trans_t trans, pastix_diag_t diag, const SolverCblk *cblk, const void *A, void *C, const pastix_lr_t *lowrank)
Compute the updates associated to a column of off-diagonal blocks.
int cpucblk_dpotrfsp1d_potrf(SolverMatrix *solvmtx, SolverCblk *cblk, void *dataL)
Compute the Cholesky factorization of the diagonal block in a panel.
int cpucblk_dpotrfsp1d_panel(SolverMatrix *solvmtx, SolverCblk *cblk, void *L)
Compute the Cholesky factorization of one panel.
pastix_fixdbl_t cpucblk_dgemmsp(pastix_coefside_t sideA, pastix_trans_t trans, const SolverCblk *cblk, const SolverBlok *blok, SolverCblk *fcblk, const void *A, const void *B, void *C, double *work, pastix_int_t lwork, const pastix_lr_t *lowrank)
Compute the updates associated to one off-diagonal block.
void cpucblk_drelease_deps(pastix_coefside_t side, SolverMatrix *solvmtx, const SolverCblk *cblk, SolverCblk *fcbk)
Release the dependencies of the given cblk after an update.
int cpucblk_dpotrfsp1d(SolverMatrix *solvmtx, SolverCblk *cblk, double *work, pastix_int_t lwork)
Perform the Cholesky factorization of a given panel and apply all its updates.
The block low-rank structure to hold a matrix in low-rank form.
static void * cblk_getdataL(const SolverCblk *cblk)
Get the pointer to the data associated to the lower part of the cblk.
Solver column block structure.