summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r11144] Purpose:Quincey Koziol2005-07-231-2/+67
| | | | | | | | | | | 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-r11001] Purpose: Add more comment.Raymond Lu2005-06-291-1/+2
|
* [svn-r10998] Purpose: Bug fix.Raymond Lu2005-06-291-1/+9
| | | | | | | | | | | | | Description: For the definition of the macro H5T_CONV_Xx_CORE, added a condition branch (else if (*((ST*)S) == (DT)(D_MAX))) which seems redundant. It handles a special situation when the source is "float" and assigned the value of "INT_MAX". A compiler may do roundup making this value "INT_MAX+1". However, when do comparison "if (*((ST*)S) > (DT)(D_MAX))", the compiler may consider them equal. Platforms tested: fuss - simple change.
* [svn-r10919] Purpose: Take Out An Unused FunctionRaymond Lu2005-06-141-391/+0
| | | | | | | | | | | Description: Data conversion function H5T_conv_i32le_f64le() was unused. Because we have new conversion functions for integers and floating numbers, this old function is taken out. Platforms tested: fuss - simple change. Misc. update:
* [svn-r10918] Purpose: Bug fixRaymond Lu2005-06-141-2/+2
| | | | | | | | Description: Fix the codes of last checkin(Bug #341). Some failures happened in daily test from last checkin. Try to fix them in this checkin. Platforms tested: modi4, mir, and tg-login2.
* [svn-r10785] Purpose:James Laird2005-05-231-2/+4
| | | | | | | | | | | | | | | | | Feature Description: Added "support" for UTF-8 character encoding. Solution: Wrote tests to check that UTF-8 can be used in a number of places in HDF5 (object names, data, etc.). These tests live in test/tunicode.c. Added a new UTF-8 character encoding for datatypes. Platforms tested: mir, modi4, heping Misc. update:
* [svn-r10731] Purpose: Bug fixRaymond Lu2005-05-051-0/+2
| | | | | | | | | Description: A user reported conversion of floating-point numbers returned some wrong value. It turned out a variable in H5T_conv_f_f() wasn't reset after being used for each element. See bug #356 for details. Solution: Simple reset it. Platforms tested: fuss; also tested with the program user provided. Very simple change.
* [svn-r10469] Purpose: Minor typo fixRaymond Lu2005-03-281-9/+9
| | | | | | | | | | Description: During last change, part of the code wasn't updated in copy and paste accordingly. It was in the exception handling of NaN in H5T_conv_f_f(). Solution: Corrected. Platforms tested: No test needed - trivial.
* [svn-r10456] Purpose: New way to do conversion test from floating-points to ↵Raymond Lu2005-03-261-39/+203
| | | | | | | | | | | | | | | | | | | integers. Description: The 6th step of changing conversion test. This checkin is only for conversion of special values from floating-points to integers. Solution: This test is seperated from regular value conversion. It reuses the same function test_conv_int_float() in test/dtypes.c. The source buffer of floating-point type is filled up with 8 special values, +/-0, +/-infinity, +/-QNaN, +/-SNaN. Also added 3 new conversion exception values H5T_CONV_EXCEPT_PINF, H5T_CONV_EXCEPT_NINF, H5T_CONV_EXCEPT_NAN, for floating-point special values positive infinity, negative infinity, and NaN. These values are for conversion exception callback function defined through H5Pset_type_conv_cb(). (Remember to update the document!) Platforms tested: h5committest
* [svn-r10402] Purpose: New way to do conversion test between floating-point ↵Raymond Lu2005-03-241-6/+26
| | | | | | | | | | | | | 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-r10266] Purpose: Bug fixRaymond Lu2005-03-221-31/+29
| | | | | | | | | | Description: The recent change of conversion between floating-point and floating-point types in dtypes.c have detected some bugs in H5T_conv_f_f in H5Tconv.c. Solution: This checkin is to fix these bugs. They happened in a few places in H5T_conv_f_f causing incorrect rounding, denormalization, etc. Platforms tested: h5committest and modi4
* [svn-r10113] Purpose: Bug fixRaymond Lu2005-03-011-0/+2
| | | | | | | | | | | Description: Condition check of macro H5_ULLONG_TO_FP_CAST_WORKS was accidentally taken out in last revision. This macro is defined for Windows because Windows doesn't support conversion from "unsigned long long" to any floating-point type. Solution: Added it back to H5T_conv_ullong_xxx() functions(xxx is any of "float", "double", or "long double"). Platforms tested: tested on Windows.
* [svn-r10087] Purpose: New feature and testRaymond Lu2005-02-251-2/+128
| | | | | | | | | | | 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-r10008] Purpose: Bug fixRaymond Lu2005-02-151-38/+22
| | | | | | | | | | | | Description: When hardware conversion between "long double" and integers was added to the library, the "double" used in H5T_CONV_Fx and H5T_CONV_xF for alignment wasn't big enough for "long double". New macros H5T_CONV_Lx and H5T_CONV_xL were added to use "long double" for alignment. But later it's found out the new macros were not necessary. Solution: Took out the new macros H5T_CONV_Lx and H5T_CONV_xL; change the "double" to "long double" for alignment in H5T_CONV_Fx and H5T_CONV_xF. Platforms tested: h5committest
* [svn-r10003] Purpose: Bug fixRaymond Lu2005-02-141-0/+4
| | | | | | | | | Description: At line 3564, the command H5T_bit_set(s, src.u.f.mpos, 1, FALSE) has unclear intention to me. Before I figure it out, move it to line 3590, where I think it should be. This did fix some data conversion. Platforms tested: fuss - already test it for v1.6.
* [svn-r9984] Purpose: New feature and testRaymond Lu2005-02-101-16/+671
| | | | | | | | | | 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-r9857] Purpose: MaintenanceElena Pourmal2005-01-221-3/+0
| | | | | | | | | | | | | | Description: Removed PABLO from the source Solution: Platforms tested: arabica with 64-bit, copper with parallel, heping with GNU C and C++ and PGI fortran (but I disabled hl, there is some weird problem only on heping: F9XMODFLAG is not propagated to the Makefile files Misc. update:
* [svn-r9849] Purpose: New test and a few bug fixRaymond Lu2005-01-201-2/+2
| | | | | | | | | 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-r9755] Purpose: New featureRaymond Lu2005-01-061-29/+25
| | | | | | | | | | | | | 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-115/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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:
* [svn-r9445] Purpose: Bug fixRaymond Lu2004-10-211-20/+20
| | | | | | | | | | | Description: "char" was considered as always "signed char" in data type conversion. However, ISO C leaves the definition of "char" to individual implementation. i.e. for IBM AIX C compiler, it's treated as "unsigned char". Solution: Changed all "char" to "signed char". Don't even do "char" anymore because its definition is up to each vendor. Platforms tested: h5committest
* [svn-r9329] James Laird2004-09-281-459/+459
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Purpose: Feature Description: Datatypes and groups now use H5FO "file object" code that was previously only used by datasets. These objects will hold a file open if the file is closed but they have not yet been closed. If these objects are unlinked then relinked, they will not be destroyed. If they are opened twice (even by two different names), both IDs will "see" changes made to the object using the other ID. When an object is opened using two different names (e.g., if a dataset was opened under one name, then mounted and opened under its new name), calling H5Iget_name() on a given hid_t will return the name used to open that hid_t, not the current name of the object (this is a feature, and a change from the previous behavior of datasets). Solution: Used H5FO code that was already in place for datasets. Broke H5D_t's, H5T_t's, and H5G_t's into a "shared" struct and a private struct. The shared structs (H5D_shared_t, etc.) hold the object's information and are used by all IDs that point to a given object in the file. The private structs are pointed to by the hid_t and contain the object's group entry information (including its name) and a pointer to the shared struct for that object. This changed the naming of structs throughout the library (e.g., datatype->size is now datatype->shared->size). I added an updated H5Tinit.c to windows.zip. Platforms tested: Visual Studio 7, sleipnir, arabica, verbena Misc. update:
* [svn-r9053] Purpose:Quincey Koziol2004-08-081-0/+6
| | | | | | | | | | | | | | | | | | | Bug fix Description: Correct possible core dump when a datatype conversion function is registered with the library after a compound datatype has been converted (having it's type conversion information cached by the library). The compound datatype must have been created by inserting the fields in non-increasing offset order to see the bug. Solution: Re-sort the fields in the compound datatypes before recalculating the cached information when performing the conversion on them. Platforms tested: FreeBSD 4.10 (sleipnir) h5committested
* [svn-r8944] Purpose:Quincey Koziol2004-07-261-2/+4
| | | | | | | | | | | | Code optimization Description: Eliminate duplicated call to H5T_detect_class() Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8877] James Laird2004-07-141-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Purpose: Bug Fix Description: If an HDF5 file grows larger than its address space, it dies and is unable to write any data. This is more likely to happen since users are able to change the number of bytes used to store addresses in the file. Solution: HDF5 now throws an error instead of dying. In addition, it "reserves" address space for the local heap and for object headers (which do not allocate space immediately). This ensures that after the error occurs, there is enough address space left to flush the entire file to disk, so no data is lost. A more complete explanation is at /doc/html/TechNotes/ReservedFileSpace.html Platforms tested: sleipnir, copper (parallel), verbena, arabica, Windows (Visual Studio 7) Solution: Platforms tested: Misc. update:
* [svn-r8782] Purpose:Quincey Koziol2004-07-011-1/+1
| | | | | | | | | | | Code cleanup Description: Clean up almost all warnings from Windows builds. Platforms tested: FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8731] Purpose:Quincey Koziol2004-06-231-30/+25
| | | | | | | | | | | | | | | Code cleanup & minor optimization Description: Re-work the way interface initialization routines are specified in the library to avoid the overhead of checking for them in routines where there is no interface initialization routine. This cleans up warnings with gcc 3.4, reduces the library binary size a bit (about 2-3%) and should speedup the library's execution slightly. Platforms tested: FreeBSD 4.10 (sleipnir) w/gcc34 h5committest
* [svn-r8705] Purpose: Bug fix and new test.Raymond Lu2004-06-181-1/+1
| | | | | | | | | | Description: This is an enhancement after a user reported data writing failure for array datatype of compound type with variable-length type in the v1.6 branch. Solution: Added new test and ran with Purify. Fixed memory errors and leaks in H5Tconv.c. Platforms tested: h5committest
* [svn-r8692] Purpose:Quincey Koziol2004-06-151-2/+3
| | | | | | | | | | | | | Code optimization Description: Avoid making copy of default vlen allocation info when default DXPL is used. Just retarget pointer to point to default info directly. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8683] Purpose:Quincey Koziol2004-06-141-196/+195
| | | | | | | | | | | | | Code optimization Description: Use 'size_t' instead of 'hsize_t' to track the number of elements in memory buffers, especially for type conversion. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8670] Purpose:Quincey Koziol2004-06-131-16/+36
| | | | | | | | | | | | | Code optimization Description: Avoid a memory copy by directly reading from the variable-length sequence buffer when there is no type conversion on the way to disk. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8668] Purpose:Quincey Koziol2004-06-131-54/+63
| | | | | | | | | | | | | | Code optimization Description: Avoid running conversion routine when it's a noop. Also, pick a minimum size for the variable-sized sequence conversion buffer, instead of allocating lots of small buffers. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel
* [svn-r8666] Purpose:Quincey Koziol2004-06-131-163/+146
| | | | | | | | | | | | | | Code optimization Description: Restructure conversion loop of variable-length objects to avoid walking through memory backwards and allocating as many temporary buffers. (This uses the optimized method used in the atomic type conversions) Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8656] Purpose:Quincey Koziol2004-06-111-5/+0
| | | | | | | | | | | | | Code optimization Description: Eliminate redundant memory allocation for type conversion of variable-length sequences. Platforms tested: Solaris 2.7 (arabica) FreeBSD 4.10 (sleipnir) w/parallel Too minor to require h5committest
* [svn-r8487] Purpose: Internal function changeRaymond Lu2004-05-061-48/+54
| | | | | | | | | Description: H5T_reverse_order was declared as private function. Solution: Change it to static local function in H5Tconv.c since it's not used by any function in other file. Platforms tested: RH 8(fuss)
* [svn-r8427] Purpose:Quincey Koziol2004-04-281-0/+2
| | | | | | | | | | | | | | | | Bug fix (sorta) Description: Add hack to allow the MS Visual Studio 6 compiler to build the library. It cannot cast unsigned long long values to float or double values. So, add another configuration macro to disable this conversion in the library. Just the "hardware" conversion is disabled, so the library will still correctly convert unsigned long long to float and double values, it will just happen more slowly with the "software" conversion routine. Platforms tested: FreeBSD 4.9 (sleipnir) with "Windows" setting faked inappropriate for h5committest
* [svn-r8425] Purpose:Quincey Koziol2004-04-281-2/+2
| | | | | | | | | | | | | | | Bug fix (sorta) Description: The SGI machines have problems accurately (and consistently) converting unsigned long values to float and double values, so put in a bit of a hack in the datatype conversion test code to allow them to get "close enough". This hack is enabled at configure time by a flag which should only be set on machines with this problem. Platforms tested: FreeBSD 4.9 (sleipnir) h5committest
* [svn-r8424] *** empty log message ***Raymond Lu2004-04-271-132/+616
|
* [svn-r8383] Purpose:Quincey Koziol2004-04-181-8/+2
| | | | | | | | | | | | | Code cleanup Description: Clean up lots of warnings based on those reported from the SGI compilers as well as gcc. Platforms tested: SGI O3900, IRIX64 6.5 (Cheryl's SGI machine) FreeBSD 4.9 (sleipnir) w/ & w/o parallel h5committest
* [svn-r8344] Purpose: Internal function changeRaymond Lu2004-04-121-4/+4
| | | | | | | | Description: H5T_bit_shift wasn't general enough to handle arbitory start, length. Solution: Make it be so. Platforms tested: h5committest
* [svn-r8287] Purpose:Quincey Koziol2004-03-301-4/+4
| | | | | | | | | | | | | | Bug fix/code cleanup Description: Copy Robb's feature in SSlib that checks that the name of the function used in the FUNC_ENTER macro is actually the name of function. Fixed a bunch of typos & copy-n-pasto's for functions with incorrect names. Platforms tested: FreeBSD 4.9 (sleipnir) w/parallel too minor to require h5committest
* [svn-r8266] Purpose: Internal function changeRaymond Lu2004-03-191-1/+0
| | | | | | | | | Description: The algorithm of H5T_bit_neg wasn't general enough. Solution: Changed it to handle arbitory starting position and size in a bit sequence. Platforms tested: h5committest.
* [svn-r8265] Purpose: Code cleanupRaymond Lu2004-03-181-64/+11
| | | | | | | | Description: Some printing commands left there for debugging. Solution: Took them out. Platforms tested: fuss(RH8). Simple change
* [svn-r8259] *** empty log message ***Raymond Lu2004-03-131-7/+380
|
* [svn-r8157] Purpose:Quincey Koziol2004-02-061-1/+6
| | | | | | | | | | | | Code cleanup/optimization Description: Hoist property list queries up out of inner loops to cache the values at a higher level and pass them into the lower-level routines. Platforms tested: IBM p690 (copper) w/parallel & fphdf5 h5committest
* [svn-r8154] Purpose:Quincey Koziol2004-02-051-4/+3
| | | | | | | | | | | Code cleanup Description: Minor tweaks, cleanups & optimizations to new bit operation routines. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
* [svn-r8153] *** empty log message ***Raymond Lu2004-02-041-0/+382
|
* [svn-r8136] Purpose:Quincey Koziol2004-01-311-7/+1
| | | | | | | | | | | | | Optimization Description: Speed up various parts of the library by setting a global variable for the endianness of the machine at library startup and use that variable instead of repeatedly querying the endianness of the native int datatype. Platforms tested: IBM p690 (copper) too minor to require h5committest
* [svn-r7988] Purpose:Quincey Koziol2003-12-291-1/+1
| | | | | | | | | | | Bug fixes & code cleanup Description: Back out some of the debugging that was inadvertently checked in recently. Platforms tested: FreeBSD 4.9 (sleipnir) too minor to require h5committest
* [svn-r7984] Purpose: bug fixRaymond Lu2003-12-291-2/+3
| | | | | | | Description: VL datatype fails in certain way(hard to describe) Platforms tested: h5committest