Mentions légales du service

Skip to content
Snippets Groups Projects
Commit d32091ed authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Second round of fixes thanks to coverity

parent c05aef89
No related branches found
No related tags found
No related merge requests found
...@@ -272,9 +272,6 @@ drawsvg_lines_rowm( FILE *file, int k, ...@@ -272,9 +272,6 @@ drawsvg_lines_rowm( FILE *file, int k,
* The reduction tree structure * The reduction tree structure
* @param[in,out] file * @param[in,out] file
* The opened file decriptor on which the data is written * The opened file decriptor on which the data is written
* @param[in] full
* Defines if all the rows are involved in the process (tpqrt
* kernels), or only the lower triangular (geqrt kernels)
* @param[in] k * @param[in] k
* The factorization step that defines the color. * The factorization step that defines the color.
* @param[in,out] tiles * @param[in,out] tiles
...@@ -287,14 +284,10 @@ drawsvg_lines_rowm( FILE *file, int k, ...@@ -287,14 +284,10 @@ drawsvg_lines_rowm( FILE *file, int k,
*/ */
static void static void
drawsvg_lines_stepk( const libhqr_tree_t *qrtree, FILE *file, drawsvg_lines_stepk( const libhqr_tree_t *qrtree, FILE *file,
int full, int k, int *tiles, int *step ) int k, int *tiles, int *step )
{ {
int i; int i;
int imax = qrtree->mt - 1; int imax;
if (!full) {
imax -= k;
}
/* Get order for step k */ /* Get order for step k */
imax = libhqr_walk_stepk( qrtree, k, tiles ); imax = libhqr_walk_stepk( qrtree, k, tiles );
...@@ -361,7 +354,6 @@ libhqr_print_svg( const libhqr_tree_t *qrtree, ...@@ -361,7 +354,6 @@ libhqr_print_svg( const libhqr_tree_t *qrtree,
FILE *file; FILE *file;
int *tiles, *steps; int *tiles, *steps;
int k, i; int k, i;
int full = (qrtree->facto == LIBHQR_TSQR) || (qrtree->facto == LIBHQR_TSLQ);
tiles = (int*)calloc( qrtree->mt, sizeof(int) ); tiles = (int*)calloc( qrtree->mt, sizeof(int) );
steps = (int*)calloc( qrtree->mt, sizeof(int) ); steps = (int*)calloc( qrtree->mt, sizeof(int) );
...@@ -370,7 +362,7 @@ libhqr_print_svg( const libhqr_tree_t *qrtree, ...@@ -370,7 +362,7 @@ libhqr_print_svg( const libhqr_tree_t *qrtree,
drawsvg_header(file); drawsvg_header(file);
for (k = 0; k < qrtree->nt; k++) { for (k = 0; k < qrtree->nt; k++) {
/* Drawing the lines */ /* Drawing the lines */
drawsvg_lines_stepk( qrtree, file, full, k, tiles, steps ); drawsvg_lines_stepk( qrtree, file, k, tiles, steps );
/* Drawing the rectangles */ /* Drawing the rectangles */
for (i = 0; i < qrtree->mt; i++) { for (i = 0; i < qrtree->mt; i++) {
......
...@@ -950,6 +950,8 @@ libhqr_getfirst_pivot( const libhqr_tree_t *qrtree, int k ) ...@@ -950,6 +950,8 @@ libhqr_getfirst_pivot( const libhqr_tree_t *qrtree, int k )
* Array of size qrtree->mt that stores in the first entries the tiles * Array of size qrtree->mt that stores in the first entries the tiles
* to kill in the right order to walk through the tree. * to kill in the right order to walk through the tree.
* The last entry corresponds to the main pivot. * The last entry corresponds to the main pivot.
*
* @return The number of tiles used in the reduction tree.
*/ */
int int
libhqr_walk_stepk( const libhqr_tree_t *qrtree, libhqr_walk_stepk( const libhqr_tree_t *qrtree,
......
...@@ -76,7 +76,7 @@ libhqr_initmtx_tshqr( libhqr_tree_t *qrtree, ...@@ -76,7 +76,7 @@ libhqr_initmtx_tshqr( libhqr_tree_t *qrtree,
args->tileinfo = malloc( qrtree->mt * qrtree->nt * sizeof( libhqr_tile_info_t ) ); args->tileinfo = malloc( qrtree->mt * qrtree->nt * sizeof( libhqr_tile_info_t ) );
args->killers = NULL; args->killers = NULL;
args->pivots = malloc( qrtree->nt * sizeof( int ) ); args->pivots = malloc( qrtree->nt * sizeof( int ) );
args->nbgeqrf = roundrobin ? malloc(1) : NULL; args->nbgeqrf = roundrobin ? malloc( sizeof(int) ) : NULL;
tileinfo = args->tileinfo; tileinfo = args->tileinfo;
pivots = args->pivots; pivots = args->pivots;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment