Efficiently importing/export GMP floats

Christ Schlacta aarcane at gmail.com
Mon Jan 17 08:51:57 CET 2011


I've been asking for a binary import/export function for a long time, to 
no avail.  it doesn't exist yet, but if enough of us ask, maybe someday 
it will!

On 1/16/2011 19:00, Jack Poulson wrote:
> I have been scouring the manual and related archived conversations, but I
> can't seem to find a sufficient means of importing/exporting a large
> collection of mpf_t's as a binary format without a loss in precision (e.g.,
> converting to double-precision).
>
> The reason I ask is that I have written a templated parallel linear algebra
> library that I would like to stick GMP under the hood for in the cases where
> the user wanted higher than double-precision arithmetic. The main constraint
> is in importing/exporting large arrays of mpf_t's into a contiguous buffer
> so that I could use the Message Passing Interface (MPI) to communicate the
> data between a large number of nodes. I should also be able to handle
> distributed summations (e.g., MPI_Reduce with the MPI_SUM operation) by
> defining a MPI reduce operation and then calling mpf_add from within it.
>
> Does anyone have a suggestion as to how to efficiently pack/unpack a large
> number of mpf_t's *without losing precision*?
>
> Best Regards,
> Jack Poulson
> _______________________________________________
> gmp-discuss mailing list
> gmp-discuss at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-discuss



More information about the gmp-discuss mailing list