C++ 128/256-bit fixed size integer types

前端 未结 4 540
误落风尘
误落风尘 2020-12-03 14:27

I was wondering if any fellow SO\'s could recommend a good light-weight fixed size integer type (128-bit or even 256-bit, possibly even template parametrized) library.

4条回答
  •  萌比男神i
    2020-12-03 14:58

    Some native 128-bit types are available on certain platforms, you tend to be limited by the architecture. For example __m128 is available for SSE2?

    http://msdn.microsoft.com/en-us/library/ayeb3ayc.aspx

    Also listed as __int128 in this ABI:

    http://www.x86-64.org/documentation/abi-0.99.pdf

    However the preferred naming of uint128_t and uint256_t can be found in SHOGUN, a "large scale machine learning toolbox with focus on especially Support Vector Machines (SVM)"

    http://www.shogun-toolbox.org/doc/index.html

提交回复
热议问题