• <tfoot id='s2z1l'></tfoot>
  • <small id='s2z1l'></small><noframes id='s2z1l'>

      • <bdo id='s2z1l'></bdo><ul id='s2z1l'></ul>

    1. <i id='s2z1l'><tr id='s2z1l'><dt id='s2z1l'><q id='s2z1l'><span id='s2z1l'><b id='s2z1l'><form id='s2z1l'><ins id='s2z1l'></ins><ul id='s2z1l'></ul><sub id='s2z1l'></sub></form><legend id='s2z1l'></legend><bdo id='s2z1l'><pre id='s2z1l'><center id='s2z1l'></center></pre></bdo></b><th id='s2z1l'></th></span></q></dt></tr></i><div id='s2z1l'><tfoot id='s2z1l'></tfoot><dl id='s2z1l'><fieldset id='s2z1l'></fieldset></dl></div>
      <legend id='s2z1l'><style id='s2z1l'><dir id='s2z1l'><q id='s2z1l'></q></dir></style></legend>

      1. C++ 128/256 位固定大小整数类型

        C++ 128/256-bit fixed size integer types(C++ 128/256 位固定大小整数类型)
      2. <small id='x2gWm'></small><noframes id='x2gWm'>

          • <bdo id='x2gWm'></bdo><ul id='x2gWm'></ul>

            <tfoot id='x2gWm'></tfoot>

              <legend id='x2gWm'><style id='x2gWm'><dir id='x2gWm'><q id='x2gWm'></q></dir></style></legend>

                  <tbody id='x2gWm'></tbody>
                • <i id='x2gWm'><tr id='x2gWm'><dt id='x2gWm'><q id='x2gWm'><span id='x2gWm'><b id='x2gWm'><form id='x2gWm'><ins id='x2gWm'></ins><ul id='x2gWm'></ul><sub id='x2gWm'></sub></form><legend id='x2gWm'></legend><bdo id='x2gWm'><pre id='x2gWm'><center id='x2gWm'></center></pre></bdo></b><th id='x2gWm'></th></span></q></dt></tr></i><div id='x2gWm'><tfoot id='x2gWm'></tfoot><dl id='x2gWm'><fieldset id='x2gWm'></fieldset></dl></div>
                  本文介绍了C++ 128/256 位固定大小整数类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我想知道是否有其他 SO 可以推荐一个好的轻量级固定大小整数类型(128 位甚至 256 位,甚至可能是模板参数化)库.

                  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.

                  我已经看过 GMP 和 co,他们非常关心,但对于我的目的来说有点太大了,此时我对简单的仅标头解决方案感兴趣.性能很重要,目标架构将是 x86 和 x86-64,也是合理的许可(也就是没有 GPL 或 LGPL).

                  I've had a look at GMP and co, they care great, yet are a bit too large for my purposes, I'm interested in simple header only solutions at this point. Performance is important and the target architecture will be x86 and x86-64, also a reasonable license (aka nothing GPL or LGPL).

                  推荐答案

                  Boost 库将数据类型作为 multiprecision 库,适用于 128 到 1024 位的类型.

                  The Boost library has data types as part of multiprecision library, for types ranging from 128 to 1024 bits.

                  #include <boost/multiprecision/cpp_int.hpp>
                  
                  using namespace boost::multiprecision;
                  
                  int128_t mySignedInt128 = -1;
                  uint128_t myUnsignedInt128 = 2;
                  int256_t mySignedInt256 = -3;
                  uint256_t myUnsignedInt256 = 4;
                  int512_t mySignedInt512 = -5;
                  uint512_t myUnsignedInt512 = 6;
                  int1024_t mySignedInt1024 = -7;
                  uint1024_t myUnsignedInt1024 = 8;
                  

                  这篇关于C++ 128/256 位固定大小整数类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  What is inside .lib file of Static library, Statically linked dynamic library and dynamically linked dynamic library?(静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么?)
                  How do I load a C DLL from the SXS in Python?(如何从 Python 中的 SXS 加载 C DLL?)
                  Can Cython code be compiled to a dll so C++ application can call it?(Cython 代码可以编译成 dll 以便 C++ 应用程序可以调用它吗?)
                  Delay Loading DLLs(延迟加载 DLL)
                  Throwing C++ exceptions across DLL boundaries(跨 DLL 边界抛出 C++ 异常)
                  Loading a dll from a dll?(从 dll 加载 dll?)

                  • <legend id='fbr0F'><style id='fbr0F'><dir id='fbr0F'><q id='fbr0F'></q></dir></style></legend>

                      <i id='fbr0F'><tr id='fbr0F'><dt id='fbr0F'><q id='fbr0F'><span id='fbr0F'><b id='fbr0F'><form id='fbr0F'><ins id='fbr0F'></ins><ul id='fbr0F'></ul><sub id='fbr0F'></sub></form><legend id='fbr0F'></legend><bdo id='fbr0F'><pre id='fbr0F'><center id='fbr0F'></center></pre></bdo></b><th id='fbr0F'></th></span></q></dt></tr></i><div id='fbr0F'><tfoot id='fbr0F'></tfoot><dl id='fbr0F'><fieldset id='fbr0F'></fieldset></dl></div>

                      <tfoot id='fbr0F'></tfoot>

                        <small id='fbr0F'></small><noframes id='fbr0F'>

                            <bdo id='fbr0F'></bdo><ul id='fbr0F'></ul>
                              <tbody id='fbr0F'></tbody>