mpz_array_init
Kevin Ryde
user42@zip.com.au
Tue, 03 Jun 2003 08:24:48 +1000
"trabunix" <trabunix@terra.com.br> writes:
>
> mpz_t *arr;
> arr = (mpz_t *)malloc(sizeof(mpz_t)*Num);
> mpz_array_init(arr,Num,1024);
>
> warnig: passing arg 1 of ' __gmpz_array_init' from incompatible
> pointer type.
Hmm. I think it's meant to be the first element. Ie.
mpz_array_init (arr[0], Num, 1024);
or
mpz_array_init (*arr, Num, 1024);
Bit bizarre that. Might have looked better back in the gmp 1 days
with MINT. Probably should be made clearer in the docs.
For what it's worth mpz_array_init is a highly specialized function
and unless you need what it does then you'll be better off making your
own array and mpz_init'ing each element.