Home > Archive > Fortran > February 2007 > Re: dgemm
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Jan Vorbrüggen 2007-02-13, 4:10 am |
| > Also I've never seem much point in defining a type kind parameter for
> default REAL. It just creates extra typing and gives back nothing in
> return - or am I missing something?
Well, if you know that never, NEVER will that type be modified to something
other than default real, yes. If you're not quite so sure, the kind parameter
allows you to change this in one central place instead of all over the code.
Jan
| |
| Richard Maine 2007-02-13, 7:08 pm |
| Jan Vorbrüggen <jvorbrueggen@not-mediasec.de> wrote:
>
> Well, if you know that never, NEVER will that type be modified to something
> other than default real, yes. If you're not quite so sure, the kind parameter
> allows you to change this in one central place instead of all over the code.
That would be fine if you used it consistently. However, the code in
question didn't. It mixed variables declared kind=stnd with real single
precision literals. And the mix was in ways that doe not permit implicit
conversion. In my view, such mixtures are the worst of all worlds. It is
not readily portable, but might mislead you into thinking that it is.
--
Richard Maine | Good judgement comes from experience;
email: last name at domain . net | experience comes from bad judgement.
domain: summertriangle | -- Mark Twain
| |
| Bart Vandewoestyne 2007-02-14, 4:12 am |
| On 2007-02-13, Richard Maine <nospam@see.signature> wrote:
>
> That would be fine if you used it consistently. However, the code in
> question didn't. It mixed variables declared kind=stnd with real single
> precision literals. And the mix was in ways that doe not permit implicit
> conversion. In my view, such mixtures are the worst of all worlds. It is
> not readily portable, but might mislead you into thinking that it is.
You are absolutely right, Richard... please forgive me that bad
coding-style... but i was just quickly experimenting... and
apparently a bit too quickly as it resulted in such 'dirty' code
;-)
Best wishes,
Bart
--
"Share what you know. Learn what you don't."
|
|
|
|
|