- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, I can't find the ldexp svml calling convention in the intel intrinsics guide. The vector versions of the function were easy to determine, but I can't get the scalar versions (ie __svml_ldexpf1 and __svml_ldexp) to work. Maybe easiest would be to start posting the associated header file? I'm looking at 2022.1.0, but as new functions are added it would be helpful to see the header for future versions.
Thanks!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for posting in Intel Communities.
>>" I can't find the ldexp svml calling convention in the intel intrinsics guide."
All intrinsics will start with the __mm. Short Vector Math Library(SVML) are present in the math library in this path "/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/include". You can use (_svml_ldexpf1 and __svml_ldexp) functions directly and present in the libsvml.a file as shown in below screenshot.
For more information refer to the below link:
Thanks & Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the information.
Maybe I'm missing a toolkit, I just have the base compiler installed which provides libsvml.a, but I can't find anything relevant in the include folder. The calling convention of the scalar form of that function is what I'm interested in - specifically the integer argument. Can you provide the function definition, or list the .h or toolkit I need?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
>>"but I can't find anything relevant in the include folder."
SVML functions definitions are included in "Math.h" which can be found in "/opt/intel/oneapi/compiler/2022.1.0/linux/compiler/include" folder which is apart of Intel oneAPI HPC Toolkit. you can use the _svml_ldexpf1 and __svml_ldexp functions.
Thanks & Regards,
Hemanth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, math.h includes some forms of ldexp, but could you just tell me the call signature for __svml_ldexpf1 and / or __svml_ldexp?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are working on your issue internally and will get back to you soon.
Thanks & Regards,
Hemanth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The calling conventions are the same with standard math functions.
But, I don't think you need to call __slvm_ldexp explicitly.
If you have code:
double a, b;
int c;
a = 10.5
b= 5;
c = ldexp(a,b);
[ do something with c]
And compile:
$ icx -fimf-use-svml=true:ldexp t.c -O2
$
Then the compiler would replace ldexp() with the optimized __svml_ldexp() one.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, but I'd like to have the option to call the svml version directly at times.
I have had no issues calling any of the packed or scalar versions of the svml routines, except for this one.
For example, if I compare svml & math from C:
double __svml_cos1(double a);
double __svml_ldexp1(double a, int b);
int main() {
double a, c1, c2;
int b = 2;
a = 10.5;
c1 = __svml_ldexp1(a,b);
c2 = ldexp(a,b);
//c1 = __svml_cos1(a*b);
//c2 = cos(a*b);
printf("c1: %f, c2: %f\n",c1, c2);
return(0);
}
The cos variant works perfectly, but the ldexp version returns "c1: inf, c2: 42.000000".
Hopefully that's enough detail to describe the problem I'm encountering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let us know if you have any other questions. If not, we would like to close this thread.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I worked with our math library and was advised that "it is absolutely not encouraged to call SVML functions directly. SVML is internal Intel Compiler library and only Compiler is allowed to call SVML. SVML is not a separate product, it is a part of Intel Compiler. SVML has custom API/ABI which is not exposed to public." Hence, please don't use it directly.
Thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Andy,
We won't monitor this thread any more. If you have any other questions/concerns, please create a new thread.
Thanks,
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page