#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <oski/common.h>
#include <oski/heur/estfill.h>
Defines | |
#define | GET_BC(A, c, J) (A)[((c)-1)*n + (J)] |
#define | INC_BC(A, c, J) (A)[((c)-1)*n + (J)]++ |
#define | ZERO_BC(A, c, J) (A)[((c)-1)*n + (J)] = 0 |
Functions | |
static int | EstimateBlockCounts (const oski_index_t *ptr, const oski_index_t *ind, oski_index_t base, oski_index_t m, oski_index_t n, oski_index_t r, oski_index_t max_c, double prob_examine, oski_index_t *p_nnz_est, oski_index_t *p_nb_est) |
Given an CSR matrix , estimates the fill ratio if the matrix were converted into BCSR format. | |
static int | CheckArgs (const oski_matspecific_t *A, const oski_matcommon_t *props, size_t max_r, size_t max_c, double prob_examine, const char *caller) |
Check input arguments to a function with a signature like oski_EstimateFillBCSR(). | |
static int | EstimateFillFromCSR (const oski_matCSR_t *A, const oski_matcommon_t *props, size_t max_r, size_t max_c, double prob_examine, oski_fillprofile_BCSR_t *fill) |
This routine is a wrapper around EstimateBlockCounts(). | |
static int | EstimateFillFromCSC (const oski_matCSC_t *A, const oski_matcommon_t *props, size_t max_r, size_t max_c, double prob_examine, oski_fillprofile_BCSR_t *fill) |
Estimate the fill ratio for a matrix initially in CSC format. | |
oski_fillprofile_BCSR_t * | oski_EstimateFillBCSR (const oski_matspecific_t *mat, const oski_matcommon_t *props, size_t max_r, size_t max_c, double prob_examine) |
Estimate the fill ratio at a variety of block sizes for BCSR storage. | |
void | oski_DestroyBCSRFillProfile (oski_fillprofile_BCSR_t *fill) |
Free the memory associated with a fill profile. |
|
Given an CSR matrix , estimates the fill ratio if the matrix were converted into BCSR format. The caller supplies this routine with a maximum column block size , and this routine returns the estimated fill ratios for all . If the converted matrix has blocks, this implementation executes in time, but requires auxiliary storage space to store a dense copies of the block rows. This routine assumes the CSR matrix uses full storage, but otherwise is flexible with regard to the following variations:
Increment the block count for block column size c, block column J. Set the block count for block column size c, block column J, to zero. |
|
Estimate the fill ratio for a matrix initially in CSC format. This implementation exploits the fact that the CSC representation is based on the transpose of the CSR implementation.
|
|
This routine is a wrapper around EstimateBlockCounts().
|
|
Free the memory associated with a fill profile.
|
|
Estimate the fill ratio at a variety of block sizes for BCSR storage.
|