hrefspace

 找回密码
 立即注册
搜索
热搜: PHP PS 程序设计
查看: 1452|回复: 2

Large Integer Functions

[复制链接]

557

主题

557

帖子

1898

积分

版主

Rank: 7Rank: 7Rank: 7

积分
1898
发表于 2024-3-6 05:34:44 | 显示全部楼层 |阅读模式
Function

Description

Int32x32To64Multiplies two signed 32-bit integers, returning a signed 64-bit integer result.
Int64ShllMod32Performs a left logical shift operation on an unsigned 64-bit integer value. The function provides improved shifting code for left logical shifts where the shift count is in the range 0-31.
Int64ShraMod32Performs a right arithmetic shift operation on a signed 64-bit integer value. The function provides improved shifting code for right arithmetic shifts where the shift count is in the range 0-31.
Int64ShrlMod32Performs a right logical shift operation on an unsigned 64-bit integer value. The function provides improved shifting code for right logical shifts where the shift count is in the range 0-31.
MulDivMultiplies two 32-bit values and then divides the 64-bit result by a third 32-bit value.
Multiply128Multiplies two 64-bit integers to produce a 128-bit integer.
MultiplyExtract128Multiplies two 64-bit integers to produce a 128-bit integer, shifts the product to the right by the specified number of bits, and returns the low 64 bits of the result.
MultiplyHighMultiplies two 64-bit integers to produce a 128-bit integer and gets the high 64 bits.
PopulationCount64Counts the number of one bits (population count) in a 64-bit unsigned integer.
ShiftLeft128Shifts 128-bit left.
ShiftRight128Shifts 128-bit right.
UInt32x32To64Multiplies two unsigned 32-bit integers, returning an unsigned 64-bit integer result.
UnsignedMultiply128Multiplies two unsigned 64-bit integers to produce an unsigned 128-bit integer.
UnsignedMultiplyExtract128Multiplies two unsigned 64-bit integers to produce an unsigned 128-bit integer, shifts the product to the right by the specified number of bits, and returns the low 64 bits of the result.
UnsignedMulitplyHighMultiplies two 64-bit integers to produce a 128-bit integer and gets the high unsigned 64 bits.
回复

使用道具 举报

0

主题

216

帖子

2

积分

新手上路

Rank: 1

积分
2
发表于 2024-3-6 05:35:44 | 显示全部楼层
最近在抽空阅读VS2012的文档,
发现VC2012里面添加了许多吸引人的新语法,
可以大大提升代码的优雅性,以及执行效率。

出于对大整数的计算比较关心,
偶尔在UInt32x32To64上按F1,
点开页面发现MS又新添了不少宏,
不过,很显然它们基本都是因为方便对应CPU新的指令集而出现的。
上面的表格来自:http://msdn.microsoft.com/zh-cn/ ... loads/aa383711.aspx
而奇怪的是,搜遍VS2012的本地帮助Mircosoft HelpViewer 2.0(与MSDN有什么区别?)也不曾有上述内容。
回复

使用道具 举报

0

主题

192

帖子

2

积分

新手上路

Rank: 1

积分
2
发表于 2024-3-6 05:36:43 | 显示全部楼层
强!$128bit$都出来了!

看来这个问题只要用$1$条指令就可以解决了:

http://bbs.emath.ac.cn/thread-4468-1-1.html
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|Archiver|手机版|小黑屋|hrefspace

GMT+8, 2024-11-22 00:31 , Processed in 0.058335 second(s), 21 queries .

Powered by hrefspace X3.4 Licensed

Copyright © 2022, hrefspace.

快速回复 返回顶部 返回列表