- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
Link kopiert
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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);
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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?
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
- Als neu kennzeichnen
- Lesezeichen
- Abonnieren
- Stummschalten
- RSS-Feed abonnieren
- Kennzeichnen
- Anstößigen Inhalt melden
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
- RSS-Feed abonnieren
- Thema als neu kennzeichnen
- Thema als gelesen kennzeichnen
- Diesen Thema für aktuellen Benutzer floaten
- Lesezeichen
- Abonnieren
- Drucker-Anzeigeseite