summaryrefslogtreecommitdiffstats
path: root/src/H5T.c
Commit message (Collapse)AuthorAgeFilesLines
* [svn-r6266] Purpose:Quincey Koziol2003-01-101-118/+118
| | | | | | | | | | | | Code cleanup/new feature. Description: Split FUNC_LEAVE into API and non-API specific versions. This allows a solution to compiling this branch with C++, as well as reducing the size of the binaries produced. Platforms tested: FreeBSD 4.7 (sleipnir) w/serial, parallel (including MPE) & thread-safe
* [svn-r6252] Purpose:Quincey Koziol2003-01-091-61/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lots of performance improvements & a couple new internal API interfaces. Description: Performance Improvements: - Cached file offset & length sizes in shared file struct, to avoid constantly looking them up in the FCPL. - Generic property improvements: - Added "revision" number to generic property classes to speed up comparisons. - Changed method of storing properties from using a hash-table to the TBBT routines in the library. - Share the propery names between classes and the lists derived from them. - Removed redundant 'def_value' buffer from each property. - Switching code to use a "copy on write" strategy for properties in each list, where the properties in each list are shared with the properties in the class, until a property's value is changed in a list. - Fixed error in layout code which was allocating too many buffers. - Redefined public macros of the form (H5open()/H5check, <variable>) internally to only be (<variable>), avoiding innumerable useless calls to H5open() and H5check_version(). - Reuse already zeroed buffers in H5F_contig_fill instead of constantly re-zeroing them. - Don't write fill values if writing entire dataset. - Use gettimeofday() system call instead of time() system when checking the modification time of a dataset. - Added reference counted string API and use it for tracking the names of objects opening in a file (for the ID->name code). - Removed redundant H5P_get() calls in B-tree routines. - Redefine H5T datatype macros internally to the library, to avoid calling H5check redundantly. - Keep dataspace information for dataset locally instead of reading from disk each time. Added new module to track open objects in a file, to allow this (which will be useful eventually for some FPH5 metadata caching issues). - Remove H5AC_find macro which was inlining metadata cache lookups, and call function instead. - Remove redundant memset() calls from H5G_namei() routine. - Remove redundant checking of object type when locating objects in metadata cache and rely on the address only. - Create default dataset object to use when default dataset creation property list is used to create datasets, bypassing querying for all the property list values. - Use default I/O vector size when performing raw data with the default dataset transfer property list, instead of querying for I/O vector size. - Remove H5P_DEFAULT internally to the library, replacing it with more specific default property list based on the type of property list needed. - Remove redundant memset() calls in object header message (H5O*) routines. - Remove redunant memset() calls in data I/O routines. - Split free-list allocation routines into malloc() and calloc()- like routines, instead of one combined routine. - Remove lots of indirection in H5O*() routines. - Simplify metadata cache entry comparison routine (used when flushing entire cache out). - Only enable metadata cache statistics when H5AC_DEBUG is turned on, instead of always tracking them. - Simplify address comparison macro (H5F_addr_eq). - Remove redundant metadata cache entry protections during dataset creation by protecting the object header once and making all the modifications necessary for the dataset creation before unprotecting it. - Reduce # of "number of element in extent" computations performed by computing and storing the value during dataspace creation. - Simplify checking for group location's file information, when file has not been involving in file-mounting operations. - Use binary encoding for modification time, instead of ASCII. - Hoist H5HL_peek calls (to get information in a local heap) out of loops in many group routine. - Use static variable for iterators of selections, instead of dynamically allocation them each time. - Lookup & insert new entries in one step, avoiding traversing group's B-tree twice. - Fixed memory leak in H5Gget_objname_idx() routine (tangential to performance improvements, but fixed along the way). - Use free-list for reference counted strings. - Don't bother copying object names into cached group entries, since they are re-created when an object is opened. The benchmark I used to measure these results created several thousand small (2K) datasets in a file and wrote out the data for them. This is Elena's "regular.c" benchmark. These changes resulted in approximately ~4.3x speedup of the development branch when compared to the previous code in the development branch and ~1.4x speedup compared to the release branch. Additionally, these changes reduce the total memory used (code and data) by the development branch by ~800KB, bringing the development branch back into the same ballpark as the release branch. I'll send out a more detailed description of the benchmark results as a followup note. New internal API routines: Added "reference counted strings" API for tracking strings that get used by multiple owners without duplicating the strings. Added "ternary search tree" API for text->object mappings. Platforms tested: Tested h5committest {arabica (fortran), eirene (fortran, C++) modi4 (parallel, fortran)} Other platforms/configurations tested? FreeBSD 4.7 (sleipnir) serial & parallel Solaris 2.6 (baldric) serial
* [svn-r6195] Raymond Lu2002-12-111-66/+167
| | | | | | | | | | Purpose: Cleanup H5Tget_native_type code Description: improve code cosmetics. Solution: Platforms tested: modi4, eirene, arabica
* [svn-r6068] Purpose:Quincey Koziol2002-11-111-2/+2
| | | | | | | | | | | | | Fix Windows portability bug Description: "long long" is not defined on Windows. Solution: Use our internal definition of "long_long" instead. Platforms tested: eyeballed.
* [svn-r6064] Purpose:Bill Wendling2002-11-071-4/+4
| | | | | | | | | | Code Cleanup Description: A function was returning "NULL" instead of "FAIL" for an error condition. Renamed the variable "class" to "h5_class" since class is a keyword in C++ and might mess up with a C++ compiler... Platforms tested: Eirene pp (too small a change for 3 tests)
* [svn-r6063] Purpose:Quincey Koziol2002-11-071-291/+340
| | | | | | | | | | | Code cleanup Description: Cleaned up some error values that were incorrect, added some assertions and refactored the integer & floating-point native conversions some. Platforms tested: FreeBSD 4.7 (sleipnir), too small for h5committest
* [svn-r6060] Raymond Lu2002-11-061-20/+1019
| | | | | | | | | | | Purpose: Add new functions Description: add H5Tget_native_type and H5Tis_variable_str. Platforms tested: arabica, eirene, modi4 Misc. update: MANIFEST and release_docs/RELEASE updated.
* [svn-r5995] Purpose:Quincey Koziol2002-10-141-3/+4
| | | | | | | | | | | | | | | Code cleanup/Bug Fix Description: Re-do the ID->name code again, taking into account many more weird and wonderful special cases stumbled across during the last set of test writing. Platforms tested: FreeBSD 4.6 (sleipnir) w and w/o parallel Linux 2.2.x (eirene) w/FORTRAN & C++ Solaris 2.7 (arabica) w/FORTRAN IRIX64 6.5 (modi4) w/FORTRAN & parallel
* [svn-r5947] Purpose:Quincey Koziol2002-09-251-31/+21
| | | | | | | | | | | | | | | | Code cleanup Description: Clean up ID->name code: - Reformat to better match library coding standard - Changed several algorithms to be more efficient - Integrated into library more smoothly Platforms tested: eirene w/FORTRAN & C++ arabica w/FORTRAN modi4 w/FORTRAN & parallel sleipnir
* [svn-r5936] Pedro Vicente Nunes2002-09-211-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Purpose: bug fix [ i s this a bug fix? feature? ...] Description: the copy of a symbol table entry was done with a shallow copy, in H5T_copy this was causing an exception on the free call of the ID to name buffer replaced a shallow copy of a symbo l a edescribe the bug, or describe the new feature, etc] Solution: [details about the changes, algorithm, etc...] [Please as detail as you can since your own explanation is better than others guessing it from the code.] Platforms tested: windows 2000 solaris with cpp, fortran irix64, with fortran, parallel i r [machines you have tested the changed version. This is absolute important. Test it out on at least two or three different platforms such as Big-endian-32bit (SUN/IRIX), little-endian-32(LINUX) and 64-bit (IRIX64/UNICOS/DEC-ALPHA) would be good.]
* [svn-r5929] Pedro Vicente Nunes2002-09-181-7/+0
| | | | | | | | | | | | | | Purpose: bug fix Description: memory leak regarding the ID to name buffer Solution: added a new function H5G_free_ent_name that is called on several places of the library Platforms tested: windows 2000 linux, with cpp solaris, with fortran, cpp irix64, with parallel, fortran
* [svn-r5911] Pedro Vicente Nunes2002-09-041-2/+44
| | | | | | | | | | | | | Purpose: bug fix in 'ID to name' function Description: the function replace_name was only checking for immutable datatypes Solution: added a new function H5T_is_named, that checks for named datatypes Platforms tested: windows 2000, linux, solaris with Fortran
* [svn-r5904] Pedro Vicente Nunes2002-08-281-1/+9
| | | | | | | | | | | | | | | | | | | Purpose: Added 'ID to name' support Description: There is a new API function H5Iget_name Most of the changes are on H5G.c , regarding the symbol table entry struct H5G_entry_t which has 2 new fields 'name' and 'old_name' A new private function was introduced H5G_ent_copy, that does a deep copy between 2 symbol table entries The test file is getname.c Platforms tested: windows 2000, Linux, Solaris
* [svn-r5867] Purpose:Quincey Koziol2002-08-091-8/+32
| | | | | | | | | | | | | Code cleanup Description: Changed the last HRETURN* statements in the FUNC_ENTER macros into HGOTO* macros, which reduces the size of the library binary in certain configurations by another 10% Platforms tested: FreeBSD 4.6 (sleipnir) serial & parallel, IRIX64 6.5 (modi4) serial & parallel
* [svn-r5863] ./hdf5-devel/src/H5T.cRobb Matzke2002-08-091-1/+1
| | | | | | | | | | | | | | | | | Purpose: Merged from 1.4 branch Description: API tracing improvements Platforms tested: Linux (--disable-hsizet didn't work before my changes and still doesn't work, but --enable-hsizet is fine). Note: This checkin includes temporary code in H5FDmpiposix.c to turn off GPFS byte range token prefetches on ASCI/Blue. Once the HDF5 API supports the necessary prerequisite functionality this temporary code can be migraged up above HDF5.
* [svn-r5843] Purpose:Quincey Koziol2002-08-081-2/+2
| | | | | | | | | | | Code cleanup Description: Clean up a few warnings which were showing up with --enable-production turned on. Platforms tested: FreeBSD 4.6 (sleipnir) serial & parallel
* [svn-r5842] Purpose:Quincey Koziol2002-08-081-1354/+1112
| | | | | | | | | | | | | | | | Code cleanup Description: Change most (all?) HRETURN_ERROR macros to HGOTO_ERROR macros, along with HRETURN macros to HGOTO_DONE macros. This unifies the error return path from functions and reduces the size of the library by up to 10% on some platforms. Additionally, I improved a lot of the error cleanup code in many routines. Platforms tested: FreeBSD 4.6 (sleipnir) serial & parallel and IRIX64 6.5 (modi4) serial & parallel.
* [svn-r5840] Purpose:Quincey Koziol2002-07-311-176/+77
| | | | | | | | | | | | | | Code cleanup Description: Created a new H5I function which combined the some of the functionality of H5I_get_type and H5I_object: H5I_object_verify. Using this new function in the library trims another ~200 lines of code off the library and makes the resulting binaries smaller and faster also. Platforms tested: FreeBSD 4.6 (sleipnir)
* [svn-r5789] Purpose:Quincey Koziol2002-07-151-1/+1
| | | | | | | | | | Code cleanup Description: Make a "H5T_t *" parameter into a "const H5T_t *" parameter. Platforms tested: FreeBSD 4.6 (sleipnir)
* [svn-r5674] Purpose:Quincey Koziol2002-06-191-1/+1
| | | | | | | | | | Code cleanup Description: Removed more compiler warnings, etc. Platforms tested: Linux 2.2.x (eirene) w/parallel
* [svn-r5605] Purpose:Quincey Koziol2002-06-121-8/+12
| | | | | | | | | | Code cleanup Description: Clean up some compiler warnings... Platforms tested: FreeBSD 4.5 (sleipnir)
* [svn-r5595] Elena Pourmal2002-06-111-7/+17
| | | | | | | | | | | | | | | Purpose: Bug #774 fix Description: H5Tenum_valueof and H5Tenum_nameof functions did not fail when non-existing name or non-existing value were supplied. This happened because binary search algorithm did not check if value or name found during the search were equal to the supplied one. Solution: Added an appropriate check condition. Platforms tested: Solaris 2.7 and Linux 2.2.18
* [svn-r5586] Purpose:Quincey Koziol2002-06-111-3/+61
| | | | | | | | | | | | | | | | Bug Fix Description: H5Dcreate and H5Tcommit allow "empty" compound and enumerated types (i.e. ones with no members) to be stored in the file, but this causes an assertion failure and is somewhat vapid. Solution: Check the datatype "makes sense" before using it for H5Dcreate and H5Tcommit. Platforms tested: FreeBSD 4.5 (sleipnir)
* [svn-r5567] Purpose:Quincey Koziol2002-06-101-0/+2
| | | | | | | | | | | | | | Bug fix (bug #777) Description: Current code allows a compound datatype to be inserted into itself. Solution: Check if the ID for the member is the same as the ID for the compound datatype and reject it if so. Platforms tested: FreeBSD 4.5 (sleipnir)
* [svn-r5471] Purpose:Quincey Koziol2002-05-291-92/+103
| | | | | | | | | | | | | | | | Code cleanup Description: Broke the FUNC_ENTER macro into several macros, with more specialized uses (which followup mail will describe). This was designed to move most/all of the checks which could be done at compile time to that point, instead of needlessly performing them (over & over :-) at run-time. This reduces the library's size (and thus staticly linked binaries) and has a minor speedup effect also. Platforms tested: IRIX64 6.5 (modi4) with parallel & FORTRAN enabled, and additional testing on FreeBSD and Solaris immediately after the checkin.
* [svn-r5467] Purpose:Quincey Koziol2002-05-281-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | Code cleanup. Description: Took Robb's recent ideas for improving the FUNC_ENTER/FUNC_LEAVE macros equivalents in the SAF library and adapted them to our library. I added an additional macro which is equivalent to FUNC_ENTER: FUNC_ENTER_NOINIT - Has the API tracing code, etc. from FUNC_ENTER but none of the library or interface initialization code. This is to be used _only_ for static functions and those which explicitly cannot have the library or interface initialization code enabled (like the API termination routines, etc.). This allowed many more of the functions in the library [but not all yet :-(] to be wrapped with FUNC_ENTER[_NOINIT]/FUNC_LEAVE pairs. It also reduced the size of the library and executables (by cutting out a bunch of code which was never executed), I'll e-mail the exact results when I've finished editing it. Platforms tested: IRIX64 6.5 (modi4)
* [svn-r5308] Purpose:Quincey Koziol2002-05-011-1/+1
| | | | | | Update API tracing information Platforms tested: Linux 2.2 (eirene)
* [svn-r5219] Purpose:Quincey Koziol2002-04-221-2/+2
| | | | | | | | | | Code cleanup Description: Clean up warnings from gcc 3.1 Platforms tested: FreeBSD 4.5 (sleipnir)
* [svn-r5147] Raymond Lu2002-04-051-0/+59
| | | | | | | | | | Purpose: New feature Description: Added a query function H5Tget_member_index for compound and enumeration data types, to retrieve member's index by its name. Platforms tested: Linux 2.2
* [svn-r5123] Raymond Lu2002-03-291-15/+65
| | | | | | | | | | | Purpose: Bug fix(#697) Description: Variable-length string wasn't treated as string. Solution: Added character set and padding into VL string type. Platforms tested: FreeBSD
* [svn-r4978] Purpose:Quincey Koziol2002-02-171-2/+1
| | | | | | | | Code cleanup Description: Cleanup compiler warnings found by the SGI compiler and gcc 3.0 Platforms tested: FreeBSD 4.5 w/gcc 3.0 (hack) && IRIX64 (modi4)
* [svn-r4868] Purpose:Quincey Koziol2002-01-271-2/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug fixes Description: This checkin addresses two separate bugs: #1 - When a compound datatype with a VL datatype as a field is used to read or write data, the datatype conversion paths added to the table of paths were treating the VL datatypes somewhat too genericly - they weren't dicriminating between VL datatypes used in different files and therefore there was the possibility that a path in the table having information for one file could get used with a second file, causing errors or core dumps (if the first file was closed before the later file used the path). #2 - When composite (compound, array or VL) datatype paths in the datatype conversion table are being tested to see if they can be used for the current datatypes being converted, they can cause additional conversion paths to be registered in the conversion path table. Since this causes the global table to change size and entries to move around, it is possible that the local variables tracking a potential path could become incorrect as the global table was changed out from underneath them. Both bugs fixed are described in bug #703 Solution: Two separate fixes: #1 - Changed H5T_cmp to differentiate between VL datatypes in different files and not to return datatypes in two different files as equal. #2 - Note size of global table before evaluating datatype paths. Then, after the appropriate path has been chosen, check if the size of the global table has changed and recompute the position of the path chosen in the table if necessary. Platforms tested: FreeBSD 4.5 (sleipnir)
* [svn-r4861] ./hdf5-devel/src/H5T.cRobb Matzke2002-01-251-0/+2
| | | | | | | | | | | | | | More optimizing for byte order conversion. Mostly just making code easier to follow by simplifying Duff's device coding of the loops. I also split the conversion function into two functions with different names so output from H5T debugging indicates whether the optimized or unoptimized case was invoked. 2002-01-25 10:47:13 Robb Matzke <matzke@arborea.spizella.com> * H5T_init_interface: Registered conversion function H5T_conv_order_opt() under two names. H5T debugging will report the conversion function as either "ibo(opt)" or "fbo(opt)".
* [svn-r4736] Purpose:Quincey Koziol2001-12-181-0/+4
| | | | | | | | | | | Bug Fix Description: H5Tinsert was allowing compound datatype fields to be inserted past the end of the datatype. Solution: Added range check in H5T_insert Platforms Tested: FreeBSD 4.4 (sleipnir)
* [svn-r4706] Purpose:Quincey Koziol2001-12-121-1/+1
| | | | | | | | | | | | Code cleanup Description: Tweaked internal error handling macros to reduce the size of the library's object code by about 10-20%. Also cleaned up some compiler warnings... Platforms tested: FreeBSD 4.4 (sleipnir)
* [svn-r4696] Raymond Lu2001-12-111-1/+32
| | | | | | | | | | | | | | | | | Purpose: Modify H5Fclose behavior Description: The HDF5 actual file close behaves in several ways in terms of if there are still objects(dataset, group, datatype) opened in file. Solution: Added a new file access property, file close degree. It has four values, H5F_CLOSE_DEFAULT H5F_CLOSE_WEAK H5F_CLOSE_SEMI H5F_CLOSE_STRONG The way a file is closed is decided by these values. Platforms tested: IRIX64 6.5, SunOS 5.6, FreeBSD 4.4
* [svn-r4657] MuQun Yang2001-11-281-8/+8
| | | | | | | | | | | | | Purpose: a minor bug on H5T.c Description: should be HEREUTRN_ERROR(...,...,int,...) instead of HERUTRN_ERROR(...,...,int*,...) Solution: change HERETURN_ERROR(...,...,NULL,...) into HERETURN_ERROR(...,...,FAIL,...) Platforms tested: windows 2000
* [svn-r4643] Purpose:Quincey Koziol2001-11-271-7/+7
| | | | | | | | | | | | | | | | | | | | | | Code cleanup Description: Windows is generating hundreds of warnings from some of the practices in the library. Mostly, they are because size_t is 32-bit and hsize_t is 64-bit on Windows and we were carelessly casting the larger values down to the smaller ones without checking for overflow. Also, some other small code cleanups,etc. Solution: Re-worked some algorithms to eliminate the casts and also added more overflow checking for assignments and function parameters which needed casts. Kent did most of the work, I just went over his changes and fit them into the the library code a bit better. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4629] Purpose:Quincey Koziol2001-11-201-11/+107
| | | | | | | | Bug fix for code cleanup... :-) Description: Fix a few problems introduced in my previous code cleanup. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4627] Purpose:Quincey Koziol2001-11-201-925/+1555
| | | | | | | | | Code cleanup Description: Got rid of IDs from internal API functions and also got rid of API calls from internal functions. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4584] Raymond Lu2001-11-021-1/+1
| | | | | | | | | Purpose: Switch from old property list to new generic property list. Description: Mainly changed H5Pcreat, H5Pclose, H5Pcopy. Platforms tested: IRIX64 6.5, FreeBSD, SunOS 5.7.
* [svn-r4473] Purpose:Quincey Koziol2001-09-251-3/+3
| | | | | | | | | | | | | | | | | | | | | Code cleanup for better compatibility with C++ compilers Description: C++ compilers are choking on our C code, for various reasons: we used our UNUSED macro incorrectly when referring to pointer types we used various C++ keywords as variables, etc. we incremented enum's with the ++ operator. Solution: Changed variables, etc.to avoid C++ keywords (new, class, typename, typeid, template) Fixed usage of UNUSED macro from this: char UNUSED *c to this: char * UNUSED c Switched the enums from x++ to x=x+1 Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4355] Purpose:Quincey Koziol2001-08-141-46/+46
| | | | | | | | | | | | | | | | | | | | | | Code cleanup (sorta) Description: When the first versions of the HDF5 library were designed, I remembered vividly the difficulties of porting code from a 32-bit platform to a 16-bit platform and asked that people use intn & uintn instead of int & unsigned int, respectively. However, in hindsight, this was overkill and unnecessary since we weren't going to be porting the HDF5 library to 16-bit architectures. Currently, the extra uintn & intn typedefs are causing problems for users who'd like to include both the HDF5 and HDF4 header files in one source module (like Kent's h4toh5 library). Solution: Changed the uintn & intn's to unsigned and int's respectively. Platforms tested: FreeBSD 4.4 (hawkwind)
* [svn-r4312] Purpose:Quincey Koziol2001-08-061-168/+0
| | | | | | | | | Feature shift Description: Take out the v1.2.x compatibility stubs and put in the hooks for v1.4.x compatibility when needed. Platforms tested: FreeBSD 4.3 (hawkwind)
* [svn-r4181] Purpose:Quincey Koziol2001-07-101-1/+1
| | | | | | | | | Bug Fix, Code Cleanup, Code Optimization, etc. Description: Fold in the hyperslab speedups, clean up compile warnings and change a few things from using 'unsigned' or 'hsize_t' to use 'size_t' instead. Platforms tested: FreeBSD 4.3 (hawkwind), Solaris 2.7 (arabica), Irix64 6.5 (modi4)
* [svn-r4179] Purpose:Quincey Koziol2001-07-101-0/+23
| | | | | | | | | | | | Documentation Description: H5Tget_member_type in v1.2.x returns the base type of array fields in compound datatypes, not an array type itself. Solution: Changed to emulate this behavior in v1.4.x when the --enable-hdf5v1_2 flag is given during configuration. Platforms tested: FreeBSD 4.3 (hawkwind)
* [svn-r4022] Purpose:Bill Wendling2001-06-191-3/+3
| | | | | | | | | Code Cleanup Description: Changed POSIX function calls to the HD* way of doing things. Checked with checkposix and tested on Linux. Platforms tested: Linux
* [svn-r3781] Purpose:Bill Wendling2001-04-051-13/+13
| | | | | | | | | | | | | | | | | | Update Description: Changed #include <hdf_file.h> construct to #include "hdf_file.h" so that the GNU compiler can more easily pick up the dependencies which it places in the .depend and Dependencies files. Also regenerated the Dependencies to go along with this. Platforms tested: Linux
* [svn-r3677] Purpose:Albert Cheng2001-03-201-3/+0
| | | | | | | | | | | | | Bug fix (sort of) Description: The RCSID string in H5public.h was causing the C++ code problem as it was included multiple times and C++ did not like multiple definitions of the same static variable. Solution: Since we don't really make use of the RCSID strings as we have not installed it in all source files, we decided to remove it. Platforms tested: eirene (linux), modi4 (IRIX64-64) both serial and parallel modes.
* [svn-r3258] Snapshot version 1.4 release 0 (beta3-snap0)HDF Admin2001-01-101-1/+1
|