- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I read the white paper "New Instructions Support Large Integer Arithmetic". I read that the umul128 intrinsic compiler will provide the instruction mulx to perform the full product of two integers.
But I can't find any reference in the compiler C++ (2015.1.108) documentation.
Is the intrinsic available for mulx using the intel c++ compiler ?
Or how I can replace it with an asm instruction ? An example is welcome for the multiplication of two 64-bits integers.
Mickaël
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check this intrinsics web app: https://software.intel.com/sites/landingpage/IntrinsicsGuide/
You can search for Multiply, and filter out by SSE2 and one by one to find the right one for you.
Jennifer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The intrinsic which generates mulx instruction for 64 bit Integer multiplication is _mulx_u64(). Below is an example for the same:
#include <stdio.h> int main() { unsigned __int64 a = 0x0fffffffffffffff; unsigned __int64 b = 0xf0000000; unsigned __int64 c, d; d = _mulx_u64(a, b, &c); printf_s("%#I64x * %#I64x = %#I64x%I64x\n", a, b, c, d); }
This intrinsic is also supported on Microsoft Visual Studio Compiler. We are working on updating the white paper (New Instructions Support Large Integer Arithmetic) with the right intrinsic. Thanks for bringing this to our attention.
Regards
Anoop
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
BTW, just a note that the compiler manual is the official reference for intrinsics but the intrinsics web app page link provided above is a secondary resource mainly targeted at searching/filtering intrinsics. It is kept in sync with the compiler and should include all intrinsics included in the Intel Compiler headers, and any new ones that are added immediately upon release. Therefore, pointing out any missing intrinsic released for public consumption is much appreciated.
_Kittur


- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page