be_lower_for_target is now a simple function in the public API
[libfirm] / ir / adt / gaussseidel.c
index d1bc696..572716b 100644 (file)
  */
 #define COL_INCREASE 2
 
-typedef struct _col_val_t {
+typedef struct col_val_t {
        double v;
        int col_idx;
 } col_val_t;
 
-typedef struct _row_col_t {
+typedef struct row_col_t {
        int c_cols;
        int n_cols;
        double diag;
        col_val_t *cols;
 } row_col_t;
 
-struct _gs_matrix_t {
+struct gs_matrix_t {
        int initial_col_increase;
        int c_rows;
        int n_zero_entries;           ///< Upper bound on number of entries equal to 0.0
@@ -226,7 +226,8 @@ double gs_matrix_get(const gs_matrix_t *m, int row, int col)
                return the_row->diag != 0.0 ? 1.0 / the_row->diag : 0.0;
 
        // Search for correct column
-       for (c = 0; c < the_row->n_cols && the_row->cols[c].col_idx < col; ++c);
+       for (c = 0; c < the_row->n_cols && the_row->cols[c].col_idx < col; ++c) {
+       }
 
        if (c >= the_row->n_cols || the_row->cols[c].col_idx > col)
                return 0.0;
@@ -325,18 +326,3 @@ void gs_matrix_dump(const gs_matrix_t *m, int a, int b, FILE *out)
 
        xfree(elems);
 }
-
-void gs_matrix_self_test(int d)
-{
-       int i, o;
-       gs_matrix_t *m = gs_new_matrix(10, 10);
-
-       for (i=0; i<d; ++i)
-               for (o=0; o<d; ++o)
-                       gs_matrix_set(m, i, o, i*o);
-
-       for (i=0; i<d; ++i)
-               for (o=0; o<d; ++o)
-                       assert(gs_matrix_get(m, i, o) == i*o);
-       gs_delete_matrix(m);
-}