128-bit

Fixed size integers with gmp…?

天涯浪子 提交于 2021-02-07 08:50:37
问题 I've been trying for days to install GMP library under MINGW. I have been using for weeks __uint128_t with gcc under a linux64 bit environment, then ported the same program under GMP and mingw (32 bit version). I used mpz_class integers instead of __uint128_t . Then I started my new program and...! With __uint128_t and 64 bit it takes 16 minutes to complete, with GMP and MINGW it takes 91 HOURS!!! What should I do to speed up things a bit? Is there any faster way to do 128 bit integer math

Fixed size integers with gmp…?

坚强是说给别人听的谎言 提交于 2021-02-07 08:49:23
问题 I've been trying for days to install GMP library under MINGW. I have been using for weeks __uint128_t with gcc under a linux64 bit environment, then ported the same program under GMP and mingw (32 bit version). I used mpz_class integers instead of __uint128_t . Then I started my new program and...! With __uint128_t and 64 bit it takes 16 minutes to complete, with GMP and MINGW it takes 91 HOURS!!! What should I do to speed up things a bit? Is there any faster way to do 128 bit integer math

How can I have a 128-bit integer in protothread in cooja simulator?

大憨熊 提交于 2020-08-26 10:01:27
问题 Is there any library already available in c or should I need to use an external library which will work for cooja simulator? I have tried the GMP library for Z mote. But that doesn't work for me. 来源: https://stackoverflow.com/questions/61010848/how-can-i-have-a-128-bit-integer-in-protothread-in-cooja-simulator

How can I have a 128-bit integer in protothread in cooja simulator?

帅比萌擦擦* 提交于 2020-08-26 10:00:07
问题 Is there any library already available in c or should I need to use an external library which will work for cooja simulator? I have tried the GMP library for Z mote. But that doesn't work for me. 来源: https://stackoverflow.com/questions/61010848/how-can-i-have-a-128-bit-integer-in-protothread-in-cooja-simulator

gcc 7.3 128-bit unsigned integer operation

穿精又带淫゛_ 提交于 2020-06-17 10:28:08
问题 I'm confused with the usage of 128-bit integer. Please look at the test code: uint128_t test_data = 0x00000000FFFFFFFF0101010101010101; uint64_t test_data_h = test_data >> 64; uint64_t test_data_l = test_data ; printf("test_data 0x %016llx %016llx\n", test_data_h, test_data_l); I expect the test_data_h to be 0x00000000FFFFFFFF, but the result is : test data 0x 0000000000000000 0101010101010101 Why is this? 回答1: Many compilers do not support 128 bit constants. Instead // uint128_t test_data =

gcc 7.3 128-bit unsigned integer operation

我的梦境 提交于 2020-06-17 10:27:06
问题 I'm confused with the usage of 128-bit integer. Please look at the test code: uint128_t test_data = 0x00000000FFFFFFFF0101010101010101; uint64_t test_data_h = test_data >> 64; uint64_t test_data_l = test_data ; printf("test_data 0x %016llx %016llx\n", test_data_h, test_data_l); I expect the test_data_h to be 0x00000000FFFFFFFF, but the result is : test data 0x 0000000000000000 0101010101010101 Why is this? 回答1: Many compilers do not support 128 bit constants. Instead // uint128_t test_data =

gcc 7.3 128-bit unsigned integer operation

二次信任 提交于 2020-06-17 10:26:26
问题 I'm confused with the usage of 128-bit integer. Please look at the test code: uint128_t test_data = 0x00000000FFFFFFFF0101010101010101; uint64_t test_data_h = test_data >> 64; uint64_t test_data_l = test_data ; printf("test_data 0x %016llx %016llx\n", test_data_h, test_data_l); I expect the test_data_h to be 0x00000000FFFFFFFF, but the result is : test data 0x 0000000000000000 0101010101010101 Why is this? 回答1: Many compilers do not support 128 bit constants. Instead // uint128_t test_data =