On 14/01/2013 22:25, MJ Michaels wrote:

[snip]
>> So its certainly not a good idea unless you limit yourself to the generic C 
>> build.  And here, of course, you are on your own since it is not a tested 
>> configuration.
> 
> Thanks for the answer Brian.  My problem is that I have code on all other 
> platforms that passes an int64 to mpz_set_ui(), but on Windows this doesn't 
> work.   I could fix this by turning the int64 into two int32's and calling 
> mpz_set_ui() appropriately with those values.  Or I can use the generic C 
> build with 64-bit limbs.  Do you have thoughts about which is the better 
> approach? 
> Thanks.

I forgot to mention that the problem with mpz_set_ui() on win32 has
nothing to do with the internal limb size used by MPIR.  The MPIR 'ui'
interface on win32 uses unsigned ints and these are 32-bits on Windows.

To change this you don't need to change the limb size - what you need to
change the single typedef for mpir_ui so that it becomes an 'unsigned
long long' on Windows (maybe also change mpir_si to 'signed long long'
as well). This will leave the limb size unchanged so you can use the x86
assembler code.

The other option you have is to use the mpz_set_ux() instead of
mpz_set_ui() since uintmax_t is 64-bits on Windows even on win32.  And
this is available 'out of the box'.

   Brian

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to