- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Two questions,
(1) Can I invoke functions in MKL in real*16 data type? How to do that?
(2) If I want to write my own "dble" function using fortran, is it possible to do? The difficulty seems to me is that the sent over actual parameter can be arbitrary byte length, say, int, real, complex, etc, but I have to preset the formal parameter to be a specific type ...
Thanks a lot!
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1) MKL doesn't support real*16. If you search the MKL forum, you will find responses to this question. You could build such subroutines yourself, from public source, and get as much performance as could be achieved if MKL supported them.
2) You could replace the standard dble() intrinsic with a generic function of your own, but it might be better to use your own name for it. You would supply a function for each case of data types, with an INTERFACE block to define the generic name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
By the way, if anyone else has to maintain code where you did that, I hope you apply for the "witness protection program" as they will not be happy with you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The question about writing one's own dble function is related with the scope what fortran can do. If you think it a bit carefully, you will see that you cannot write your own dble within Fortran 77, simply because of the reason I mentioned before. I don't know whether it could be written using the current Fortran standard.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I read that you wanted was to change the meaning of DBLE so that it returns a type that is not "double precision". You CAN do that in Fortran 90, but I would strongly urge you not to do so for the sake of program clarity and maintainability.
![](/skins/images/895D6060305DF45A57FACF854B5A8CD1/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page