Pergunta

What is the best way (fast and relatively simple to implement) to send gmp of type mpf_t using MPI (in c)? a simple code will be helpful.

thank you

Foi útil?

Solução

mpf_t uses several pointers, so you should serialize mpf_t (and other GMP types) before sending via MPI.

There were some letters about MPI in GMP mailing list: https://gmplib.org/list-archives/gmp-discuss/2008-March/003091.html

There is article about MPI wrapper library for GMP (MPIGMP + MPIBNCpack): http://na-inet.jp/na/bnc/brief_intro_mpibncpack.pdf

Also there were solution of mpf_t serialization into file, you can reuse it to serialize into byte array and send it over MPI: How to serialize the GMP mpf type? (explained in https://gmplib.org/list-archives/gmp-discuss/2007-November/002981.html)

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top