问题描述
在哪个文件中可以找到unsigned long long Division(ulonglong除以ulong)的实现?(微软 VC++ 2010)
Which file can I find the implementation of unsigned long long division (ulonglong divided by ulong) in? (MS VC++ 2010)
推荐答案
假设您使用的是默认安装目录,它应该在附近:
Assuming you used the default installation directory, it should be somewhere around:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\crt\src\intel\ulldiv.asm
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\crt\src\intel\ulldiv.asm
如果您使用的是 32 位版本的 Windows,那(可能)是 C:\program files
而不是 c:\program files (x86)
代码>.尽管有注释,这段代码实际上是用于无符号长整除法,而不仅仅是无符号长整除法(即,它需要 64 位操作数,而不是 32 位).
If you're using a 32-bit edition of Windows, that'll (probably) be C:\program files
instead of c:\program files (x86)
. Despite the comments, this code is really for an unsigned long long divide, not just unsigned long divide (i.e., it takes 64-bit operands, not 32-bit).
我必须检查以确保,但我相信编译器可以/将在启用内在函数时为除法生成内联代码.当然,64 位编译器无论如何都会生成内联代码.
I'd have to check to be sure, but I believe the compiler can/will generate inline code for the division when intrinsics are enabled. Of course, a 64-bit compiler will generate inline code in any case.
这篇关于unsigned long long 除法的实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!