1 /*
2     Copyright (C) 2011 Sebastian Pancratz
3 
4     This file is part of FLINT.
5 
6     FLINT is free software: you can redistribute it and/or modify it under
7     the terms of the GNU Lesser General Public License (LGPL) as published
8     by the Free Software Foundation; either version 2.1 of the License, or
9     (at your option) any later version.  See <https://www.gnu.org/licenses/>.
10 */
11 
12 #include <gmp.h>
13 #include "flint.h"
14 #include "fmpz.h"
15 #include "fmpz_mod_poly.h"
16 
fmpz_mod_poly_set_nmod_poly(fmpz_mod_poly_t f,const nmod_poly_t g)17 void fmpz_mod_poly_set_nmod_poly(fmpz_mod_poly_t f, const nmod_poly_t g)
18 {
19     slong i;
20 
21     _fmpz_mod_poly_fit_length(f, g->length);
22     _fmpz_mod_poly_set_length(f, g->length);
23 
24     for (i = 0; i < g->length; i++)
25        fmpz_set_ui(f->coeffs + i, g->coeffs[i]);
26 }
27 
28