summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r12736] Description:Quincey Koziol2006-10-091-11/+23
| | | | | | | | | | | | | | | | | | | Add "use the latest format" support for dataspace object header encode/ decode routines and clean up format a bit for the latest format (new to 1.8.x releases) Remove storing 'perm' parameter for array datatypes in memory and the file, and add test to make certain that if any user applications are attempting to store them, we get some reports back. (Should be unlikely, since the RefMan says that the parameter is not implemented and is unsupported). Carry those changes into the tests, etc. Clean up a bunch more compiler warnings. Tested on: FreeBSD/32 4.11 (sleipnir) w/threadsafe Linux/32 2.4 (heping) w/FORTRAN & C++ Linux/64 2.4 (mir) w/enable-1.6-compat
* [svn-r12712] Description:Quincey Koziol2006-10-031-24/+82
| | | | | | | | | | Finish 'use the latest version of the format' changes to the datatype object header message. Compound and enumerated types will now be encoded more efficiently by packing the field names & member offsets better. Tested on: Linux 2.6/32 (chicago) Linux 2.6/64 (chicago2)
* [svn-r12708] Description:Quincey Koziol2006-10-031-3/+136
| | | | | | | | | | | | | | | | | | | Add the "use the latest version of the format" support to datatype messages. And a regression test to check that it's working. Also, found that we have been over-allocating space for compound datatype messages (when they have array datatypes or can use the latest version of the format) and trimmed the size back. Clean up datatype & dataspace encode/decode routines by having them allocate & release "fake" file structures, which gets them out of needing to "know" about the internals of file structures. Other minor whitespace/formatting cleanups, etc. Tested on: Linux/32 2.6 (chicago) Linux/64 2.6 (chicago2)
* [svn-r12440] Purpose:Quincey Koziol2006-06-271-11/+11
| | | | | | | | | | | Code cleanup Description: Trim trailing whitespace in Makefile.am and C/C++ source files to make diffing changes easier. Platforms tested: None necessary, whitespace only change
* [svn-r12341] Elena Pourmal2006-05-081-0/+1
| | | | | | | | | | | | | | | | | Purpose: Maintenance Description: dtypes.c compilation failed with gcc 4.1 due to the missing prototype of the opaque_funcs function. Failure was reported by a user who tried to build hdf5-1.8.0-alpha2. I reproduced the failure on sleipnir with gcc41 compiler. Solution: Added prototype definition. Platforms tested: sleipnir with gcc41, heping and copper Misc. update:
* [svn-r12322] Purpose: Test some functionsRaymond Lu2006-05-021-4/+498
| | | | | | | | Description: Test some data type functions that are and aren't supposed to work with some data types. Platforms tested: h5committest and fuss.
* [svn-r11771] Purpose:Quincey Koziol2005-12-081-1/+1
| | | | | | | | | | | | Code cleanup Description: Fix a bunch of warnings flagged by Windows compilers. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r11712] Purpose:Quincey Koziol2005-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New feature Description: Check in baseline for compact group revisions, which radically revises the source code for managing groups and object headers. WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! This initiates the "unstable" phase of the 1.7.x branch, leading up to the 1.8.0 release. Please test this code, but do _NOT_ keep files created with it - the format will change again before the release and you will not be able to read your old files!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! WARNING!!!! Solution: There's too many changes to really describe them all, but some of them include: - Stop abusing the H5G_entry_t structure and split it into two separate structures for non-symbol table node use within the library: H5O_loc_t for object locations in a file and H5G_name_t to store the path to an opened object. H5G_entry_t is now only used for storing symbol table entries on disk. - Retire H5G_namei() in favor of a more general mechanism for traversing group paths and issuing callbacks on objects located. This gets us out of the business of hacking H5G_namei() for new features, generally. - Revised H5O* routines to take a H5O_loc_t instead of H5G_entry_t - Lots more... Platforms tested: h5committested and maybe another dozen configurations.... :-)
* [svn-r11345] Purpose:Quincey Koziol2005-09-031-0/+175
| | | | | | | | | | | | | | | | Bug fix & code cleanup Description: Address most of datatype conversion exception handling bug that Ed Hartnett reported. (He's reported a different problem now, but we're closer at least). Also, condense exception handling #ifdef's into one location instead of spread out in so many places. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r11245] Purpose:Quincey Koziol2005-08-131-102/+102
| | | | | | | | | | | | | | | | | | | | Code cleanup Description: Trim trailing whitespace, which is making 'diff'ing the two branches difficult. Solution: Ran this script in each directory: foreach f (*.[ch] *.cpp) sed 's/[[:blank:]]*$//' $f > sed.out && mv sed.out $f end Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r11145] Purpose:Quincey Koziol2005-07-231-58/+78
| | | | | | | | | | | | | | | | Bug fix Description: If a named datatype is copied and the copy is used to create a dataset, the dataset would inadvertantly refer to the original named datatype instead of a local (possibly modified) copy of the named datatype. Solution: Fixed datatype copying routine. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5committest
* [svn-r11144] Purpose:Quincey Koziol2005-07-231-0/+2
| | | | | | | | | | | New port Description: Elena asked me to check in her NEC SX-6 work, so here it is! :-) Platforms tested: FreeBSD 4.11 (sleipnir) NEC SX-6 (by Elena)
* [svn-r10920] Purpose:Quincey Koziol2005-06-141-0/+56
| | | | | | | | | | | | | Bug fix Description: Add check for opaque tags that are too long for file format to handle currently. Platforms tested: FreeBSD 4.11 (sleipnir) Too minor to require h5commmitest
* [svn-r10550] Purpose: Splitting dtypes.cRaymond Lu2005-04-051-4642/+25
| | | | | | | | | | Description: Yesterday, dtypes.c was split into two programs, dtypes.c and dt_atomic.c. After dt_atomic.c was added, dtypes.c remained the same as before waiting for the daily test to pass. While dt_atomic.c turned out fine today, the test in dt_atomic.c was taken out from dtypes.c. There's also some minor change in dt_atomic.c. Platforms tested: h5committest
* [svn-r10531] Purpose: Bug fixRaymond Lu2005-04-011-27/+34
| | | | | | | | Description: In the last checkin, the fix wasn't quite correct. This round simply corrects the mistake from last round, especially the endianess was left out. Platforms tested: shanti, modi4, fuss - these machines cover both little and big endians.
* [svn-r10512] Purpose: Bug fixRaymond Lu2005-03-301-4/+28
| | | | | | | | | | | Description: In test_conv_int_float(), when testing special floating-point value NaN, the test program couldn't detect it for Linux Intel compiler when it's optimized. The reason is in my_isnan(), a printf command used "%LLg" to print "long double". Solution: Changed it to "%Lg". Also differentiate cases for NaN, using exception handler if present, decide if software conversion set converted integer to 0, or simply skip for hardware conversion. Platforms tested: heping - simple change.
* [svn-r10457] *** empty log message ***Raymond Lu2005-03-261-137/+202
|
* [svn-r10445] Purpose: Bug fixRaymond Lu2005-03-251-3/+17
| | | | | | | | | | | Description: In test_conv_flt_1() in dtypes.c, the case of Intel-Linux or AMD-Linux "long double" wasn't considered. The precision is smaller than the size. There may be some garbage left in the unused bytes during hardware conversion. Solution: Clear those bytes before comparison. Platforms tested: h5committest and mir, modi4.
* [svn-r10402] Purpose: New way to do conversion test between floating-point ↵Raymond Lu2005-03-241-49/+193
| | | | | | | | | | | | | types. Description: The 5th step of changing conversion test. This checkin is only for conversion of special values between floating-point types. Solution: This test is seperated from regular value conversion. It reuse the same function test_conv_flt_1() in test/dtypes.c. The source buffer of floating-point type is filled up with 8 special values, +/-0, +/-infinity, +/-QNaN, +/-SNaN. Platforms tested: h5committest, fuss, and modi4.
* [svn-r10228] Purpose: New way to do conversion test between floating-point ↵Raymond Lu2005-03-161-43/+24
| | | | | | | | | | | | numbers. Description: The 4th step of change conversion test. This checkin is only for conversion between floating-point numbers. Solution: The source buffer of floating-point number is filled up in the same way described in the 3rd step(revision 1.155). Platforms tested: h5committest and fuss.
* [svn-r10218] Purpose: Bug fixRaymond Lu2005-03-151-48/+143
| | | | | | | | | | | | | | | | | | Description: This commit is actually revision 1.155, which is the 3rd step of changing conversion test. It's for conversion from floating-point to integer. In this step, the source buffer is filled in with normalized and denormalized floating-point values. For the normalized values, it starts from FLT(DBL, or LDBL)_MIN, multiplied by 10(10000 for double, 100000000 for long double) for the next value, until reaches to FLT_MAX. For denormalized values, the exponent part is always 0. Mantissa part starts with 000...001, 000...011, 000...111, until reaches to 111...111. The same is with negative values. There're also fixes in config/hpux11.00 for kelgia where default macro table size wasn't big enough to handle the big macro in dtypes.c. Platforms tested: h5committest and kelgia.
* [svn-r10194] Purpose: Roll back change made last timeRaymond Lu2005-03-111-143/+50
| | | | | | | | Description: Reverse the 3rd step of change just checked in yesterday(revision 1.155) because of some errors in daily test. Use the revision 1.154 for now until the problem is fixed. Platforms tested: fuss - simple rolled back to previous revision.
* [svn-r10180] Purpose: New way to do conversion test from floating-point to ↵Raymond Lu2005-03-101-50/+143
| | | | | | | | | | | | | | | | integer. Description: This is the 3rd step of change conversion test. This checkin is only for conversion from floating-point to integer. Solution: The source buffer is filled in with normalized and denormalized floating-point values. For the normalized values, it starts from FLT(DBL, or LDBL)_MIN, multiplied by 10(10000 for double, 100000000 for long double) for the next value, until reaches to FLT_MAX. For denormalized values, the exponent part is always 0. Mantissa part starts with 000...001, 000...011, 000...111, until reaches to 111...111. The same is with negative values. Platforms tested: h5committest and fuss.
* [svn-r10163] Purpose: New way to do conversion test from integers to ↵Raymond Lu2005-03-081-36/+64
| | | | | | | | | | | | | floating numbers. Description: This is the 2nd step of changing conversion test. This checkin is only for conversion from integer to floating number. The source buffer of integer is filled up in the same way described in the last checkin(revision 1.153). Platforms tested: fuss, sol, and heping - copper was down. Couldn't do h5committest.
* [svn-r10150] Purpose: A new way to do conversion testRaymond Lu2005-03-041-14/+81
| | | | | | | | | | | | | | | | | Description: This is the first step of changing conversion test. This checkin is only for conversion between integers. Instead of filling source buffer with randomly generated bit pattern, this new way uses more sensible bit patterns. It's easier to see using "char" as source for example. The bit patterns will be 00000001, 00000010, 00000100, 00001000, 00010000, 00100000, 01000000, 10000000 00000000, 00000011, 00000111, 00001111, 00011111, 00111111, 01111111, 11111111 11111111, 11111110, 11111100, 11111000, 11110000, 11100000, 11000000, 10000000 The main point of this way is to avoid casting and comparison between source and destination types by compiler. The bit patterns will cover positive maximum and minimum, negative maximum and minimum if the source is signed integer. Platforms tested: h5committest and fuss.
* [svn-r10087] Purpose: New feature and testRaymond Lu2005-02-251-1/+7
| | | | | | | | | | | Description: Somehow, the hardware conversions between "long double" and other native floating-point types were left out. Solution: Added the hardware conversion functions in H5Tconv.c and test cases in dtypes.c. Platforms tested: h5committest and fuss. Misc. update: updated MANIFEST to replace bin/reconfigure.sh with bin/reconfigure
* [svn-r10081] Purpose: Some Kind of VerificationRaymond Lu2005-02-241-4/+4
| | | | | | | | | | | | | | | | | | Description: The library didn't handle incorrect hardware conversion for datatype. It simply did convert to incorrect data if any hardware didn't handle correctly. Solution: During configuration, incorrect hardware conversion is detected and some macros are defined. Use these macros to decide whether to register hardware conversion in H5T.c. If no hardware conversion function is registered for certain pair of datatypes, software conversion function will be used as the conversion path. Although slower than hardware conversion, we're more confident software conversion is accurate. So in one sentence to describe library's behavior, if some hardware conversion doesn't work well, software conversion will be used instead. Platforms tested: h5committest and fuss. Misc. update: some changes to configure's comments.
* [svn-r9987] Purpose: bug fixRaymond Lu2005-02-111-6/+10
| | | | | | | | | | | Description: For hardware conversion from integers to "long double" on AMD machine, the test failed because the size of "long double"(can be 16 bytes) is bigger than the precision(80 bits). There can be some garbage in the unused bytes in "long double". That caused failure during byte comparison. Solution: Clean these unused bytes before comparison. Platforms tested: mir and fuss; simple change
* [svn-r9984] Purpose: New feature and testRaymond Lu2005-02-101-60/+65
| | | | | | | | | | Description: Added support of hardware conversion between "long double" and integers(mainly in H5Tconv.c) and some test cases(mainly in test/dtypes.c). Platforms tested: h5committest and fuss. Misc. update: RELEASE.txt
* [svn-r9966] Purpose: Bug fixRaymond Lu2005-02-091-8/+49
| | | | | | | | | | | | | Description: H5Tget_member_value didn't return correct value if called after H5Tenum_valueof. It's because there's a sorting on the members of enum type in H5Tenum_valueof which changed the order of members. Solution: Made a copy of original type and do sorting on it to protect the original order. Platforms tested: fuss; tested v1.6 with h5committest Misc. update: RELEASE.txt
* [svn-r9959] Purpose: Bug fixRaymond Lu2005-02-081-25/+124
| | | | | | | | | | | | Description: For variable-length string, H5Tget_class returned H5T_STRING as its class. But H5Tdetect_class and H5Tget_member_class considered it as H5T_VLEN. This is fixed to let all these 3 functions treat it as H5T_STRING. Some test cases have been added to dtypes.c Platforms tested: heping - already tested for v1.6 with h5committest Misc. update: RELEASE.txt
* [svn-r9909] Purpose: Bug fix for testRaymond Lu2005-02-011-10/+21
| | | | | | | | | Description: To avoid randomly generating NaN for "long double" during conversion test, decrease the exponent by 1 if all exponent bits are set 1s. Platforms tested: eirene(production) and fuss.
* [svn-r9898] Purpose: Bug fix for test programRaymond Lu2005-01-311-3/+17
| | | | | | | | | | | | | | | | | | Description: For Intel machines, the size of "long double" is 12 byte, precision is 80 bits, mantissa size is 64 bits, and no normalization. So the most significant bit of mantissa is always 1 unless the floating number has special value. This step tries to compensate this case by turning on the most significant bit of mantissa if the mantissa bits aren't all 0s. Solution: Tries to compensate this case by turning on the most significant bit of mantissa if the mantissa bits aren't all 0s. Platforms tested: eirene and fuss(production enabled). Small change for production only.
* [svn-r9886] Purpose: New testRaymond Lu2005-01-291-0/+311
| | | | | | | | Description: Added a test of data type conversion between user-defined integer types. Platforms tested: h5committest and fuss
* [svn-r9853] Purpose: Minor Bug fixRaymond Lu2005-01-211-84/+86
| | | | | | | | Description: A very minor bug fix and some minor changes to reduce the warning messages during compiling. Platforms tested: sleipnir and fuss
* [svn-r9849] Purpose: New test and a few bug fixRaymond Lu2005-01-201-4/+179
| | | | | | | | | Description: Test conversion from native integer to derived floating-point type and convert back; test conversion from derived floating-point to derived floating-point types and convert back. Fixed a few minor bugs related to type conversion in the library. Platforms tested: h5committest and fuss
* [svn-r9841] Purpose: Minor correction in commentsRaymond Lu2005-01-201-4/+4
| | | | Platforms tested: No test needed.
* [svn-r9840] Purpose: Bug fix and new testRaymond Lu2005-01-201-0/+264
| | | | | | | | | | | | | Description: The functions for user-define floating-point type, like H5Tset_fields, H5Tset_offset, H5Tset_precision, H5Tset_size, have some minor bugs. For error checking, the library didn't include offset value somehow. Solution: Corrected those bugs. Platforms tested: h5committest and fuss Misc. update:
* [svn-r9827] Purpose: Minor correctionRaymond Lu2005-01-141-1/+1
| | | | | | | | Description: There was a #ifdef statement with logical AND in it. Solution: Change it to #if statement. Platforms tested: sleipnir and eirene. Simple change
* [svn-r9826] Purpose: Bug fixRaymond Lu2005-01-141-3/+13
| | | | | | | | | | Description: Intel compiler on Linux has some problem to convert long double to unsigned int correctly. Solution: Detect the problem in configure and define a macro to skip this test if it happens. Platforms tested: eirene and fuss. Simple change.
* [svn-r9819] Purpose: Bug fixRaymond Lu2005-01-131-6/+6
| | | | | | | | | | | | | Description: The fix of the loss problem of the last 2 bytes of mantissa on sleipnir has not been successful. It happens when converting from unsigned long long to long double. The failure has been on and off. Solution: Hard set a macro to disable unsigned long long->long double for FreeBSD until a good solution is found to solve this elusive problem. Platforms tested: sleipnir and fuss. Only sleipnir is concerned. Misc. update:
* [svn-r9814] Purpose: Bug fixRaymond Lu2005-01-121-2/+3
| | | | | | | | | | Description: the last 2 bytes of mantissa can be lost when converting from unsigned long long to long double. In last check-in, a fix was made to ignore that precision loss. But sometimes, the last 2 bytes are rounded up to the 3rd last byte. Solution: Ignore the 3rd last byte, too, when comparing values. Platforms tested: sleipnir - only this system is concerned.
* [svn-r9807] Purpose: bug fixRaymond Lu2005-01-111-0/+15
| | | | | | | | | | | Description: For FreeBSD (sleipnir), when GNU compilers do conversion from unsigned long long to long double, the last 2 bytes of mantissa are lost. The impact of precision loss isn't significant. Solution: Detect this case on FreeBSD in configure, ignore it in dtypes.c test instead of return failure. Platforms tested: sleipnir, fuss, modi4. These systems are mainly concerned.
* [svn-r9805] Purpose:Quincey Koziol2005-01-111-3/+1
| | | | | | | | | | Code cleanup Description: Remove obsolete support for Watcom C compiler. Platforms tested: None - too minor to require any.
* [svn-r9783] Purpose: Bug fixRaymond Lu2005-01-081-8/+10
| | | | | | | | | | Description: For HP-UX 11.00, the compiler generates 'floating exception' when converting 'long double' to most of integer types. Solution: Define a macro for all other systems except HP-UX 11.00. Hard set this macro to 'no' in config/hpux11.00 to skip this test for HP-UX 11.00. Platforms tested: modi4, kelgia, fuss
* [svn-r9777] Purpose: Bug fixRaymond Lu2005-01-071-2/+11
| | | | | | | | | Description: Windows .NET 2003 can't handle float(double)->long_long hardware conversion. While the problem hasn't been determined, we temporarily disable that test by using a condition macro. Let Windows define that macro. Other systems don't have it defined. Platforms tested: mir and eirene.
* [svn-r9774] Purpose: Bug fixbefore_removing_tbbt_codeRaymond Lu2005-01-071-15/+21
| | | | | | | | | | | Description: integer->long double conversion test failed on some of Linux systems(mir and eirene) when Intel compiler is used. I'm not able to repeat the problem. So I just made a best guess and fix it. The problem is minor. The long double on Linux is 12 bytes long but precision is 10 bytes. The unused 2 bytes may have garbage in them causing value comparison wrong. Platforms tested: mir and eirene with Intel compiler.
* [svn-r9767] Purpose: Bug fixRaymond Lu2005-01-061-122/+122
| | | | | | | | | Description: 2 small things to correct: 1. the change in H5config.h.in was wept out by a later change. 2. long long isn't supported on Windows. It's long_long instead. Platforms tested: fuss(linux 2.4)
* [svn-r9755] Purpose: New featureRaymond Lu2005-01-061-151/+252
| | | | | | | | | | | | | Description: Start to support software conversion between long double and all integers. Solution: No major changes to the algorithm. Changes to configure is to exclude SGI for long double to integers test because there're too many problems in their compiler. Platforms tested: h5committest, modi4, fuss, Teragrid, arabica Misc. update: RELEASE.txt
* [svn-r9727] Purpose:Quincey Koziol2004-12-291-790/+1007
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug Fix/Code Cleanup/Doc Cleanup/Optimization/Branch Sync :-) Description: Generally speaking, this is the "signed->unsigned" change to selections. However, in the process of merging code back, things got stickier and stickier until I ended up doing a big "sync the two branches up" operation. So... I brought back all the "infrastructure" fixes from the development branch to the release branch (which I think were actually making some improvement in performance) as well as fixed several bugs which had been fixed in one branch, but not the other. I've also tagged the repository before making this checkin with the label "before_signed_unsigned_changes". Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel & fphdf5 FreeBSD 4.10 (sleipnir) w/threadsafe FreeBSD 4.10 (sleipnir) w/backward compatibility Solaris 2.7 (arabica) w/"purify options" Solaris 2.8 (sol) w/FORTRAN & C++ AIX 5.x (copper) w/parallel & FORTRAN IRIX64 6.5 (modi4) w/FORTRAN Linux 2.4 (heping) w/FORTRAN & C++ Misc. update: