- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Message Edited by lpe@scandpowerpt.com on 02-24-2006 08:03 AM
Message Edited by lpe@scandpowerpt.com on 02-24-2006 08:05 AM
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update: it appears to produce problems (heap corruption during deallocation) when a dll-based RTL is used. I am not sure why it happens – I know it is not allowed to allocate on one module's heap and deallocate on the other's. However, I don't see how it happens, because I'd suppose that both real allocation and deallocation end up in RTL.dll. Be aware however.
Message Edited by JugoslavDujic on 03-02-2006 12:08 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Call a fill routine that treats the array of real(4) or real(8) as integer(4) or integer(8) and insert the bit pattern that represents the NaN. See:
http://stevehollasch.com/cgindex/coding/ieeefloat.html
For info on bit patterns.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks a lot for the very useful help guys! I will try what you recommend and tell you how it works. This could have been a part of the compiler also, for example with a compiler option that changes the behaviour of allocate to initiate everything to NaN.
Best Regards,
Lars Petter Endresen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The proposed function (attached)did not work so well with IVF 9.0 as it caused exception in too many deallocate statements without any noticeable errors in the arrays. I will try to figure out what happened.
Lars Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am sorry. Actually the proposed function works indeed very well. It is most useful. Thank you!
Lars Petter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
/Zi /Od /fpp /free /warn:all /warn:declarations /warn:unused /warn:ignore_loc/warn:truncated_source /warn:interfaces /real_size:64 /fpe:0 /fpconstant /traceback/check:bounds /RTCu /libs:static /threads /dbglibs /c
Message Edited by lpe@scandpowerpt.com on 03-01-2006 08:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try union of your real(4) or real(8) array with an integer(4) or integer(8) array then initialize the integerarray with the bit pattern of the NaN.
Jim Dempsey
- 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can step into ALLOCATE(pointer) in disassembly view and see if I'm right, and whether for_allocate calls something else and returns relatively soon.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Thanks again. The solution you have provided is most useful for us. As it is so useful indeed, I have posted a premier support issue on the topic, with reference to this thread, and I hope that it will be implemented in the Intel compiler as a new option, in the not toodistant future. The new compiler option will hopefully also cover pointers.
Lars Petter (now following IDF 2006 San Francisco - doubling SSE execution speed is indeed impressing - congratulations to Intel!)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page