1 /* 2 Copyright (C) 2010 William Hart 3 Copyright (C) 2011 Fredrik Johansson 4 5 This file is part of FLINT. 6 7 FLINT is free software: you can redistribute it and/or modify it under 8 the terms of the GNU Lesser General Public License (LGPL) as published 9 by the Free Software Foundation; either version 2.1 of the License, or 10 (at your option) any later version. See <http://www.gnu.org/licenses/>. 11 */ 12 13 #include <stdio.h> 14 #include <stdlib.h> 15 #include <gmp.h> 16 #include "flint.h" 17 #include "fmpz.h" 18 #include "fmpz_poly.h" 19 #include "fmpz_poly_mat.h" 20 #include "ulong_extras.h" 21 22 int main(void)23main(void) 24 { 25 int i; 26 FLINT_TEST_INIT(state); 27 28 29 flint_printf("init/clear...."); 30 fflush(stdout); 31 32 for (i = 0; i < 1000 * flint_test_multiplier(); i++) 33 { 34 fmpz_poly_mat_t a; 35 slong j, k; 36 slong rows = n_randint(state, 100); 37 slong cols = n_randint(state, 100); 38 39 fmpz_poly_mat_init(a, rows, cols); 40 41 for (j = 0; j < rows; j++) 42 for (k = 0; k < cols; k++) 43 fmpz_poly_zero(fmpz_poly_mat_entry(a, j, k)); 44 45 fmpz_poly_mat_clear(a); 46 } 47 48 49 50 FLINT_TEST_CLEANUP(state); 51 flint_printf("PASS\n"); 52 return 0; 53 } 54