summaryrefslogtreecommitdiffstats
path: root/src/H5Tnative.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'develop' into feature/new_datatypesfeature/new_datatypesDana Robinson2024-03-161-2/+0
|\
| * Remove useless headers (#4145)Dana Robinson2024-03-151-2/+0
| | | | | | Removes unnecessary headers from C library source files.
* | Merge branch 'develop' into feature/new_datatypesJordan Henderson2024-03-121-13/+5
|\ \ | |/
| * Refactor datatype conversion code to use pointers rather than IDs (#4104)jhendersonHDF2024-03-101-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The datatype conversion code previously used IDs for the source and destination datatypes rather than pointers to the internal structures for those datatypes. This was mostly due to the need for an ID for these datatypes that can be passed to an application-registered datatype conversion function or datatype conversion exception function. However, using IDs internally caused a lot of unnecessary ID lookups and hurt performance of datatype conversions in general. This was especially problematic for compound datatype conversions, where the ID lookups were occuring on every member of every compound element of a dataset. The code has now been refactored to use pointers internally and only create IDs for datatypes when necessary. Fixed a test issue in dt_arith where a library datatype conversion function was being cast to an application conversion function. Since the two have different prototypes, this started failing after the parameters for a library conversion function changed from hid_t to H5T_t * and an extra parameter was added. This appears to have worked coincidentally in the past since the only different between a library conversion function and application conversion function was an extra DXPL parameter at the end of an application conversion function Fixed an issue where memory wasn't being freed in the h5fc_chk_idx test program. Even though the program exits quickly after allocating the memory, it still causes failures when testing with -fsanitize=address
* | Add support for _Float16 16-bit floating point typeJordan Henderson2024-02-291-2/+26
|/
* Fix several spelling/grammar issues (#3621)jhendersonHDF2023-10-031-2/+2
|
* Convert hbool_t --> bool in src (#3496)Dana Robinson2023-09-051-7/+7
| | | | | | | | | | | * hbool_t --> bool in src * Does not remove TRUE/FALSE * Public header files are unchanged * Public API calls are unchanged * TRUE/FALSE --> true/false in src * Add deprecation notice for hbool_t
* Made HGOTO_ERROR a do-while loop (#3308)Sean McBride2023-08-021-74/+74
| | | | | * Made HGOTO_ERROR a do-while loop
* Another round of fixing -Wextra-semi-stmt warnings (#3264)Sean McBride2023-07-241-3/+3
| | | Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Remove programmer/date from comments (#3210)Dana Robinson2023-06-291-18/+0
| | | | * Removes Programmer: and Date: fields * Fixes a few Modifications: fields leftover from previous work
* Rename HDassert() to assert() (#3191)Dana Robinson2023-06-281-5/+5
| | | | | * Change HDassert to assert * Fix bin/make_err
* Update copyright headers (#2184)Larry Knox2022-11-011-1/+0
| | | | | * Updated source file copyright headers to remove "Copyright by the Board of Trustees of the University of Illinois", which is kept in the top-level COPYING file.
* Develop clang 13 format (#1933)Allen Byrne2022-07-261-11/+11
| | | | | * Update format source to clang 13 * More format changes
* Add a workaround for buggy PGI C Compiler version 19.10, which quits (#1705)David Young2022-05-081-4/+15
| | | | with the unhelpful and misleading error message `PGC-S-0053-Illegal use of void type` when I put a `static` qualifier on my tables.
* Replace H5detect's build-time detection of C99 integer properties with a (#1400)David Young2022-04-221-15/+336
| | | | | | | * Replace H5detect's build-time detection of C99 integer properties with a table-driven routine, `H5T__init_native_int()`, that is run at library initialization time.
* Removes the STATIC flavor of FUNC_ENTER macros (#1622)Dana Robinson2022-04-081-5/+5
| | | | | * Removes the STATIC flavor of FUNC_ENTER macros
* Fix some spelling. (#1402)David Young2022-01-281-3/+3
|
* Fixed Spelling Errors (#1166)Scot Breitenfeld2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixed missed closing of a dataset * fixed missed closing of a dataset * fixed typo in error return * Committing clang-format changes * minor edits * code format * Committing clang-format changes * code format * minor edit * switched from using MPI_count, to actual bytes written for H5FD_mpio_debug rw debugging * Committing clang-format changes * changed size_i in printf to reflect the I/O. * Committing clang-format changes * Fixed seg fault with xlf on BE with -qintsize=8 * fixed error function string * spelling corrections via codespell, added new spell check github actions * Committing clang-format changes * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * misc * Committing clang-format changes * misc * misc * misc * misc * misc * misc * Committing clang-format changes * misc * work around for https://github.com/codespell-project/codespell/issues/2137 * misc * added missing file * misc * misc. * misc * switch to using Codespell with GitHub Actions * misc. * misc. * fixed more sp errors * Fix new typos found by codespell. * fixed proceed with precede * fixed variable in fortran test * fixed minnum * updated spelling list Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
* Assume C99 fixed sized ints exist, use them (#470)Sean McBride2021-11-081-22/+1
| | | | | | | | | | | | | * Committing clang-format changes * Assume C99 fixed sized ints exist, use them * Assume H5_SIZEOF_LONG_DOUBLE != 0, `long double` has existed since C89 Note, this is only assuming that `long double` exists, no assumptions about its size have been touched. Didn't remove any code that does things like test if `long double` and `double` have different sizes. * Committing clang-format changes Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
* Update license url (#332)Larry Knox2021-02-171-1/+1
| | | | | | * Modify temporary rpath for testing in java example scripts. * Update URL in source file Copyright headers for web copy of COPYING file - src and test directories.
* Clang-format of source filesAllen Byrne2020-09-301-497/+516
|
* Fix comment formatting due to tabs conversionAllen Byrne2020-09-241-12/+12
|
* File changes to affect formattingAllen Byrne2020-09-041-38/+38
|
* Merge pull request #2325 in HDFFV/hdf5 from ~DYOUNG/werror:h5t_copy to developDavid Young2020-02-171-1/+1
|\ | | | | | | | | | | | | | | | | | | | | Merged per discussion with Elena. * commit '3f903a441ad84001ea66589728bd8b036b6fdfca': Take out the temporary performance tests. Make calls through a function pointer. Use the same number of arguments, always. Increase iterations, provide a baseline for no-op, simplify the overhead case a bit. Temporarily add some code that measures the time to run the simplest possible H5T__copy_all()-like routine 10 million times and then measures the version with FUNC_ENTER_STATIC/_LEAVE_NOAPI and a HGOTO_ERROR() statement. H5T_copy() constification plus Quincey's contributions.
| * H5T_copy() constification plus Quincey's contributions.David Young2020-01-291-1/+1
| |
* | Reduce differences between my -Werror branch and `develop`:David Young2020-01-291-9/+6
|/ | | | | | | | Rename index -> idx, fileno -> fnumber, fileno -> fno to avoid GCC shadowed declaration warnings about index(3). Convert #pragma GCC diagnostic push/pop/ignored to the HDF5 library's H5_GCC_DIAG_OFF()/H5_GCC_DIAG_ON() macros.
* Add new H5R API that abstracts object, region and attribute reference typesJerome Soumagne2019-10-081-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also support references to external files Add new H5T_REF type and type conversion routines Support conversion from H5T_REF_OBJ/DSET_REG to H5T_REF Add H5Treclaim() API to reclaim memory of vlen/reference types Deprecate H5Dvlen_reclaim() Fix H5T_vlen_reclaim() and H5T_reclaim() to use private callback Add H5T_ref_reclaim() Move previous H5R APIs to H5Rdeprec.c Clean up H5Ocopy Separate H5O_copy_expand_ref() to H5Ocopy_ref() Add support for copying new reference types Clean up deprecated routines to go through VOL and same code path Fix return codes in existing trefer.c test Rename trefer.c to trefer_deprec.c trefer.c is for new references Add performance test for trefer Add additional obj_copy_ref test Make use of tokens and blobs to store references Skip blob encoding for object references Start adding new reference examples
* Updated configure & CMake compiler flags for GCC 8.x, along with correspondingQuincey Koziol2019-06-281-0/+15
| | | | | changes to warnhist script (and some extra improvements for condensing C++ and Java warnings), and fixed a bunch of warnings.
* Move pragma statements outside of routines, to make older compilers happy.Quincey Koziol2019-06-241-12/+12
|
* Add support for GCC 7.x warnings, update warnhist script to account for them,Quincey Koziol2019-06-211-0/+12
| | | | clean up warnings.
* Added an H5MM_memcpy call that checks for buffer overlap.Dana Robinson2019-03-161-1/+1
|
* Cleanup API context function usage.Quincey Koziol2018-03-191-7/+0
|
* Add API context interface and use it throughout the library.Quincey Koziol2018-03-151-93/+100
|
* Merge pull request #426 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10 to ↵Larry Knox2017-04-251-6/+4
| | | | | | | | | | hdf5_1_10 * commit '54957d37f5aa73912763dbb6e308555e863c43f4': Commit copyright header change for src/H5PLpkg.c which was added after running script to make changes. Add new files in release_docs to MANIFEST. Cimmit changes to Makefile.in(s) and H5PL.c that resulted from running autogen.sh. Merge pull request #407 in HDFFV/hdf5 from ~LRKNOX/hdf5_lrk:hdf5_1_10_1 to hdf5_1_10_1 Change copyright headers to replace url referring to file to be removed and replace it with new url for COPYING file.
* [svn-r29057] added dxpl type checking when debug mode is enabled ↵Mohamad Chaarawi2016-02-071-2/+2
| | | | | | (H5_DEBUG_BUILD) tested on bb-8 with Serial and Parallel, debug and production builds.
* [svn-r27768] Description:Quincey Koziol2015-09-141-29/+5
| | | | | | | | | | | | | | | | | | | | | | Complete revamp of package initialization/shutdown mechanism in the library. Each package now has a single init/term routine. This new way should avoid packages being re-initialized during library shutdown and is also be _much_ more proactive about giving feedback for resource leaks internal to the library. Introduces a new "module" header file for packages in the library (e.g src/H5Fmodule.h) which sets up some necessary package configuration macros for the FUNC_ENTER/LEAVE macros. (The VFL drivers have their own slightly modified version of this header, src/H5FDdrvr_module.h) Also cleaned up a bunch of resources leaks all across the library and tests, along with addressing many warnings, as I encountered them. Tested on: MacOSX/64 10.10.5 (amazon) w/serial & parallel Linux/64 3.10.x (kituo) w/serial & parallel Linux/64 2.6.x (ostrich) w/serial
* [svn-r27045] Renamed H5_ASSIGN_OVERFLOW() to H5_CHECKED_ASSIGN() and re-orderedDana Robinson2015-05-101-3/+3
| | | | | | the arguments to be in a more logical order. Tested on: h5committest
* [svn-r26677] HDFFV-8957: h52gif crashes when run against one of our own ↵Albert Cheng2015-03-311-1/+1
| | | | | | | | | | | | | | | | examples The tool claimed it could handle 24bit images but there was no code to handle it. (or might be there were but was removed by previous revisions.) Also discovered that it does not accept multiple images nor -p for palette as its user document and online help message indicated. Solution: Added code to verify dimension sizes are within 8 bit raster images limit and added tests to verify the tools correctness. Need to update user document tool. Tested: h5committested.
* [svn-r23717] Description:Quincey Koziol2013-05-231-1/+1
| | | | | | | Fix return value from FAIL to NULL, to match the routines type. Tested on: Mac OSX/64 10.8.3 (amazon)
* [svn-r23713] Description:Quincey Koziol2013-05-211-24/+29
| | | | | | | | | | Clean up warnings, switch library code to use Standard C/POSIX wrapper macros, remove internal calls to API routines, update checkapi and checkposix scripts. Tested on: Mac OSX/64 10.8.3 (amazon) w/C++ & FORTRAN Big-Endian Linux/64 (ostrich)
* [svn-r22287] Description:Quincey Koziol2012-04-161-11/+11
| | | | | | | | Clean up more FUNC_ENTER/FUNC_LEAVE macros and move H5D & H5T code toward the final design (as exemplified by the H5EA & H5FA code). Tested on: Mac OSX/64 10.7.3 (amazon) w/debug & parallel
* [svn-r21919] Description:Quincey Koziol2012-02-091-7/+7
| | | | | | | | Refactor function name macros and simplify the FUNC_ENTER macros, to clear away the cruft and prepare for further cleanups. Tested on: Mac OSX/64 10.7.3 (amazon) w/debug, production & parallel
* [svn-r20065] Description:Quincey Koziol2011-02-081-164/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring changes from Coverity branch to trunk: r19975: Fixed potential mem leak at H5O_attr_open_by_name r19980: Fix coverity issue 792. Free tmp_env_prefix in H5Lexternal.c line 365 if it is not NULL but its contents are 0 when it goes out of scope. r20039: Eliminate warnings about nested extern and implicit declarations of parallel_print and address Coverity defects 712-781 by #including h5tools_utils.h in h5diff_array.c, h5diff_attr.c, h5diff_dset.c and h5diff_util.c. r20046: Purpose: Address TOCTOU warnings in h5jam and h5unjam Description: Coverity is afraid that the state of the input file could change between the call to stat() and the call to open(). This is called a time-of- check time-of-use (TOCTOU) vulnerability. Modified stat calls to fstat which uses an open file pointer so it (hopefully) won't complain any more. r20047: Addressed coverity issues 135-137, 462-464. Local pointers that needed to be freed in case of error were moved out of a switch statement in src/H5Tnative.c, set to NULL, and checked before freeing. Tested on: Mac OS X/32 10.6.6 (amazon) w/debug & production (h5committested on Coverity branch)
* [svn-r18657] I added some comments. No test is needed.Raymond Lu2010-04-281-2/+18
|
* [svn-r18648] In H5T_get_native_type of H5Tnative.c, I changed the way that ↵Raymond Lu2010-04-271-6/+10
| | | | | | | | | the offset, alignment, and size of nested compound type are calculated by using H5T_cmp_offset. The old way had a bug in it (see bug #1850). Tested on jam. I tested the same change for 1.8 on amani, linew, and jam.
* [svn-r18197] Description:Quincey Koziol2010-01-301-2/+2
| | | | | | | | | Trim trailing whitespace from source code files with this command: find . \( -name "*.[ch]" -or -name "*.cpp" -or -name "*.f90" \) -print |xargs -n 1 sed -i "" 's/[[:blank:]]*$//' Tested on: None - eyeballed only
* [svn-r18125] I added the support of bitfield in H5Tget_native_type. ↵Raymond Lu2010-01-201-72/+118
| | | | | | | | Bitfield is similar to unsigned integer. I also added a test. Tested on jam. But I tested the same change for 1.8 with h5committest.
* [svn-r16489] Fixed bug #1459 by eliminating the macro long_long and ↵Allen Byrne2009-02-181-4/+4
| | | | | | | | | | | replacing all instances with long long. Tested: h5comittest fedora 10 x64 Vista 32, VS2005, IVF101 XP32, Cygwin
* [svn-r15485] Purpose: Allow library to shut down properly when objects have ↵Neil Fortner2008-08-191-3/+3
| | | | | | | | | | | | | | | | reference count > 1. Description: Added a new field 'app_count' to H5I_id_info_t struct, to track the reference count on an id due to the application. the old 'count' field tracks the total. Generally any id visible to the application gets placed in app_count. Added app_ref boolean parameter to H5I_inc_ref, H5I_dec_ref, H5I_register, H5I_clear_type, and a few other functions, to specify whether the operation(s) being performed on the id(s) are due to the application (TRUE) or not (FALSE). Test added for this case. Tested: kagiso, smirom, linew (h5committest)
* [svn-r15227] Description:Quincey Koziol2008-06-171-1/+1
| | | | | | | | | | | | | | | | | | Small clean up of datatype copying. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (liberty) w/C++ & FORTRAN, in debug mode Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe, in debug mode Linux/64-amd64 2.6 (smirom) w/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.5.3 (amazon) in debug mode Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode