GNU GMP and MPI
June Co.
juneco at quartz.ocn.ne.jp
Fri Mar 21 15:21:53 CET 2008
Hi, Vincent.
On 2008/03/21, at 22:02, Vincent Lefevre wrote:
> On 2008-03-21 20:58:58 +0900, June Co. wrote:
>> I wish that such "packing" functions are officially supported in GMP
>> and MPFR.
>
> What should the specification be? What about endianness?
My implementation has been tested only on x86_32 or x86_64 arch.
Other arch cannot be tested because I've never used. Endianness is
unconsidered, so it cannot support hetero MPI clusters with big and
little endians.
>> 2. use memcpy to pack like "pack_mpf" function in my BNCpack ->
>> http://na-inet.jp/na/bnc/bnc-0.6b.tar.gz .
>
> I don't understand pack_mpz, for instance. If buf is provided by the
> caller (i.e. is non-zero), how can he guess the buffer size? If not,
> the buffer is allocated by the function, but how does the caller know
> its address after the call (since pack_mpz doesn't return any value)?
My implementation is supposed to be used only in SPMD style. In
addition, allocbuf_mp* and pack_mp* functions cannot be separated.
More information about the gmp-discuss
mailing list