Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- Software
- Software Development SDKs and Libraries
- Intel® oneAPI Math Kernel Library
- use mkl95_precision, only: wp => dp

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

marcioy

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-12-2011
08:01 PM

116 Views

use mkl95_precision, only: wp => dp

I am migrating from IMSL to MKL. I am trying to implement matrix-matrix and matrix-vector calculations using the BLAS.

I have a doubt about what the following statements mean:

(...)

use mkl95_precision, only: wp => dp

implicit none real(wp):: alpha, beta; !just an example of variables;

(...)

It seems that alpha and beta are double precision variables. There is any difference between the above statement and the following declaration? Which one should I use?

(...)

double precision alpha, beta;

(...)

Thank you in advance

Marcio Yamamoto

1 Solution

Chao_Y_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-13-2011
12:05 AM

116 Views

Hi Marcio,

You are right. They are double precision. Both of those two be compiled. If you write alpha, beta as:

real(wp):: alpha, beta;

It make it some easierto changeto single precision code, and only need to change:

wp => DP to wp = SP

Thanks,

Chao

Link Copied

2 Replies

Chao_Y_Intel

Employee

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-13-2011
12:05 AM

117 Views

Hi Marcio,

You are right. They are double precision. Both of those two be compiled. If you write alpha, beta as:

real(wp):: alpha, beta;

It make it some easierto changeto single precision code, and only need to change:

wp => DP to wp = SP

Thanks,

Chao

marcioy

Beginner

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

05-13-2011
12:26 AM

116 Views

The guys in Intel work up to midnight??!! You guys are my heroes! ;)

I was wondering if the statement "real(wp):: alpha, beta;" creates any special data structures/object which was necessary for the MKL/BLAS calculation. But it is not the case, right? Both statements generate exactly the same data structure: double precision array?

You should get some sleep, Chao.

Thank you again.

Marcio

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

For more complete information about compiler optimizations, see our Optimization Notice.