1 /*
2 Copyright (C) 2020 Daniel Schultz
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 "fmpz_mod_mpoly.h"
13
14
fmpz_mod_mpoly_fit_length_reset_bits(fmpz_mod_mpoly_t A,slong len,flint_bitcnt_t bits,const fmpz_mod_mpoly_ctx_t ctx)15 void fmpz_mod_mpoly_fit_length_reset_bits(
16 fmpz_mod_mpoly_t A,
17 slong len,
18 flint_bitcnt_t bits,
19 const fmpz_mod_mpoly_ctx_t ctx)
20 {
21 slong N = mpoly_words_per_exp(bits, ctx->minfo);
22 _fmpz_mod_mpoly_fit_length(&A->coeffs, &A->coeffs_alloc,
23 &A->exps, &A->exps_alloc, N, len);
24 A->bits = bits;
25 }
26