- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks a lot for the information Tim!!
It seems that I have to write a C++ program to take full advantage of the vectorized cbrt functions in th svml library. Do you think that the Intel Fortran Compiler some time in the futeure will "become aware of" these truly useful functions? Writing cbrt in fortran does not work without a proper interface and I have only managed to write an interface to the cbrt in the libmmt library so far.
c:...compiler80/IA32/LIB>nm SVML_DISP.LIB | grep cbrt
./obj/nt/std/d/vml_dinvcbrt2.obj:
./obj/nt/std/d/vml_dcbrt2.obj:
./obj/nt/std/s/w7/vml_sinvcbrt4.obj:
./obj/nt/std/s/w7/vml_scbrt4.obj:
./obj/nt/std/s/a6/vml_sinvcbrt4.obj:
./obj/nt/std/s/a6/vml_scbrt4.obj:
./obj/nt/std/s/disp/vml_sinvcbrt4.obj:
./obj/nt/std/s/disp/vml_scbrt4.obj:
Best wishes,
Lars Petter Endresen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Lars:
I suppose, as I hinted above, that filing your request as an issue on premier.intel.com could make auto-vectorization of cbrt() more likely to happen. I don't know whether a future compiler may include a (possibly non-portable) way to call svml functions directly from Fortran. The compilers are tending to increase the number of svml functions employed by auto-vectorization.
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
I will send a request to premier support regarding cbrt from Fortran.
However, as I tried to use the cbrt in the svml library from C++, I also found that the vectorized cbrt (_vmldCbrt2)could not be enabled by the C++ compiler. The following code generated a call to _cbrt and not to (_vmldCbrt2:
double e[16],f[16];
int i;
for(i=0;i<=15;i++)
e = cbrt(f);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A nice workaround is to compile with the /S option to generate an assembly file that can be modified manually. For example, one can write sinh() instead of cbrt() in a loop (sinh() is recognized by the auto-vectorization scheme, cbrt() is not), and then manually replace the occurence of _vmldSinh2 in the .asm file with _vmldCbrt2. Then it is possible to compile the .asm file using the ml command in a standard way. I have checked that this is working OK and produces the correct numerical results. Impressed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello.
This feature is particularly useful for software engineers that are both conserned with software efficiency and reliability as the equations written in the fortran source code then strongly will resemble the equations written in a report or a scientific paper. In Fortran:
x = a**(1./3.)
will produce the most efficient run time code. Look at the C++ equivalent x=cbrt(a), it does not exacty look like the equations published in a paper, and the potential for typing errors increases dramatically. With features like this the Intel Fortran (Linux and Win32) will be the preferred programming language for the implementation of computational expensive mathematical models.
Lars Petter Endresen

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