简体   繁体   English

最大数字数据类型MPI

[英]Largest Number Datatype MPI

What is the largest C number datatype MPI supports? MPI支持的最大C数据类型是什么? Is there some way to use intmax_t ? 有没有办法使用intmax_t

I want to calculate the factorial, but I can't get over 170!. 我想计算阶乘,但我不能超过170!

The largest primitive integer data type would be an MPI_UINT64_T which would get you up to 2^64 - 1 最大的原始整数数据类型是MPI_UINT64_T ,它可以达到2 ^ 64 - 1

For larger integers you would have to use a library such as GMP which supports arbitary precision arithmatic. 对于较大的整数,您必须使用诸如GMP之类的库来支持仲裁精度算术。 You would then have to set up an MPI derived data type to use them with MPI though. 然后,您必须设置MPI派生数据类型,以便将它们与MPI一起使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM