summaryrefslogtreecommitdiffstats
path: root/src/H5Shyper.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-12 16:32:23 (GMT)
committerGitHub <noreply@github.com>2023-10-12 16:32:23 (GMT)
commitea3f92605761e1ff17d858df303dc375df7efc1c (patch)
tree716311100f8d0f0dc77bca31245878546952aabc /src/H5Shyper.c
parent0feda66ff0dccdf77453b7c881c80be244e0ae12 (diff)
downloadhdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.zip
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.gz
hdf5-ea3f92605761e1ff17d858df303dc375df7efc1c.tar.bz2
1.14 sync with develop (#3660)
* Rework tools.cmake and add C flags (#3110) * Fix gh pages so that the doxygen files are uploaded (#3102) * Add workspace path * add debug * Make one job so workspace files are available * Put doxygen docs under docs folder in gh-pages * Fix a misc warning in test/vol.c (#3112) The compiler complains about using integers instead of size_t for some sizes. * Remove H5detect and H5make_libsettings (#3104) Removes H5detect and H5make_libsettings from the build and replaces their functionality with things that don't affect cross-compiling. H5detect --> floating-point types are now detected on library load H5make_libsettings --> Moved functionality to a new H5build_settings.c template file * clang-tidy clang-analyzer-core issues addressed (#3113) src/H5system.c:1293:13: warning: Dereference of null pointer [clang-analyzer-core.NullDereference] src/H5trace.c:4048:17: warning: Passed-by-value struct argument contains uninitialized data (e.g., via the field chain: 'initial.user') [clang-analyzer-core.CallAndMessage] * Add note for issue 3056 (#3117) * Use 1.14 toolchain (#3116) * Remove the checkposix script (#3122) This script was used to ensure that all non-HDF5 calls were prefixed with 'HD'. We are removing this scheme so this script is no longer needed. * Remove unused HD macros (#3120) * Remove unused HD macros The library prefixes most C and POSIX API calls with 'HD'. We are going to start removing these so the code looks like normal C. This PR removes most of the unused HD markup macros. * Replace ntohl/ntohs * Adds an optional version arg to bin/format_source (#3119) * Clean up mirror VFD code in utils dir (#3121) * Remove dead code * Replace mybzero with memset * Replace hbool_t/TRUE/FALSE with bool/true/false * Fix spelling issues flagged by codespell (#3130) * Make autogen.sh output message consistent (#3128) * Add Python for HDF-EOS zoo description (#3129) * Fix function name in comment in ros3 VFD (#3131) * Revert long double checks (#3133) * Revert "Remove long double conversion work-arounds (#3097)" This reverts commit 1e1dac1dac58fa18f6b7788346d1ba7d3315b0f9. * Update comments to reflect newer systems * Add java options to build scripts (#3127) * Add java options to build scripts Previously, cmakehdf5 turned on compiling of the java interface by default due to a value set in cacheinit.cmake. Now, consistent with how Fortran and CPP interfaces are handled, the script overwrites this default value to disable the libraries, fixing #2958. I also implemented the --enable-java/--disable java options for cmakehdf5, and -java for buildhdf5. Allen said these scripts should mention that compilers are to be specified in environment variables, but missing compilers causes errors at the CMake level, and CMake's error messages are already pretty informative (See the one in #2958 about JAVA_COMPILER). * Removed .lnt linter files (#3143) These were last usefully modified in 2004 * Fix path to libhdf5.settings in cmakehdf5 (#3140) * Many clang -Wextra-semi-stmt fixes (#2537) * Adds semicolons to function-like macros * Adds a do..while(0) loop to some macros * Removes semicolons when inappropriate, especially H5E_TRY_BEGIN/END * Remove HD prefix from network calls (#3142) HDsocket(), etc. Only affects the mirror VFD and its test code. * Remove hbool_t/TRUE/FALSE from java (#3145) Replaces with bool/true/false * CMake: (feature) ROS3 and cmake config file. (#3146) - Added a cmake variable to the hdf5-config.cmake file which indicate if the library has been build with or without the read-only S3 functionality. * Define minimal permissions for new GitHub workflows (#3147) * Track s3 i/o when S3COMMS_DEBUG enabled (#3139) * Track s3 i/o when S3COMMS_DEBUG enabled * Fix the snapshots workflow (#3148) * Add upload url as artifact * Change doxygen path and comment log-url upload * zip doxygen files for upload * add workspace var * chore: fix grammar (#3150) * chore: fix grammar * Removes the HD prefix from java C99 calls (#3149) POSIX calls (HDstrndup, etc.) are unchanged * Correct the zip usage (#3153) * Many fixes to various compiler warnings (#3124) * Fixed various -Wmissing-variable-declarations by adding static keyword * In a few cases, renamed the variable suffix from _g to _s. * Fixed some -Wmissing-variable-declarations by using different declaration macros * Fixed various -Wconditional-uninitialized warnings by just initializing variable to zero * Fixed various -Wcomma warnings * Fixed clang -Wstrict-prototypes warnings * Fixed various -Wunused-variable warnings * Updated some casts to fix the only 3 -Wcast-qual warnings * Fixed the only -Wsometimes-uninitialized warning * Create Security Policy (#3152) * Fix #1978 h5vers usage message. (#3162) Update Platforms Tested in RELEASE.txt. * speed-up building HDF5 (#3087) Disables building the tests when building the netCDF, etc. * Remove dead code behind #ifdef OLD_WAY (#3163) * Remove H5F_evict_tagged_metadata() (#3165) The rest of the library just calls H5AC_evict_tagged_metadata() directly. * Add missing space in zip command (#3167) * Fixed check for a VOL's async compatibility (#3164) * cap flag fix in test * added async comp. output * Update Linux workflows (#3173) * Consolidate environment setup * Turn on ros3 VFD in CMake (Linux only) * Add gh-pages doxygen link (#3175) * Fix the doxygen to gh pages and artifact creation (#3176) * Tidy the list of options in main.yml (#3181) * Remove HD/hbool_t from fortran (#3182) * Remove HD/hbool_t from high-level lib (#3183) * Remove HDva_(arg|copy|end|start) (#3184) * Drop HD prefix & hbool_t from H5TS (#3180) * Remove HD from fork/exec*/wait* (#3190) These are not C99 but are hidden behind ifdefs and are highly unlikely to ever have non-POSIX equivalents. * Fix assertion failure when attempting to use IOC VFD directly (#3187) * Rename HDqsort() to qsort() (#3193) * Rename HDqsort() to qsort() * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Rename HDpipe() to pipe() (#3192) Pipe is POSIX but implemented in Microsoft's CRT * Rename HDassert() to assert() (#3191) * Change HDassert to assert * Fix bin/make_err * Rename HD(f)printf() to (f)printf() (#3194) * Add note about HDF5_VOL_CONNECTOR to tools usage (#3159) * Rename HDsystem() to system() (#3197) system() is only used in the iopipe test and the things it calls (which are POSIX-y) are protected by an ifdef. * Remove HD from HDposix_memalign() (#3196) The posix_memalign call is only used in the direct VFD, which can only be built if posix_memalign() is available. * Remove HD from memory allocate/free calls (#3195) * HDcalloc * HDfree * HDmalloc * HDrealloc * chore: fix grammar (#3207) * docs: remove redundancy in Data Transfer section of user guide (#3208) * Remove checks for setsysinfo, which is unused (#3205) * Autotools * CMake * Remove HD from protected POSIX calls (#3203) These calls are non-C99 but protected by ifdefs and have no Windows equivalents: * HDalarm * HDasprintf * HDclock_gettime * HDfcntl * HDgethostname * HDgetrusage * HDsymlink * Rename HDato*() to ato*() (#3201) * Remove some "Programmer" comments (#3209) These are meaningless noise. Removes the "Programmer" lines on comment start lines: /* Programmer: John Smith These complicate my sed script that will rip out the rest of the comments. * Rename HDexit() and related to exit(), etc. (#3202) * HDatexit * HDexit * HD_exit * Remove HD from strto* calls (#3204) * HDstrtod * HDstrtol * HDstrtoll * HDstrtoul * HDstrtoull * HDstrtoumax * Remove HD from C std lib file ops (#3206) * HDfclose * HDferror * HDfeof * HDfflush * HDfopen * HDfread * HDfwrite * Remove programmer/date from comments (#3210) * Removes Programmer: and Date: fields * Fixes a few Modifications: fields leftover from previous work * Remove HD from HDmem* calls (#3211) * Remove HD from HDis* (e.g., isalpha) (#3212) * HDisalnum * HDisalpha * HDiscntrl * HDisdigit * HDisgraph * HDislower * HDisprint * HDispunct * HDisspace * HDisupper * HDisxdigit * Update actions for release option, fix branch for daily build (#3185) * Update actions for release option, fix branch for daily build * Scheduled workflows run on latest commit on the develop * Add snapshots location * docs: improve consistency in verb form (#3076) (#3188) * fix gh action if statements (#3213) * Adjust presets timeout and fix build script VS versions (#3215) * Several ros3vfd logging improvements * Committing clang-format changes * Update COPYING (#3231) Fixed old support URL. * addresses compilation fortran warnings on Frontier (#3236) * Fix doc for H5allocate_memory (#3240) * merge bbrelease to release (#3232) * merge bbrelease to release * Fix pre-req workflow * Replace support.hdfgroup.org URLs for alternative COPYING file (#3228) * Replace support.hdfgroup.org URLs for alternative COPYING file locations in copyright headers with https://www.hdfgroup.org/licenses. Replace support.hdfgroup.org URL for alternative COPYING_LBNL_HDF5 with github URL. Tweak chkcopyright script for change from UICOPYRIGHTSTR to THGCOPYRIGHTSTR. * Replace 1_10 reference with develop branch (#3227) * Switch CI to use release script (#3242) * Subfiling VFD source cleanup (#3241) * Subfiling VFD source cleanup Modularize Subfiling CMake code into separate CMakeLists.txt file Update Mercury util code to latest version and update Copyright Generate mercury_util_config.h header file instead of using pre-generated file Remove unnecessary Mercury functionality Fix minor warning in Subfiling VFD code * Remove Mercury headers from Autotools publicly-distributed header list * install h5fuse.sh in bin dir. (#3244) * Disable h5py until fixed properly without spack (#3243) * ROS3: (feature) Temporary security credentials (#3030) - Implemented support for AWS temporary security credentials. For this kind of credentials also a session/security token should be included in the request by adding the x-amz-security-token header. Co-authored-by: Larry Knox <lrknox@hdfgroup.org> Co-authored-by: Jordan Henderson <jhenderson@hdfgroup.org> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Avoid truncating at null byte when copying to std::string (#3083) --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix CMake builds when Subfiling VFD isn't enabled (#3250) * Fix CMake builds when Subfiling VFD isn't enabled * Add Subfiling VFD entry to hdf5-config.cmake.in * Fix some warnings in developer builds (#3247) * Fix some warnings in developer builds * Switch approach to Winline flag * Fixed more warnings about extra semicolons (#3249) * Require semi-colon after H5_CHECK_OVERFLOW calls Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix warning in H5C__UPDATE_STATS_FOR_DIRTY_PIN macro (#3259) Add braces to H5C__UPDATE_STATS_FOR_DIRTY_PIN macro to fix warning causing Werror Release builds to fail * Update DEFAULT_API_VERSION documentation for CMake (#3255) * Update DEFAULT_API_VERSION documentation for CMake * Fix hint --------- Co-authored-by: Larry Knox <lrknox@hdfgroup.org> * changed the scope of #ifdef DOXYGEN to now include H5D multi-functions (#3254) * Option changed but not all references (#3252) * Option changed but not all references * remove quotes from binary var * Move 1.12.3 release to October (#3263) * Fixed some -Wunused-variable warnings and one Wsometimes-uninitialized warning (#3260) * removed the use of encoded single apostrophe (#3261) * removed the use of encoded single apostrophe, and fix H5Dread_chunk from write to read * updated sanitizer paragraph * fixed brief description for H5Fget_info * ROS3: (fix) Replaced HDfprintf (#3266) - Replaced the HDfprintf() functions by fprintf() to be consistent with other parts of the library. * chore: make VRFY output consistent (#3268) * CMake: (fix) Threads dependency (#3267) - If the HDF5 library has been build with either thread-safety or subfiling VFD feature on it will have an additional dependency on a threading library. This dependency has been added to the hdf-config.cmake.in file. * chore: fix grammar - get hang -> get hung (#3272) * Another round of fixing -Wextra-semi-stmt warnings (#3264) Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * chore: fix typo - persent -> present (#3273) * Remove py-pip from h5py action (#3265) * Update release schedule (#3317) * Move 1.12.3 to November * Add 1.14.3 in October * Update README.md w/ 1.4.3 info (#3318) * Switch parallel compression to use vector I/O (#3245) Updates parallel compression feature to use vector I/O instead of creating and passing down MPI derived types to VFD * Fix incorrect error check in H5Ofill.c for undefined fill values (#3312) * Fix H5Otoken_to_str call in h5dump and other minor cleanup (#3314) * Fix loading plugin fails with missing directory GH issue #3248 (#3315) * Made HGOTO_ERROR a do-while loop (#3308) * Made HGOTO_ERROR a do-while loop * Update files to skip list and ignore_words_list (#3321) * Update files to skip list and ignore_words_list for codespell to not check files generated by autotools. Autotools generate misspellings that can't be fixed in HDF5 code. * Windows runtime items go into the bin folder (#3320) * A couple of documentation items to fix (#3332) * Fix h5repack for variable-length datatyped datasets (#3331) * Fix CVE-2018-11202 (#3330) A malformed file could result in chunk index memory leaks. Under most conditions (i.e., when the --enable-using-memchecker option is NOT used), this would result in a small memory leak and and infinite loop and abort when shutting down the library. The infinite loop would be due to the "free list" package not being able to clear its resources so the library couldn't shut down. When the "using a memory checker" option is used, the free lists are disabled so there is just a memory leak with no abort on library shutdown. The chunk index resources are now correctly cleaned up when reading misparsed files and valgrind confirms no memory leaks. * Fix CVE-2018-13867 (#3336) * Fixes the last of the -Wextra-semi-stmt warnings (#3326) * Fixed extra semi warning by adjusting alternative macro definitions * Find-replace H5E_END_TRY; -> H5E_END_TRY * Made H5Epush_goto a do-while loop, fixed indentation * Made GOTOERROR and ERRMSG do-while loops * Made Hgoto_error and Hgoto_done do-while loops * Made vrfy_cint_type and vrfy_ctype do-while loops * Made TEST_TYPE_CONTIG and others do-while loops * Removed extraneous semi-colons * Committing clang-format changes --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> * Fix a typo in RELEASE.txt * Fix assertion failure in H5D__mpio_collective_filtered_vec_io (#3340) * Make h5dump spacing consistent when printing VLEN datatype (#3351) * Fix for the bug exposed from running test/set_extent.c when selection… (#3319) * Fix for the bug exposed from running test/set_extent.c when selection I/O is enabled. This is a fix from Neil. The test/set_extent.c is modified to test for selection I/O enabled. * Add Fortran ES module to deploy list (#3341) * Add Fortran ES module to deploy list * Change fortran mod file export to use a list of names * test(parallel): verify FALSE case (#3356) * Implementation of the mpio driver with selection I/O. (#3222) * This changes the default selection I/O to on for MPIO. * Work around a testphdf5 failure on Cray MPICH machines (#3361) * set H5_PAC_C_MAX_REAL_PRECISION default to 0 when cross sompiling with (#3364) CMake to fix Fortran build failures. * Add RELEASE.txt notes for recent selection I/O work. (#3374) * Fix possible performance regression introduced with in-place type conversion in 1.14.2 (#3376) * Correct script (#3377) * Correct CI settings (#3384) * Correct CI settings * Correct plugin file name * restore CI tarball name prefix to match bin/release (#3385) * Fix assertion failure during file close on error (#3387) * Fix compile failures with H5C_DO_MEMORY_SANITY_CHECKS enabled (#3388) * Fix valgrind warning about write of uninitialized bytes (#3389) * Fix valgrind warning about write of uninitialized bytes in ScaleOffset filter (#3390) * Update presets, examples uncompress, szip cache (#3391) * Fix serial to parallel chunked dataset file space allocation bug (#3394) * chore: fix typo (#3405) * Fix for CVE-2016-4332 (#3406) This CVE issue was previously listed as fixed (via HDFFV-9950) back in 2016, but with no confirmation test. Now that test files exist for the 2016 Talos CVE issues, we found that CVE-2016-4332 can raise an assert in debug builds. This fix replaces the assert with pointer checks that don't raise errors or asserts. Since the function is in cleanup code, we do our best to close and free things, even when presented with partially- initialized structs. Fixes CVE-2016-4332 and HDFFV-9950 (confirmed via the cve_hdf5 repo) * Fix ph5diff tests for MPIEXEC_MAX_NUMPROCS=1 (#3407) * Enable szip by default in Autotools (#3412) Since libaec is so prevalent and BSD-licensed for both encode and decode, we build the szip filter by default when the szip or aec libraries are found. * Re-enable SZIP default to ON in CMake (#3414) The Autotools were handled in a separate commit * Fix Heap-buffer-overflow WRITE in H5MM_memcpy (#3368) * Add Intel oneAPI actions (#2949) (#2977) * ci: add Intel oneAPI actions (#2949) * ci: fix CMake installation * ci: use absolute paths for libtool installation * ci(oneAPI): update compiler versions and use cron * Add RELEASE.txt entry for compound performance regression fix (#3376) (#3416) * chore: remove gubbins comment (#3420) * Add other types and full type to enum/str/vlen dataformat for structblock[begin/end] (#3353) * Avoid H5Ocopy in h5repack for variable-length string types (#3419) * Skip atomicity tests for OpenMPI major versions < 5 (#3421) * Fix an issue with use of uninitialized memory in trefer_deprec.c test (#3422) * Add parallel examples in doxygen (#3413) * Fix use of uninitialized value in testpar/t_dset.c test (#3423) * Remove extraneous "33" in RELEASE.txt (#3425) * Revise file close assertion failure fix (#3418) * Remove intel oneapi warning (#3426) * Fix for CVE-2018-15671. h5stat -S $POC will result in a crash with segmenetation fault. (#3427) It is because the object in the testfile points back to the root group. When the tool tries to traverse the object, it goes back to the root group and then back again. * chore: match function call and VRFY() output (#3428) * Fix the Fortran extension used in example links (#3430) * Put H5T_CONV_ab macros in do..while loops (#3432) Ever since a recent round of macro cleanup, bin/trace and clang-format have been bickering over what H5Tconv.c should look like and neither produces readable code. This change puts the top-level H5T_CONV_ab macros in do..while loops, adds appropriate semicolons, and adds the missing H5_CLANG_DIAG_ON|OFF and H5_GCC_CLANG_DIAG_ON|OFF macros to the list of statement macros clang-format recognizes. H5Tconv.c is now readable and both bin/trace and clang-format are happy. * Convert some H5MM calls to standard C equivalents (#2382) * H5MM_calloc and malloc are now mapped to stdlib C calls * H5MM_memcpy now maps directly to memcpy in release builds * H5MM_memcpy is still implemented as a separate function that checks for buffer overlap when H5MM_DEBUG is defined (default w/ debug builds) * Switches many library memcpy calls to use H5MM_memcpy * Fixes a possible zero allocation in H5Olayout.c * Add 1.14.4 to the release schedule (#3434) * Output stderr file in CMake testing on failure (#3431) * Add Intel oneAPI badges (#3433) * Add a CVE regression test action (#3445) * * Disable SZIP for Intel oneAPI Action (#3449) * Disable SZIP for Intel oneAPI Action * Disable Fortran and parallel * Update VOL CMake for REST VOL (#3450) * Update VOL CMake for REST VOL * Prevent linking static libs to VOLs * Add an h5py badge to README.md (#3477) * Removed all the ranks printing out testing information (#3457) * Fix Subfiling VFD IOC assignment bug (#3456) * Correct java test dimension (#3482) * Support CMake VOL builds with FetchContent from local directory (#3455) * Update VOL CMake for REST VOL * Prevent linking static libs to VOLs * index on fetch_local: 5c5c3f1505 Prevent linking static libs to VOLs * index on (no branch): 9a36d3e7b1 On fetch_local: WIP:add source dir fetch option for vols * Allow building of VOL from local source * Move LOCAL_DIR option to HDF5_VOL_ALLOW_EXTERNAL * Fix the Fortran include dir in install config files (#3454) * Convert hbool_t --> bool in examples (#3492) * Fix some minor formatting for consistency (#3499) * Create scorecard.yml (#3508) Bring in OSSF Scorecard code scanner as a GitHub action * Convert hbool_t --> bool in testpar (#3495) * hbool_t/TRUE/FALSE --> bool/true/false in tools (#3491) * Convert hbool_t --> bool in test (#3494) * Convert hbool_t --> bool in src (#3496) * 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 * Added new Fortran API wrappers (#3511) * Added new wrappers for h5get_free_list_sizes_f H5Sselect_intersect_block_f H5Sselect_shape_same_f h5pget_no_selection_io_cause_f h5pget_mpio_no_collective_cause_f H5Lvisit_by_name_f H5Lvisit_f H5Fget_info_f h5dwrite_chunk_f h5dread_chunk_f * added h5pget_file_space_page_size_f, h5pset_file_space_page_size_f, h5pget_file_space_strategy_f, h5pset_file_space_strategy_f, h5info tests * added fortran tests * Update tH5F.F90 * misc. fortran fixes for failing CI dailty tests (#3523) * fixed H5Lvisit* interface * changed integer type for direct write * Consistent initialization of hid_t in the tests (#3521) * Fix windows cpack with debug (#3525) * Add missing row for the ROS3 VFD in table #3415 (#3517) * fixed nvidia compiler issue (#3527) * Identify functions in a subgroup (#3530) * quiet warning on sunspot (gcc 11.2.0) (#3534) * Add API examples doxygen page (#3500) * removed C_INT32_T from Fortran APIs (#3537) * Add NVHPC 23.7 GitHub Actions (#3509) * Add NVHPC 27.3 GitHub Actions * Address @derobins review * Remove HD prefix from math functions (#3538) * Remove HD prefix from HDlog10 calls (#3539) Was missed in a previous commit and causes building subfiling to fail. * fixed arg to C H5Dwrite_chunk (#3541) * Strip HD prefix from string/char C API calls (#3540) * Strip HD prefix from string/char C API calls * HD(f)(put|get)(s|c) * HDstr* * HDv*printf * HD(s)(print|scan)f * HDperror But NOT: * HDstrcase* * HDvasprintf * HDstrtok_r * HDstrndup As those are not C99 and have portability work-around implementations. They will be handled later. * Fix th5_system.c screwup * Convert main.yml CI into callable workflows (#3529) * Fix broken URL. (#3546) * Fix grammar (#3545) * Update oneAPI-C/A badge yml links. (#3564) * Check return values from HDF5 API calls. (#3556) * Adds link to h5fuse.sh in testpar for autotools (#3557) * Make the h5fuse.sh utility available to parallel subfiling tests so h5fuse testing is not skipped. * Some minor formatting and text changes (#3563) * Fix typos and grammar in t_pread. (#3565) * Fix typo (givin->given) in test/testframe.c. (#3567) * Fix ifx unused variable hdferr warning. (#3568) * Correct comments about H5Z_FILTER_NONE (#3572) * Update release script. (#3577) * fixed function declaration (#3579) * Fixed GH-3554 (#3584) Removed the extra condition * Remove h5dwalk.1 man page. (#3589) * Removed the use of -commons linking option on Darwin (#3581) Removed the use of -commons linking option on Darwin as COMMON and EQUIVALENCE is no long used * Fix docs for H5Pset_dxpl_mpio_collective_opt() (#3594) * Fix typo: arange->arrange in src/H5Cmpio.c. (#3597) * Fix docs for H5Acreate2 and H5Acreate_by_name (#3598) * Use HDoff_t with lseek consistently (#3600) lseek on Windows uses __int64 for both the offset and return type instead of off_t like most POSIX systems. This changes ensures we use HDoff_t (which is typdef'd correctly on Windows) w/ lseek. * Replaces HDgetenv with getenv (#3599) * Develop tools move (#3580) Reorganizes the tools files to support the VOL tests * Clean up Subfiling VFD header doxygen formatting (#3601) * Remove `sh` to run bash script. (#3590) * Correct path name of ddl file to be changed (#3607) * Fix potential uninitialized variable (#3602) Moves a union initialization up a bit so it's performed before code that can jump to the cleanup target, where file descriptors could be checked without being initialized. This could only happen in test code and only in an out-of-memory situation. Fixes Coverity 1542254 * Remove unnecessary assignment in test generator (#3603) Fixes what looks like a copy/paste/modify error in the format convert test file generator, where an array element is assigned one value and them immediately overwritten by another value. Fixes Coverity issue 1542285 * Remove useless define TRUE/FALSE statements. (#3604) * Fix typo behaviour and dependes. (#3605) * Fix typos (#3609) * Fixed unused variable in H5CS.c (#3552) (#3612) * Fixed #3552 * Fix grammar (#3614) * Cleanup unused statements (#3553) (#3617) Removed unnecessary assert statements and noise comments. * Fix Intel oneAPI icc warning (#3619) * Fix several spelling/grammar issues (#3621) * Add HPC CDash to README.md (#3623) * Disable static + thread-safe on Windows w/ CMake (#3622) The thread-safety feature on Windows requires a hook in DllMain() and thus is only available when HDF5 is built as a shared library. This was previously a warning, but has now been elevated to a fatal error that cannot be overridden with ALLOW_UNSUPPORTED. Fixes GitHub #3613 * Remove unused member from H5D_shared_t struct. (#3628) * Remove old EXTERNALPROJECT_ADD in favor of FETCH_CONTENT (#3624) * Fix grammar (#3635) * Disambiguate error output messages. (#3634) * Disambiguate error output messages. * Address @brtnfld review. * Fail CMake on Windows when sub-filing VFD is enabled (#3636) * Improve consistency in past tense usage (#3638) * Split out test logic to separate file (#3639) * Drop MPI-2 support (#3643) * Switch IEEE flags for NAG Fortran (#3644) Default is -ieee=stop, which causes problems when the H5T module performs floating-point type introspection. The new mode is -ieee=full * Remove 1.10.11 info from README.md (#3646) * Fixes GH#1027 compilation error (#3654) * Remove 1.10 badge (#3650) * Use real URLs and updated names for plugins (#3651) * synchronize TGZ naming convention/usage * Update parallel compression feature to support multi-dataset I/O (#3591) * Add more tests for selection I/O. (#3528) * Adjust 1.14 files after merging ---------
Diffstat (limited to 'src/H5Shyper.c')
-rw-r--r--src/H5Shyper.c555
1 files changed, 277 insertions, 278 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 9b69926..ebfb4ef 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -50,7 +50,7 @@
if (recover) { \
if (H5S__hyper_free_span(curr_span) < 0) \
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTFREE, ERR, "unable to free span"); \
- (recover) = FALSE; \
+ (recover) = false; \
} \
\
/* Set the current span to saved next span */ \
@@ -94,7 +94,7 @@ typedef struct {
hsize_t skip; /* Number of elements to skip in projected space */
hsize_t nelem; /* Number of elements to add to projected space (after skip) */
uint64_t op_gen; /* Operation generation for counting elements */
- hbool_t share_selection; /* Whether span trees in dst_space can be shared with proj_space */
+ bool share_selection; /* Whether span trees in dst_space can be shared with proj_space */
} H5S_hyper_project_intersect_ud_t;
/* Assert that H5S_MAX_RANK is <= 32 so our trick with using a 32 bit bitmap
@@ -113,7 +113,7 @@ static H5S_hyper_span_info_t *H5S__hyper_new_span_info(unsigned rank);
static H5S_hyper_span_info_t *H5S__hyper_copy_span_helper(H5S_hyper_span_info_t *spans, unsigned rank,
unsigned op_info_i, uint64_t op_gen);
static H5S_hyper_span_info_t *H5S__hyper_copy_span(H5S_hyper_span_info_t *spans, unsigned rank);
-static hbool_t H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1,
+static bool H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1,
const H5S_hyper_span_info_t *span_info2);
static herr_t H5S__hyper_free_span_info(H5S_hyper_span_info_t *span_info);
static herr_t H5S__hyper_free_span(H5S_hyper_span_t *span);
@@ -138,10 +138,10 @@ static H5S_hyper_span_info_t *H5S__hyper_make_spans(unsigned rank, const hsize_t
static herr_t H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op,
const H5S_hyper_dim_t *new_hyper_diminfo);
static herr_t H5S__hyper_generate_spans(H5S_t *space);
-static hbool_t H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1,
+static bool H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1,
const H5S_hyper_span_info_t *spans2);
static herr_t H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *space2_span_lst,
- hbool_t can_own_span2, hbool_t *span2_owned, hbool_t *updated_spans,
+ bool can_own_span2, bool *span2_owned, bool *updated_spans,
H5S_t **result);
static herr_t H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[],
const hsize_t stride[], const hsize_t count[], const hsize_t block[]);
@@ -163,17 +163,16 @@ static herr_t H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_
unsigned depth, H5S_hyper_project_intersect_ud_t *udata);
static void H5S__hyper_get_clip_diminfo(hsize_t start, hsize_t stride, hsize_t *count, hsize_t *block,
hsize_t clip_size);
-static hsize_t H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices,
- hbool_t incl_trail);
+static hsize_t H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, bool incl_trail);
/* Selection callbacks */
-static herr_t H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection);
+static herr_t H5S__hyper_copy(H5S_t *dst, const H5S_t *src, bool share_selection);
static herr_t H5S__hyper_release(H5S_t *space);
static htri_t H5S__hyper_is_valid(const H5S_t *space);
static hsize_t H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans);
static hssize_t H5S__hyper_serial_size(H5S_t *space);
static herr_t H5S__hyper_serialize(H5S_t *space, uint8_t **p);
-static herr_t H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip);
+static herr_t H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip);
static herr_t H5S__hyper_bounds(const H5S_t *space, hsize_t *start, hsize_t *end);
static herr_t H5S__hyper_offset(const H5S_t *space, hsize_t *offset);
static int H5S__hyper_unlim_dim(const H5S_t *space);
@@ -609,17 +608,17 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
for (u = (rank - 1); u > 0; u--) {
if (tdiminfo[u].count == 1 && tdiminfo[u].block == mem_size[u]) {
cont_dim++;
- iter->u.hyp.flattened[u] = TRUE;
+ iter->u.hyp.flattened[u] = true;
} /* end if */
else
- iter->u.hyp.flattened[u] = FALSE;
+ iter->u.hyp.flattened[u] = false;
} /* end for */
- iter->u.hyp.flattened[0] = FALSE;
+ iter->u.hyp.flattened[0] = false;
} /* end if */
/* Check if the regular selection can be "flattened" */
if (cont_dim > 0) {
- hbool_t last_dim_flattened = TRUE; /* Flag to indicate that the last dimension was flattened */
+ bool last_dim_flattened = true; /* Flag to indicate that the last dimension was flattened */
unsigned flat_rank = rank - cont_dim; /* Number of dimensions after flattening */
unsigned curr_dim; /* Current dimension */
@@ -635,7 +634,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
acc *= mem_size[i];
/* Indicate that the dimension was flattened */
- last_dim_flattened = TRUE;
+ last_dim_flattened = true;
} /* end if */
else {
if (last_dim_flattened) {
@@ -653,7 +652,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
iter->u.hyp.sel_off[curr_dim] = iter->sel_off[i] * (hssize_t)acc;
/* Reset the "last dim flattened" flag to avoid flattened any further dimensions */
- last_dim_flattened = FALSE;
+ last_dim_flattened = false;
/* Reset the "accumulator" for possible further dimension flattening */
acc = 1;
@@ -698,7 +697,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
} /* end else */
/* Flag the diminfo information as valid in the iterator */
- iter->u.hyp.diminfo_valid = TRUE;
+ iter->u.hyp.diminfo_valid = true;
/* Initialize irregular region information also (for release) */
iter->u.hyp.spans = NULL;
@@ -750,7 +749,7 @@ H5S__hyper_iter_init(H5S_t *space, H5S_sel_iter_t *iter)
slab_size = iter->dims;
/* Flag the diminfo information as not valid in the iterator */
- iter->u.hyp.diminfo_valid = FALSE;
+ iter->u.hyp.diminfo_valid = false;
} /* end else */
/* Compute the cumulative size of dataspace dimensions */
@@ -932,7 +931,7 @@ H5S__hyper_iter_nelmts(const H5S_sel_iter_t *iter)
htri_t H5S__hyper_iter_has_next_block(iter)
const H5S_sel_iter_t *iter; IN: Pointer to selection iterator
RETURNS
- Non-negative (TRUE/FALSE) on success/Negative on failure
+ Non-negative (true/false) on success/Negative on failure
DESCRIPTION
Check if there is another block available in the selection iterator.
GLOBAL VARIABLES
@@ -944,7 +943,7 @@ static H5_ATTR_PURE htri_t
H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
{
unsigned u; /* Local index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -964,14 +963,14 @@ H5S__hyper_iter_has_next_block(const H5S_sel_iter_t *iter)
if (tdiminfo[u].count == 1)
continue;
if (toff[u] != (tdiminfo[u].start + ((tdiminfo[u].count - 1) * tdiminfo[u].stride)))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end for */
} /* end if */
else {
/* Check for any levels of the tree with more sequences in them */
for (u = 0; u < iter->rank; u++)
if (iter->u.hyp.span[u]->next != NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end else */
done:
@@ -2604,7 +2603,7 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
const hssize_t *sel_off; /* Selection offset in dataspace */
unsigned ndims; /* Number of dimensions of dataset */
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
- hbool_t single_block; /* Whether the selection is a single block */
+ bool single_block; /* Whether the selection is a single block */
unsigned u; /* Local index variable */
/* Set a local copy of the diminfo pointer */
@@ -2695,10 +2694,10 @@ H5S__hyper_iter_get_seq_list(H5S_sel_iter_t *iter, size_t maxseq, size_t maxelem
} /* end else */
/* Check for a single block selected */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < ndims; u++)
if (1 != tdiminfo[u].count) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -2985,11 +2984,11 @@ done:
PURPOSE
Check if two hyperslab span trees are the same
USAGE
- hbool_t H5S__hyper_cmp_spans(span1, span2)
+ bool H5S__hyper_cmp_spans(span1, span2)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to the same
selection. If span1 & span2 are both NULL, that counts as equal.
@@ -2998,10 +2997,10 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_span_info_t *span_info2)
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3009,16 +3008,16 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
if (span_info1 != span_info2) {
/* Check for one span being NULL */
if (span_info1 == NULL || span_info2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Compare low & high bounds for this span list */
/* (Could compare lower dimensions also, but not certain if
* that's worth it. - QAK, 2019/01/23)
*/
if (span_info1->low_bounds[0] != span_info2->low_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if (span_info1->high_bounds[0] != span_info2->high_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
const H5S_hyper_span_t *span1;
const H5S_hyper_span_t *span2;
@@ -3035,19 +3034,19 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
while (1) {
/* Check for both spans being NULL */
if (span1 == NULL && span2 == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
else {
/* Check for one span being NULL */
if (span1 == NULL || span2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Check if the actual low & high span information is the same */
if (span1->low != span2->low || span1->high != span2->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
if (span1->down != NULL || span2->down != NULL) {
if (!H5S__hyper_cmp_spans(span1->down, span2->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -3067,7 +3066,7 @@ H5S__hyper_cmp_spans(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_sp
} /* end else */
} /* end if */
- /* Fall through, with default return value of 'TRUE' if spans were already visited */
+ /* Fall through, with default return value of 'true' if spans were already visited */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -3184,7 +3183,7 @@ done:
herr_t H5S__hyper_copy(dst, src, share_selection)
H5S_t *dst; OUT: Pointer to the destination dataspace
H5S_t *src; IN: Pointer to the source dataspace
- hbool_t; IN: Whether to share the selection between the dataspaces
+ bool; IN: Whether to share the selection between the dataspaces
RETURNS
Non-negative on success, negative on failure
DESCRIPTION
@@ -3201,7 +3200,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_copy(H5S_t *dst, const H5S_t *src, hbool_t share_selection)
+H5S__hyper_copy(H5S_t *dst, const H5S_t *src, bool share_selection)
{
H5S_hyper_sel_t *dst_hslab; /* Pointer to destination hyperslab info */
const H5S_hyper_sel_t *src_hslab; /* Pointer to source hyperslab info */
@@ -3260,7 +3259,7 @@ done:
htri_t H5S__hyper_is_valid(space);
H5S_t *space; IN: Dataspace pointer to query
RETURNS
- TRUE if the selection fits within the extent, FALSE if it does not and
+ true if the selection fits within the extent, false if it does not and
Negative on an error.
DESCRIPTION
Determines if the current selection at the current offset fits within the
@@ -3275,7 +3274,7 @@ H5S__hyper_is_valid(const H5S_t *space)
{
const hsize_t *low_bounds, *high_bounds; /* Pointers to the correct pair of low & high bounds */
unsigned u; /* Counter */
- htri_t ret_value = TRUE; /* return value */
+ htri_t ret_value = true; /* return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -3283,7 +3282,7 @@ H5S__hyper_is_valid(const H5S_t *space)
/* Check for unlimited selection */
if (space->select.sel_info.hslab->unlim_dim >= 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check which set of low & high bounds we should be using */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
@@ -3299,9 +3298,9 @@ H5S__hyper_is_valid(const H5S_t *space)
for (u = 0; u < space->extent.rank; u++) {
/* Bounds check the selected point + offset against the extent */
if (((hssize_t)low_bounds[u] + space->select.offset[u]) < 0)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if ((high_bounds[u] + (hsize_t)space->select.offset[u]) >= space->extent.size[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end for */
done:
@@ -3422,7 +3421,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
USAGE
hsize_t H5S__get_select_hyper_nblocks(space, app_ref)
H5S_t *space; IN: Dataspace ptr of selection to query
- hbool_t app_ref; IN: Whether this is an appl. ref. call
+ bool app_ref; IN: Whether this is an appl. ref. call
RETURNS
The number of hyperslab blocks in selection on success, negative on failure
DESCRIPTION
@@ -3433,7 +3432,7 @@ H5S__hyper_span_nblocks(H5S_hyper_span_info_t *spans)
REVISION LOG
--------------------------------------------------------------------------*/
static hsize_t
-H5S__get_select_hyper_nblocks(const H5S_t *space, hbool_t app_ref)
+H5S__get_select_hyper_nblocks(const H5S_t *space, bool app_ref)
{
hsize_t ret_value = 0; /* Return value */
@@ -3493,7 +3492,7 @@ H5Sget_select_hyper_nblocks(hid_t spaceid)
HGOTO_ERROR(H5E_DATASPACE, H5E_UNSUPPORTED, FAIL,
"cannot get number of blocks for unlimited selection");
- ret_value = (hssize_t)H5S__get_select_hyper_nblocks(space, TRUE);
+ ret_value = (hssize_t)H5S__get_select_hyper_nblocks(space, true);
done:
FUNC_LEAVE_API(ret_value)
@@ -3573,8 +3572,8 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
{
hsize_t bounds_start[H5S_MAX_RANK]; /* Starting coordinate of bounding box */
hsize_t bounds_end[H5S_MAX_RANK]; /* Opposite coordinate of bounding box */
- hbool_t count_up_version = FALSE; /* Whether number of blocks exceed H5S_UINT32_MAX */
- hbool_t bound_up_version = FALSE; /* Whether high bounds exceed H5S_UINT32_MAX */
+ bool count_up_version = false; /* Whether number of blocks exceed H5S_UINT32_MAX */
+ bool bound_up_version = false; /* Whether high bounds exceed H5S_UINT32_MAX */
H5F_libver_t low_bound; /* The 'low' bound of library format versions */
H5F_libver_t high_bound; /* The 'high' bound of library format versions */
htri_t is_regular; /* A regular hyperslab or not */
@@ -3594,11 +3593,11 @@ H5S__hyper_get_version_enc_size(H5S_t *space, hsize_t block_count, uint32_t *ver
/* Determine whether the number of blocks or the high bounds in the selection exceed (2^32 - 1) */
if (block_count > H5S_UINT32_MAX)
- count_up_version = TRUE;
+ count_up_version = true;
else {
for (u = 0; u < space->extent.rank; u++)
if (bounds_end[u] > H5S_UINT32_MAX) {
- bound_up_version = TRUE;
+ bound_up_version = true;
break;
} /* end if */
} /* end else */
@@ -3735,7 +3734,7 @@ H5S__hyper_serial_size(H5S_t *space)
/* Determine the number of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
- block_count = H5S__get_select_hyper_nblocks(space, FALSE);
+ block_count = H5S__get_select_hyper_nblocks(space, false);
/* Determine the version and the encoded size */
if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0)
@@ -3953,8 +3952,8 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned ndims; /* Rank of the dataspace */
unsigned u; /* Local counting variable */
- hbool_t complete = FALSE; /* Whether we are done with the iteration */
- hbool_t is_regular; /* Whether selection is regular */
+ bool complete = false; /* Whether we are done with the iteration */
+ bool is_regular; /* Whether selection is regular */
uint8_t enc_size; /* Encoded size */
herr_t ret_value = SUCCEED; /* return value */
@@ -3972,7 +3971,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Calculate the # of blocks */
if (space->select.sel_info.hslab->unlim_dim < 0) /* ! H5S_UNLIMITED */
- block_count = H5S__get_select_hyper_nblocks(space, FALSE);
+ block_count = H5S__get_select_hyper_nblocks(space, false);
/* Determine the version and the encoded size */
if (H5S__hyper_get_version_enc_size(space, block_count, &version, &enc_size) < 0)
@@ -4086,7 +4085,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
} /* end for */
/* Go iterate over the hyperslabs */
- while (complete == FALSE) {
+ while (complete == false) {
/* Iterate over the blocks in the fastest dimension */
while (tmp_count[fast_dim] > 0) {
/* Add 8 bytes times the rank for each hyperslab selected */
@@ -4116,7 +4115,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Bubble up the decrement to the slower changing dimensions */
temp_dim = (int)fast_dim - 1;
- while (temp_dim >= 0 && complete == FALSE) {
+ while (temp_dim >= 0 && complete == false) {
/* Decrement the block count */
tmp_count[temp_dim]--;
@@ -4126,7 +4125,7 @@ H5S__hyper_serialize(H5S_t *space, uint8_t **p)
/* Check for getting out of iterator */
if (temp_dim == 0)
- complete = TRUE;
+ complete = true;
/* Reset the block count in this dimension */
tmp_count[temp_dim] = diminfo[temp_dim].count;
@@ -4215,7 +4214,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static herr_t
-H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, hbool_t skip)
+H5S__hyper_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size, bool skip)
{
H5S_t *tmp_space = NULL; /* Pointer to actual dataspace to use,
either *space or a newly allocated one */
@@ -4657,7 +4656,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
hsize_t end[H5S_MAX_RANK]; /* End of elements in dataspace */
unsigned fast_dim; /* Rank of the fastest changing dimension for the dataspace */
unsigned ndims; /* Rank of the dataspace */
- hbool_t done; /* Whether we are done with the iteration */
+ bool done; /* Whether we are done with the iteration */
unsigned u; /* Counter */
/* Set some convenience values */
@@ -4687,7 +4686,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
} /* end for */
/* We're not done with the iteration */
- done = FALSE;
+ done = false;
/* Go iterate over the hyperslabs */
while (!done && numblocks > 0) {
@@ -4757,7 +4756,7 @@ H5S__get_select_hyper_blocklist(H5S_t *space, hsize_t startblock, hsize_t numblo
/* Check for getting out of iterator */
if (temp_dim == 0)
- done = TRUE;
+ done = true;
/* Wrapped a dimension, go up to next dimension */
temp_dim--;
@@ -5110,7 +5109,7 @@ done:
htri_t H5S__hyper_is_contiguous(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is contiguous.
This is primarily used for reading the entire selection in one swoop.
@@ -5122,10 +5121,10 @@ done:
static H5_ATTR_PURE htri_t
H5S__hyper_is_contiguous(const H5S_t *space)
{
- hbool_t small_contiguous, /* Flag for small contiguous block */
+ bool small_contiguous, /* Flag for small contiguous block */
large_contiguous; /* Flag for large contiguous block */
unsigned u; /* index variable */
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5151,31 +5150,31 @@ H5S__hyper_is_contiguous(const H5S_t *space)
*/
/* Initialize flags */
- large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */
- small_contiguous = FALSE; /* assume false initially */
+ large_contiguous = true; /* assume true and reset if the dimensions don't match */
+ small_contiguous = false; /* assume false initially */
/* Check for a "large contiguous" block */
for (u = 0; u < space->extent.rank; u++) {
if (diminfo[u].count > 1) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
if (u > 0 && diminfo[u].block != space->extent.size[u]) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
} /* end for */
/* If we didn't find a large contiguous block, check for a small one */
if (!large_contiguous) {
- small_contiguous = TRUE;
+ small_contiguous = true;
for (u = 0; u < space->extent.rank; u++) {
if (diminfo[u].count > 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
if (u < (space->extent.rank - 1) && diminfo[u].block != 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
} /* end for */
@@ -5183,7 +5182,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Indicate true if it's either a large or small contiguous block */
if (large_contiguous || small_contiguous)
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
else {
H5S_hyper_span_info_t *spans; /* Hyperslab span info node */
@@ -5197,8 +5196,8 @@ H5S__hyper_is_contiguous(const H5S_t *space)
* block size must be 1 in all but the fastest changing dimension.
*/
/* Initialize flags */
- large_contiguous = TRUE; /* assume true and reset if the dimensions don't match */
- small_contiguous = FALSE; /* assume false initially */
+ large_contiguous = true; /* assume true and reset if the dimensions don't match */
+ small_contiguous = false; /* assume false initially */
/* Get information for slowest changing information */
spans = space->select.sel_info.hslab->span_lst;
@@ -5206,7 +5205,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* If there are multiple spans in the slowest changing dimension, the selection isn't contiguous */
if (span->next != NULL)
- large_contiguous = FALSE;
+ large_contiguous = false;
else {
/* Now check the rest of the dimensions */
if (span->down != NULL) {
@@ -5221,14 +5220,14 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
else {
/* If this span doesn't cover the entire dimension, then this selection isn't
* contiguous */
if (((span->high - span->low) + 1) != space->extent.size[u]) {
- large_contiguous = FALSE;
+ large_contiguous = false;
break;
} /* end if */
else {
@@ -5245,7 +5244,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* If we didn't find a large contiguous block, check for a small one */
if (!large_contiguous) {
- small_contiguous = TRUE;
+ small_contiguous = true;
/* Get information for slowest changing information */
spans = space->select.sel_info.hslab->span_lst;
@@ -5260,14 +5259,14 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
else {
/* If this span doesn't cover the entire dimension, then this selection isn't contiguous
*/
if (u < (space->extent.rank - 1) && ((span->high - span->low) + 1) != 1) {
- small_contiguous = FALSE;
+ small_contiguous = false;
break;
} /* end if */
else {
@@ -5283,7 +5282,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
/* Indicate true if it's either a large or small contiguous block */
if (large_contiguous || small_contiguous)
- ret_value = TRUE;
+ ret_value = true;
} /* end else */
FUNC_LEAVE_NOAPI(ret_value)
@@ -5298,7 +5297,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
htri_t H5S__hyper_is_single(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in the dataspace is a single block.
This is primarily used for reading the entire selection in one swoop.
@@ -5310,7 +5309,7 @@ H5S__hyper_is_contiguous(const H5S_t *space)
static H5_ATTR_PURE htri_t
H5S__hyper_is_single(const H5S_t *space)
{
- htri_t ret_value = TRUE; /* return value */
+ htri_t ret_value = true; /* return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5331,7 +5330,7 @@ H5S__hyper_is_single(const H5S_t *space)
/* Check for a single block */
for (u = 0; u < space->extent.rank; u++)
if (space->select.sel_info.hslab->diminfo.opt[u].count > 1)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else {
H5S_hyper_span_info_t *spans; /* Hyperslab span info node */
@@ -5350,7 +5349,7 @@ H5S__hyper_is_single(const H5S_t *space)
/* Check that this is the only span and it spans the entire dimension */
if (span->next != NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else
/* Walk down to the next span */
spans = span->down;
@@ -5370,7 +5369,7 @@ done:
htri_t H5S__hyper_is_regular(space)
H5S_t *space; IN: Dataspace pointer to check
RETURNS
- TRUE/FALSE/FAIL
+ true/false/FAIL
DESCRIPTION
Checks to see if the current selection in a dataspace is the a regular
pattern.
@@ -5398,9 +5397,9 @@ H5S__hyper_is_regular(H5S_t *space)
/* Only simple check for regular hyperslabs for now... */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES)
- ret_value = TRUE;
+ ret_value = true;
else
- ret_value = FALSE;
+ ret_value = false;
FUNC_LEAVE_NOAPI(ret_value)
} /* end H5S__hyper_is_regular() */
@@ -5411,15 +5410,15 @@ H5S__hyper_is_regular(H5S_t *space)
PURPOSE
Helper routine to check if two hyperslab span trees are the same shape
USAGE
- hbool_t H5S__hyper_spans_shape_same_helper(span1, span2, offset, rest_zeros)
+ bool H5S__hyper_spans_shape_same_helper(span1, span2, offset, rest_zeros)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
hssize_t offset[]; IN: Offset between the span trees
- hbool_t rest_zeros[]; IN: Array of flags which indicate
+ bool rest_zeros[]; IN: Array of flags which indicate
the rest of the offset[] array
is zero values.
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to a selection
with the same shape, with a possible (constant) offset between their
@@ -5430,12 +5429,12 @@ H5S__hyper_is_regular(H5S_t *space)
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
const H5S_hyper_span_info_t *span_info2, hssize_t offset[],
- hbool_t rest_zeros[])
+ bool rest_zeros[])
{
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5450,9 +5449,9 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
* that's worth it. - QAK, 2019/01/23)
*/
if ((hsize_t)((hssize_t)span_info1->low_bounds[0] + offset[0]) != span_info2->low_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else if ((hsize_t)((hssize_t)span_info1->high_bounds[0] + offset[0]) != span_info2->high_bounds[0])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
const H5S_hyper_span_t *span1;
const H5S_hyper_span_t *span2;
@@ -5469,23 +5468,23 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
while (1) {
/* Check for both spans being NULL */
if (span1 == NULL && span2 == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Check for one span being NULL */
if (span1 == NULL || span2 == NULL)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check if the actual low & high span information is the same */
if ((hsize_t)((hssize_t)span1->low + offset[0]) != span2->low ||
(hsize_t)((hssize_t)span1->high + offset[0]) != span2->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check for down tree for this span */
if (span1->down != NULL || span2->down != NULL) {
/* If the rest of the span trees have a zero offset, use the faster comparison routine */
if (rest_zeros[0]) {
if (!H5S__hyper_cmp_spans(span1->down, span2->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -5493,7 +5492,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
else {
if (!H5S__hyper_spans_shape_same_helper(span1->down, span2->down, &offset[1],
&rest_zeros[1]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
else {
/* Keep going... */
} /* end else */
@@ -5509,7 +5508,7 @@ H5S__hyper_spans_shape_same_helper(const H5S_hyper_span_info_t *span_info1,
} /* end while */
} /* end else */
- /* Fall through, with default return value of 'TRUE' if spans were already visited */
+ /* Fall through, with default return value of 'true' if spans were already visited */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5521,11 +5520,11 @@ done:
PURPOSE
Check if two hyperslab span trees are the same shape
USAGE
- hbool_t H5S__hyper_spans_shape_same(span1, span2)
+ bool H5S__hyper_spans_shape_same(span1, span2)
H5S_hyper_span_info_t *span_info1; IN: First span tree to compare
H5S_hyper_span_info_t *span_info2; IN: Second span tree to compare
RETURNS
- TRUE (1) or FALSE (0) on success, can't fail
+ true (1) or false (0) on success, can't fail
DESCRIPTION
Compare two hyperslab span trees to determine if they refer to a selection
with the same shape. Very similar to H5S__hyper_cmp_spans, except the
@@ -5535,17 +5534,17 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_hyper_span_info_t *span_info2,
unsigned ndims)
{
const H5S_hyper_span_t *span1; /* Pointer to spans in first span tree */
const H5S_hyper_span_t *span2; /* Pointer to spans in second span tree */
hssize_t offset[H5S_MAX_RANK]; /* Offset vector for selections */
- hbool_t rest_zeros[H5S_MAX_RANK]; /* Vector of flags to indicate when remaining offset is all zero */
- hbool_t zero_offset; /* Whether the two selections have a non-zero offset */
+ bool rest_zeros[H5S_MAX_RANK]; /* Vector of flags to indicate when remaining offset is all zero */
+ bool zero_offset; /* Whether the two selections have a non-zero offset */
unsigned u; /* Local index variable */
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -5561,7 +5560,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Check for an offset between the two selections */
span1 = span_info1->head;
span2 = span_info2->head;
- zero_offset = TRUE;
+ zero_offset = true;
for (u = 0; u < ndims; u++) {
/* Check for offset in this dimension */
if (span1->low != span2->low) {
@@ -5569,7 +5568,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Indicate that the offset vector is not all zeros */
if (zero_offset)
- zero_offset = FALSE;
+ zero_offset = false;
} /* end if */
/* Sanity check */
@@ -5590,7 +5589,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
/* Find first non-zero offset, from the fastest dimension up */
for (i = (int)(ndims - 1); i >= 0; i--)
if (offset[i]) {
- rest_zeros[i] = TRUE;
+ rest_zeros[i] = true;
break;
} /* end if */
@@ -5621,7 +5620,7 @@ H5S__hyper_spans_shape_same(const H5S_hyper_span_info_t *span_info1, const H5S_h
H5S_t *space1; IN: First dataspace to check
H5S_t *space2; IN: Second dataspace to check
RETURNS
- TRUE / FALSE / FAIL
+ true / false / FAIL
DESCRIPTION
Checks to see if the current selection in each dataspace are the same
shape.
@@ -5640,7 +5639,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
{
unsigned space1_rank; /* Number of dimensions of first dataspace */
unsigned space2_rank; /* Number of dimensions of second dataspace */
- htri_t ret_value = TRUE; /* Return value */
+ htri_t ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE
@@ -5679,15 +5678,15 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
while (space2_dim >= 0) {
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].stride !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].count !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].count)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].block !=
space2->select.sel_info.hslab->diminfo.opt[space2_dim].block)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
space2_dim--;
@@ -5695,7 +5694,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
while (space1_dim >= 0) {
if (space1->select.sel_info.hslab->diminfo.opt[space1_dim].block != 1)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
space1_dim--;
} /* end while */
@@ -5731,11 +5730,11 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
/* Check for more spans in this dimension */
if (span->next)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Check for span size > 1 element */
if (span->low != span->high)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Walk down to the next dimension */
spans1 = span->down;
@@ -5752,7 +5751,7 @@ H5S__hyper_shape_same(H5S_t *space1, H5S_t *space2)
ret_value = H5S__hyper_spans_shape_same(spans1, space2->select.sel_info.hslab->span_lst, space2_rank);
} /* end else */
- /* Fall through with 'TRUE' value, if not set earlier */
+ /* Fall through with 'true' value, if not set earlier */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -5922,7 +5921,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Check & update high bounds for lower dimensions */
if (*first_dim_modified >= 0) {
unsigned first_dim; /* First dimension modified, relative to this span tree */
- hbool_t first_dim_set = FALSE; /* Whether first dimension modified is set */
+ bool first_dim_set = false; /* Whether first dimension modified is set */
unsigned u; /* Local index variable */
/* Adjust first dimension modified to be relative to this span tree */
@@ -5941,7 +5940,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
/* Need to signal to higher dimensions if high bounds changed */
if (!first_dim_set) {
*first_dim_modified = (int)u;
- first_dim_set = TRUE;
+ first_dim_set = true;
} /* end if */
} /* end if */
} /* end for */
@@ -5985,7 +5984,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
*/
tmp_span = tail_span->down->head;
while (tmp_span != stop_span) {
- hbool_t attempt_merge_spans = FALSE; /* Whether to merge spans */
+ bool attempt_merge_spans = false; /* Whether to merge spans */
/* Different tests for when to run the 'merge' algorithm,
* depending whether there's "down trees" or not.
@@ -5993,7 +5992,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
if (NULL == tmp_span->down) {
/* Spin through spans until we find the one before the 'stop' span */
if (tmp_span->next == stop_span)
- attempt_merge_spans = TRUE;
+ attempt_merge_spans = true;
} /* end if */
else {
/* Check if we've compared the 'stop' span's "down tree" to
@@ -6001,7 +6000,7 @@ H5S__hyper_add_span_element_helper(H5S_hyper_span_info_t *span_tree, unsigned ra
*/
if (tmp_span->down->op_info[0].op_gen != op_gen) {
if (H5S__hyper_cmp_spans(tmp_span->down, stop_span->down))
- attempt_merge_spans = TRUE;
+ attempt_merge_spans = true;
/* Remember that we visited this span's "down tree" already */
/* (Because it wasn't the same as the 'stop' span's down tree
@@ -6215,7 +6214,7 @@ done:
PURPOSE
Helper routine to detect intersections in span trees
USAGE
- hbool_t H5S__hyper_intersect_block_helper(spans, rank, start, end, op_info_i, op_gen)
+ bool H5S__hyper_intersect_block_helper(spans, rank, start, end, op_info_i, op_gen)
H5S_hyper_span_info_t *spans; IN: First span tree to operate with
unsigned rank; IN: Number of dimensions for span tree
hsize_t *start; IN: Starting coordinate for block
@@ -6223,7 +6222,7 @@ done:
unsigned op_info_i; IN: Index of op info to use
uint64_t op_gen; IN: Operation generation
RETURN
- Non-negative (TRUE/FALSE) on success, can't fail
+ Non-negative (true/false) on success, can't fail
DESCRIPTION
Quickly detect intersections between span tree and block
GLOBAL VARIABLES
@@ -6231,11 +6230,11 @@ done:
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static hbool_t
+static bool
H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hsize_t *start,
const hsize_t *end, unsigned op_info_i, uint64_t op_gen)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -6254,7 +6253,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
*/
for (u = 0; u < rank; u++)
if (start[u] > spans->high_bounds[u] || end[u] < spans->low_bounds[u])
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Get the span list for spans in this tree */
curr = spans->head;
@@ -6267,12 +6266,12 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
curr = curr->next;
/* If this span is past the end of the block, then we're done in this dimension */
else if (curr->low > *end)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* block & span overlap */
else {
/* If this is the bottom dimension, then the span tree overlaps the block */
if (curr->down == NULL)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* Recursively check spans in next dimension down */
else {
/* If there is an intersection in the "down" dimensions,
@@ -6280,7 +6279,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
*/
if (H5S__hyper_intersect_block_helper(curr->down, rank - 1, start + 1, end + 1, op_info_i,
op_gen))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
/* No intersection in down dimensions, advance to next span */
curr = curr->next;
@@ -6292,7 +6291,7 @@ H5S__hyper_intersect_block_helper(H5S_hyper_span_info_t *spans, unsigned rank, c
spans->op_info[op_info_i].op_gen = op_gen;
} /* end if */
- /* Fall through with 'FALSE' return value */
+ /* Fall through with 'false' return value */
done:
FUNC_LEAVE_NOAPI(ret_value)
@@ -6309,7 +6308,7 @@ done:
const hsize_t *start; IN: Starting coordinate for block
const hsize_t *end; IN: Ending coordinate for block
RETURNS
- Non-negative TRUE / FALSE on success, negative on failure
+ Non-negative true / false on success, negative on failure
DESCRIPTION
Quickly detect intersections between both regular hyperslabs and span trees
with a block
@@ -6340,24 +6339,24 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
/* Check for regular hyperslab intersection */
if (space->select.sel_info.hslab->diminfo_valid == H5S_DIMINFO_VALID_YES) {
- hbool_t single_block; /* Whether the regular selection is a single block */
+ bool single_block; /* Whether the regular selection is a single block */
unsigned u; /* Local index variable */
/* Check for a single block */
/* For a regular hyperslab to be single, it must have only one block
* (i.e. count == 1 in all dimensions).
*/
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (space->select.sel_info.hslab->diminfo.opt[u].count > 1)
- single_block = FALSE;
+ single_block = false;
/* Single blocks have already been "compared" above, in the low / high
- * bound checking, so just return TRUE if we've reached here - they
+ * bound checking, so just return true if we've reached here - they
* would have been rejected earlier, if they didn't intersect.
*/
if (single_block)
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
else {
/* Loop over the dimensions, checking for an intersection */
for (u = 0; u < space->extent.rank; u++) {
@@ -6402,15 +6401,15 @@ H5S__hyper_intersect_block(H5S_t *space, const hsize_t *start, const hsize_t *en
* it doesn't intersect.
*/
if (adj_end < space->select.sel_info.hslab->diminfo.opt[u].stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
} /* end if */
} /* end for */
/* If we've looped through all dimensions and none of them didn't
- * overlap, then all of them do, so we report TRUE.
+ * overlap, then all of them do, so we report true.
*/
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end else */
} /* end if */
else {
@@ -6517,7 +6516,7 @@ H5S__hyper_adjust_u_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
static herr_t
H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
FUNC_ENTER_PACKAGE_NOERR
@@ -6529,7 +6528,7 @@ H5S__hyper_adjust_u(H5S_t *space, const hsize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
}
@@ -7052,7 +7051,7 @@ H5S__hyper_adjust_s_helper(H5S_hyper_span_info_t *spans, unsigned rank, const hs
static herr_t
H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
{
- hbool_t non_zero_offset = FALSE; /* Whether any offset is non-zero */
+ bool non_zero_offset = false; /* Whether any offset is non-zero */
unsigned u; /* Local index variable */
FUNC_ENTER_PACKAGE_NOERR
@@ -7064,7 +7063,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
/* Check for an all-zero offset vector */
for (u = 0; u < space->extent.rank; u++)
if (0 != offset[u]) {
- non_zero_offset = TRUE;
+ non_zero_offset = true;
break;
} /* end if */
@@ -7116,7 +7115,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
H5S_t *space; IN/OUT: Pointer to dataspace to move
hssize_t *old_offset; OUT: Pointer to space to store old offset
RETURNS
- TRUE/FALSE for hyperslab selection, FAIL on error
+ true/false for hyperslab selection, FAIL on error
DESCRIPTION
Copies the current selection offset into the array provided, then
inverts the selection offset, subtracts the offset from the hyperslab
@@ -7129,7 +7128,7 @@ H5S__hyper_adjust_s(H5S_t *space, const hssize_t *offset)
htri_t
H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
{
- htri_t ret_value = FALSE; /* Return value */
+ htri_t ret_value = false; /* Return value */
FUNC_ENTER_NOAPI(FAIL)
@@ -7155,7 +7154,7 @@ H5S_hyper_normalize_offset(H5S_t *space, hssize_t *old_offset)
memset(space->select.offset, 0, sizeof(hssize_t) * space->extent.rank);
/* Indicate that the offset was normalized */
- ret_value = TRUE;
+ ret_value = true;
} /* end if */
done:
@@ -7284,8 +7283,8 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
H5S_hyper_span_info_t *new_down; /* Down pointer for new span node */
/* Sanity check */
- /* (If down_cmp was set to TRUE above, we won't be in this branch) */
- assert(down_cmp != TRUE);
+ /* (If down_cmp was set to true above, we won't be in this branch) */
+ assert(down_cmp != true);
/* Check if there is actually a down span */
if (down) {
@@ -7315,7 +7314,7 @@ H5S__hyper_append_span(H5S_hyper_span_info_t **span_tree, unsigned ndims, hsize_
/* Check if we are sharing down spans with a previous node */
/* (Only need to check for bounds changing if down spans aren't shared) */
- if (down_cmp == FALSE) {
+ if (down_cmp == false) {
unsigned u; /* Local index variable */
/* Loop over lower dimensions, checking & updating low & high bounds */
@@ -7388,10 +7387,10 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
unsigned ndims, H5S_hyper_span_info_t **a_not_b, H5S_hyper_span_info_t **a_and_b,
H5S_hyper_span_info_t **b_not_a)
{
- hbool_t need_a_not_b; /* Whether to generate a_not_b list */
- hbool_t need_a_and_b; /* Whether to generate a_and_b list */
- hbool_t need_b_not_a; /* Whether to generate b_not_a list */
- herr_t ret_value = SUCCEED; /* Return value */
+ bool need_a_not_b; /* Whether to generate a_not_b list */
+ bool need_a_and_b; /* Whether to generate a_and_b list */
+ bool need_b_not_a; /* Whether to generate b_not_a list */
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -7451,14 +7450,14 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
else {
H5S_hyper_span_t *span_a; /* Pointer to a node in span tree 'a' */
H5S_hyper_span_t *span_b; /* Pointer to a node in span tree 'b' */
- hbool_t recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
+ bool recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
/* Get the pointers to the new and old span lists */
span_a = a_spans->head;
span_b = b_spans->head;
/* No spans to recover yet */
- recover_a = recover_b = FALSE;
+ recover_a = recover_b = false;
/* Work through the list of spans in the new list */
while (span_a != NULL && span_b != NULL) {
@@ -7535,7 +7534,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_a->high,
@@ -7550,7 +7549,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_a->high,
@@ -7565,7 +7564,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_a->high,
@@ -7593,7 +7592,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'b' into new span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, FAIL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
/* No upper part of span 'b' to split */
else {
@@ -7646,7 +7645,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_b->low, span_b->high,
@@ -7661,7 +7660,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_b->low, span_b->high,
@@ -7676,7 +7675,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_b->low, span_b->high,
@@ -7699,7 +7698,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'a' the new span 'a' */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL);
@@ -7754,7 +7753,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_a->high,
@@ -7769,7 +7768,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_a->high,
@@ -7784,7 +7783,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_a->high,
@@ -7812,7 +7811,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'b' the new span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, FAIL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both span 'a' & span 'b' */
@@ -7872,7 +7871,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_not_b list */
if (down_a_not_b) {
- assert(need_a_not_b == TRUE);
+ assert(need_a_not_b == true);
/* Merge/add overlapped part with/to a_not_b list */
if (H5S__hyper_append_span(a_not_b, ndims, span_a->low, span_b->high,
@@ -7887,7 +7886,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the a_and_b list */
if (down_a_and_b) {
- assert(need_a_and_b == TRUE);
+ assert(need_a_and_b == true);
/* Merge/add overlapped part with/to a_and_b list */
if (H5S__hyper_append_span(a_and_b, ndims, span_a->low, span_b->high,
@@ -7902,7 +7901,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Check for additions to the b_not_a list */
if (down_b_not_a) {
- assert(need_b_not_a == TRUE);
+ assert(need_b_not_a == true);
/* Merge/add overlapped part with/to b_not_a list */
if (H5S__hyper_append_span(b_not_a, ndims, span_a->low, span_b->high,
@@ -7925,7 +7924,7 @@ H5S__hyper_clip_spans(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_info_t *b_s
/* Make upper part of span 'a' into new span 'a' */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, FAIL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, FAIL);
@@ -8061,14 +8060,14 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
else {
H5S_hyper_span_t *span_a; /* Pointer to current span 'a' working on */
H5S_hyper_span_t *span_b; /* Pointer to current span 'b' working on */
- hbool_t recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
+ bool recover_a, recover_b; /* Flags to indicate when to recover temporary spans */
/* Get the pointers to the 'a' and 'b' span lists */
span_a = a_spans->head;
span_b = b_spans->head;
/* No spans to recover yet */
- recover_a = recover_b = FALSE;
+ recover_a = recover_b = false;
/* Work through the list of spans in the new list */
while (span_a != NULL && span_b != NULL) {
@@ -8134,7 +8133,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'b' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, NULL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both span 'a' & 'b' */
@@ -8183,7 +8182,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'a' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL);
@@ -8239,7 +8238,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'b' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, tmp_span, NULL);
- recover_b = TRUE;
+ recover_b = true;
} /* end if */
else {
/* Advance both spans */
@@ -8295,7 +8294,7 @@ H5S__hyper_merge_spans_helper(H5S_hyper_span_info_t *a_spans, H5S_hyper_span_inf
/* Set new span 'a' to tmp_span */
H5S_HYPER_ADVANCE_SPAN(recover_a, span_a, tmp_span, NULL);
- recover_a = TRUE;
+ recover_a = true;
/* Advance span 'b' */
H5S_HYPER_ADVANCE_SPAN(recover_b, span_b, span_b->next, NULL);
@@ -8763,7 +8762,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
space->select.sel_info.hslab->diminfo_valid = H5S_DIMINFO_VALID_NO;
else {
H5S_hyper_dim_t tmp_diminfo[H5S_MAX_RANK]; /* Temporary dimension info */
- hbool_t found_nonidentical_dim = FALSE;
+ bool found_nonidentical_dim = false;
unsigned curr_dim;
/* Copy current diminfo.opt values */
@@ -8896,7 +8895,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
} /* end else */
/* Indicate that we found a nonidentical dim */
- found_nonidentical_dim = TRUE;
+ found_nonidentical_dim = true;
} /* end if */
} /* end for */
@@ -8942,7 +8941,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
const H5S_hyper_span_t *spans; IN: Portion of span tree to check
H5S_hyper_dim_t span_slab_info[]; OUT: Rebuilt section of hyperslab description
RETURNS
- TRUE/FALSE for hyperslab selection rebuilt
+ true/false for hyperslab selection rebuilt
DESCRIPTION
Examine the span tree for a hyperslab selection and rebuild
the start/stride/count/block information for the selection, if possible.
@@ -8954,7 +8953,7 @@ H5S__hyper_update_diminfo(H5S_t *space, H5S_seloper_t op, const H5S_hyper_dim_t
REVISION LOG
KY, 2005/9/22
--------------------------------------------------------------------------*/
-static hbool_t
+static bool
H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t span_slab_info[])
{
const H5S_hyper_span_t *span; /* Hyperslab span */
@@ -8964,7 +8963,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
hsize_t block; /* Block size for this dimension */
hsize_t prev_low; /* Low bound for previous span */
size_t spancount; /* Number of spans encountered in this dimension */
- hbool_t ret_value = TRUE; /* Return value */
+ bool ret_value = true; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -8981,7 +8980,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
if (span->down)
/* Go to the next down span and check whether the selection can be rebuilt */
if (!H5S__hyper_rebuild_helper(span->down, &span_slab_info[1]))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Assign the initial starting point & block size for this dimension */
start = span->low;
@@ -9001,7 +9000,7 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
/* (Can skip check if previous span's down pointer is same as current one) */
if (span->down && prev_span->down != span->down)
if (!H5S__hyper_cmp_spans(span->down, prev_span->down))
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
/* Obtain values for stride and block */
curr_stride = span->low - prev_low;
@@ -9011,10 +9010,10 @@ H5S__hyper_rebuild_helper(const H5S_hyper_span_info_t *spans, H5S_hyper_dim_t sp
* three spans are needed. Account for the first two spans.
*/
if (curr_block != block)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
if (spancount > 1) {
if (stride != curr_stride)
- HGOTO_DONE(FALSE);
+ HGOTO_DONE(false);
} /* end if */
else
stride = curr_stride;
@@ -9073,7 +9072,7 @@ H5S__hyper_rebuild(H5S_t *space)
/* Check whether the slab can be rebuilt */
/* (Only regular selection can be rebuilt. If yes, fill in correct values) */
- if (FALSE == H5S__hyper_rebuild_helper(space->select.sel_info.hslab->span_lst, rebuilt_slab_info))
+ if (false == H5S__hyper_rebuild_helper(space->select.sel_info.hslab->span_lst, rebuilt_slab_info))
space->select.sel_info.hslab->diminfo_valid = H5S_DIMINFO_VALID_IMPOSSIBLE;
else {
/* Set the dimension info & bounds for the dataspace, from the rebuilt info */
@@ -9155,21 +9154,21 @@ done:
PURPOSE
Check if two selections' bounds overlap.
USAGE
- hbool_t H5S__check_spans_overlap(spans1, spans2)
+ bool H5S__check_spans_overlap(spans1, spans2)
const H5S_hyper_span_info_t *spans1; IN: Second span list
const H5S_hyper_span_info_t *spans2; IN: Second span list
RETURNS
- TRUE for overlap, FALSE for no overlap
+ true for overlap, false for no overlap
PROGRAMMER
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
EXAMPLES
REVISION LOG
--------------------------------------------------------------------------*/
-static H5_ATTR_PURE hbool_t
+static H5_ATTR_PURE bool
H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_span_info_t *spans2)
{
- hbool_t ret_value = FALSE; /* Return value */
+ bool ret_value = false; /* Return value */
FUNC_ENTER_PACKAGE_NOERR
@@ -9195,10 +9194,10 @@ H5S__check_spans_overlap(const H5S_hyper_span_info_t *spans1, const H5S_hyper_sp
/* Check lower dimensions for overlap */
if (H5S__check_spans_overlap(span1->down, span2->down))
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
else
- HGOTO_DONE(TRUE);
+ HGOTO_DONE(true);
} /* end if */
/* Advance one of the spans */
@@ -9241,10 +9240,10 @@ done:
H5S_t *space1; IN: Dataspace containing the first span list
H5S_seloper_t op; IN: Selection operation
H5S_hyper_span_info_t *space2_span_lst; IN: Second span list
- hbool_t can_own_span2; IN: Indicates whether the 2nd span list could be
+ bool can_own_span2; IN: Indicates whether the 2nd span list could be
owned by the result. If not, the 2nd span list
has to be copied.
- hbool_t *span2_owned; OUT: Indicates if the 2nd span list is actually owned
+ bool *span2_owned; OUT: Indicates if the 2nd span list is actually owned
H5S_t **result; OUT: The dataspace containing the new selection. It
could be same with the 1st dataspace.
RETURNS
@@ -9258,16 +9257,16 @@ done:
--------------------------------------------------------------------------*/
static herr_t
H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *space2_span_lst,
- hbool_t can_own_span2, hbool_t *span2_owned, hbool_t *updated_spans, H5S_t **result)
+ bool can_own_span2, bool *span2_owned, bool *updated_spans, H5S_t **result)
{
H5S_hyper_span_info_t *a_not_b =
NULL; /* Span tree for hyperslab spans in old span tree and not in new span tree */
H5S_hyper_span_info_t *a_and_b = NULL; /* Span tree for hyperslab spans in both old and new span trees */
H5S_hyper_span_info_t *b_not_a =
NULL; /* Span tree for hyperslab spans in new span tree and not in old span tree */
- hbool_t overlapped = FALSE; /* Whether selections overlap */
- hbool_t is_result_new = FALSE;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool overlapped = false; /* Whether selections overlap */
+ bool is_result_new = false;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -9280,16 +9279,16 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
assert(span2_owned);
/* Reset flags to return */
- *span2_owned = FALSE;
- *updated_spans = FALSE;
+ *span2_owned = false;
+ *updated_spans = false;
/* The result shares the same info from space1 */
if (*result == NULL) {
- if (NULL == ((*result) = H5S_copy(space1, TRUE, TRUE)))
+ if (NULL == ((*result) = H5S_copy(space1, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
space1->select.sel_info.hslab->span_lst->count--;
(*result)->select.sel_info.hslab->span_lst = NULL;
- is_result_new = TRUE;
+ is_result_new = true;
} /* end if */
/* Check both spaces to see if they overlap */
@@ -9315,11 +9314,11 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
else {
if (H5S__hyper_add_disjoint_spans(*result, space2_span_lst) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINSERT, FAIL, "can't append hyperslabs");
- *span2_owned = TRUE;
+ *span2_owned = true;
} /* end else */
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_AND:
@@ -9335,7 +9334,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
H5S__hyper_copy_span(space1->select.sel_info.hslab->span_lst, space1->extent.rank);
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_NOTA:
@@ -9354,14 +9353,14 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
H5S__hyper_copy_span(space2_span_lst, space1->extent.rank);
else {
(*result)->select.sel_info.hslab->span_lst = space2_span_lst;
- *span2_owned = TRUE;
+ *span2_owned = true;
}
/* Reset the number of items in selection */
(*result)->select.num_elem = H5S__hyper_spans_nelem(space2_span_lst);
/* Indicate that the spans changed */
- *updated_spans = TRUE;
+ *updated_spans = true;
break;
case H5S_SELECT_NOOP:
@@ -9460,7 +9459,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem = H5S__hyper_spans_nelem(a_not_b);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
/* Indicate that the a_not_b spans are owned */
a_not_b = NULL;
@@ -9483,7 +9482,7 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem = H5S__hyper_spans_nelem(a_and_b);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
/* Indicate that the a_and_b spans are owned */
a_and_b = NULL;
@@ -9498,19 +9497,19 @@ H5S__fill_in_new_space(H5S_t *space1, H5S_seloper_t op, H5S_hyper_span_info_t *s
(*result)->select.num_elem += H5S__hyper_spans_nelem(b_not_a);
/* Indicate that the spans were updated */
- *updated_spans = TRUE;
+ *updated_spans = true;
} /* end if */
} /* end else for the case the new span overlaps with the old (i.e. space) */
/* Check if the spans weren't updated, and reset selection if so */
if (!*updated_spans) {
- /* If updated_spans remains FALSE as in this branch, it means the
+ /* If updated_spans remains false as in this branch, it means the
* result has been cleared in XOR / AND / NOTB / NOTA cases, and the
* result is a copy of the dataspace in the OR case.
*
* If two dataspaces have generated any of the three clipped
* span trees (i.e. a_not_b, a_and_b, and b_not_a), the
- * updated_spans must be TRUE.
+ * updated_spans must be true.
*/
if (H5S_SELECT_OR != op) {
/* Convert *result to "none" selection */
@@ -9581,11 +9580,11 @@ H5S__generate_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], c
new_spans = NULL;
}
else {
- hbool_t new_spans_owned = FALSE;
- hbool_t updated_spans = FALSE;
+ bool new_spans_owned = false;
+ bool updated_spans = false;
/* Generate new spans for space */
- if (H5S__fill_in_new_space(space, op, new_spans, TRUE, &new_spans_owned, &updated_spans, &space) < 0)
+ if (H5S__fill_in_new_space(space, op, new_spans, true, &new_spans_owned, &updated_spans, &space) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't generate the specified hyperslab");
/* Check if the spans were updated by H5S__fill_in_new_space */
@@ -9732,8 +9731,8 @@ static herr_t
H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const hsize_t block[])
{
hsize_t select_end, block_end; /* End of block & selection */
- hbool_t single_block; /* Whether the selection is a single block */
- hbool_t overlap; /* Whether block & selection overlap */
+ bool single_block; /* Whether the selection is a single block */
+ bool overlap; /* Whether block & selection overlap */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
@@ -9745,10 +9744,10 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
assert(block);
/* Check for single block selection in dataspace */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (1 != space->select.sel_info.hslab->diminfo.opt[u].count) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -9758,7 +9757,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
hsize_t new_block[H5S_MAX_RANK]; /* New block size */
/* Check for overlap and compute new start offset & block sizes */
- overlap = TRUE;
+ overlap = true;
for (u = 0; u < space->extent.rank; u++) {
/* Compute the end of the selection & block in this dimension */
select_end = space->select.sel_info.hslab->diminfo.high_bounds[u];
@@ -9767,7 +9766,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check for overlap */
if (!H5S_RANGE_OVERLAP(space->select.sel_info.hslab->diminfo.opt[u].start, select_end, start[u],
block_end)) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -9793,15 +9792,15 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
hsize_t new_count[H5S_MAX_RANK]; /* New count for hyperslab selection */
hsize_t stride[H5S_MAX_RANK]; /* Stride for hyperslab selection */
hsize_t new_block[H5S_MAX_RANK]; /* New block for hyperslab selection */
- hbool_t partial_first_span; /* Whether first span in intersection is partial */
- hbool_t partial_last_span; /* Whether last span in intersection is partial */
+ bool partial_first_span; /* Whether first span in intersection is partial */
+ bool partial_last_span; /* Whether last span in intersection is partial */
/* Iterate over selection, checking for overlap and computing first / last
* span that intersects with the block.
*/
- overlap = TRUE;
- partial_first_span = FALSE;
- partial_last_span = FALSE;
+ overlap = true;
+ partial_first_span = false;
+ partial_last_span = false;
for (u = 0; u < space->extent.rank; u++) {
hsize_t first_span_start, first_span_end; /* Start / end of first span */
hsize_t last_span_start, last_span_end; /* Start / end of last span */
@@ -9814,7 +9813,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check for overlap */
if (!H5S_RANGE_OVERLAP(space->select.sel_info.hslab->diminfo.opt[u].start, select_end, start[u],
block_end)) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -9826,7 +9825,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if first span overlaps _end_ of block */
if (block_end >= first_span_start && block_end <= first_span_end)
- partial_first_span = TRUE;
+ partial_first_span = true;
} /* end if */
else {
hsize_t adj_start; /* Start coord, adjusted for hyperslab selection parameters */
@@ -9847,7 +9846,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if first span overlaps start of block */
if (first_span_start < start[u] && first_span_end >= start[u])
- partial_first_span = TRUE;
+ partial_first_span = true;
/* Advance first span to start higher than block's start,
* if it's not partial.
@@ -9866,7 +9865,7 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if last span overlaps _start_ of block */
if (start[u] >= last_span_start && start[u] <= last_span_end)
- partial_last_span = TRUE;
+ partial_last_span = true;
} /* end if */
else {
hsize_t adj_end; /* End coord, adjusted for hyperslab selection parameters */
@@ -9887,13 +9886,13 @@ H5S__hyper_regular_and_single_block(H5S_t *space, const hsize_t start[], const h
/* Check if last span overlaps end of block */
if (block_end >= last_span_start && block_end <= last_span_end)
- partial_last_span = TRUE;
+ partial_last_span = true;
} /* end else */
/* Check if no spans are inside block */
/* (Can happen when block falls in "gap" between spans) */
if (last_span_end < start[u]) {
- overlap = FALSE;
+ overlap = false;
break;
} /* end if */
@@ -10187,7 +10186,7 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, FAIL, "can't set regular hyperslab selection");
} /* end if */
else if (op >= H5S_SELECT_OR && op <= H5S_SELECT_NOTA) {
- hbool_t single_block; /* Whether the selection is a single block */
+ bool single_block; /* Whether the selection is a single block */
/* Sanity check */
assert(H5S_GET_SELECT_TYPE(space) == H5S_SEL_HYPERSLABS);
@@ -10229,10 +10228,10 @@ H5S_select_hyperslab(H5S_t *space, H5S_seloper_t op, const hsize_t start[], cons
} /* end if */
/* Check for a single block selected */
- single_block = TRUE;
+ single_block = true;
for (u = 0; u < space->extent.rank; u++)
if (1 != opt_count[u]) {
- single_block = FALSE;
+ single_block = false;
break;
} /* end if */
@@ -10397,7 +10396,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
case H5S_SELECT_NOTA: /* Binary "B not A" operation for hyperslabs */
/* Convert to "none" selection */
/* Copy the first dataspace without sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
if (H5S_select_none((*new_space)) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't convert selection");
@@ -10407,7 +10406,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
case H5S_SELECT_XOR: /* Binary "xor" operation for hyperslabs */
case H5S_SELECT_NOTB: /* Binary "A not B" operation for hyperslabs */
/* Copy the first dataspace with sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, FALSE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, false, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
HGOTO_DONE(SUCCEED); /* Selection stays same */
@@ -10427,7 +10426,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
hsize_t *old_high_bounds;
hsize_t new_low_bounds[H5S_MAX_RANK]; /* New space's low & high bounds */
hsize_t new_high_bounds[H5S_MAX_RANK];
- hbool_t overlapped = FALSE;
+ bool overlapped = false;
/* Set up old space's low & high bounds */
if (old_space->select.sel_info.hslab->span_lst) {
@@ -10447,14 +10446,14 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
/* Check bound box of both spaces to see if they overlap */
if (H5S_RANGE_OVERLAP(old_low_bounds[0], old_high_bounds[0], new_low_bounds[0], new_high_bounds[0]))
- overlapped = TRUE;
+ overlapped = true;
/* Non-overlapping situations can be handled in special ways */
if (!overlapped) {
H5S_hyper_span_info_t *new_spans = NULL;
H5S_hyper_dim_t new_hyper_diminfo[H5S_MAX_RANK];
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, FAIL, "unable to copy dataspace");
if (NULL != (*new_space)->select.sel_info.hslab->span_lst) {
old_space->select.sel_info.hslab->span_lst->count--;
@@ -10526,7 +10525,7 @@ H5S_combine_hyperslab(const H5S_t *old_space, H5S_seloper_t op, const hsize_t st
} /* end if the selection of old space is H5S_SEL_HYPERSLABS */
/* Copy the first dataspace with sharing the list of spans */
- if (NULL == ((*new_space) = H5S_copy(old_space, TRUE, TRUE)))
+ if (NULL == ((*new_space) = H5S_copy(old_space, true, true)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, FAIL, "unable to copy dataspace");
/* Note: a little overhead in calling the function as some conditions are checked again */
@@ -10550,9 +10549,9 @@ done:
static herr_t
H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **result)
{
- hbool_t span2_owned;
- hbool_t updated_spans;
- herr_t ret_value = SUCCEED; /* Return value */
+ bool span2_owned;
+ bool updated_spans;
+ herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
@@ -10567,7 +10566,7 @@ H5S__fill_in_select(H5S_t *space1, H5S_seloper_t op, H5S_t *space2, H5S_t **resu
assert(space2->select.sel_info.hslab->span_lst);
/* Note: the offset of space2 is not considered here for bounding box */
- if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, FALSE, &span2_owned,
+ if (H5S__fill_in_new_space(space1, op, space2->select.sel_info.hslab->span_lst, false, &span2_owned,
&updated_spans, result) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSELECT, FAIL, "can't create the specified selection");
@@ -10640,7 +10639,7 @@ H5Scombine_hyperslab(hid_t space_id, H5S_seloper_t op, const hsize_t start[], co
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to set hyperslab selection");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -10779,7 +10778,7 @@ H5Scombine_select(hid_t space1_id, H5S_seloper_t op, hid_t space2_id)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTINIT, H5I_INVALID_HID, "unable to create hyperslab selection");
/* Register */
- if ((ret_value = H5I_register(H5I_DATASPACE, new_space, TRUE)) < 0)
+ if ((ret_value = H5I_register(H5I_DATASPACE, new_space, true)) < 0)
HGOTO_ERROR(H5E_ID, H5E_CANTREGISTER, H5I_INVALID_HID, "unable to register dataspace ID");
done:
@@ -11406,18 +11405,18 @@ H5S__hyper_proj_int_iterate(H5S_hyper_span_info_t *ss_span_info, const H5S_hyper
hsize_t low; /* Low bounds of current intersection */
hsize_t old_skip; /* Value of udata->skip before main loop */
hsize_t old_nelem; /* Value of udata->nelem before main loop */
- hbool_t check_intersect; /* Whether to check for intersecting elements */
+ bool check_intersect; /* Whether to check for intersecting elements */
unsigned u; /* Local index variable */
herr_t ret_value = SUCCEED; /* Return value */
FUNC_ENTER_PACKAGE
/* Check for non-overlapping bounds */
- check_intersect = TRUE;
+ check_intersect = true;
for (u = 0; u < (udata->ss_rank - depth); u++)
if (!H5S_RANGE_OVERLAP(ss_span_info->low_bounds[u], ss_span_info->high_bounds[u],
sis_span_info->low_bounds[u], sis_span_info->high_bounds[u])) {
- check_intersect = FALSE;
+ check_intersect = false;
break;
} /* end if */
@@ -11646,7 +11645,7 @@ done:
src_intersect_space H5S_t *dst_space; IN: Selection that is mapped to src_space, and which contains the
result H5S_t *src_intersect_space; IN: Selection whose intersection with src_space is projected to dst_space
to obtain the result H5S_t *proj_space; OUT: Will contain the result (intersection of src_intersect_space
-and src_space projected from src_space to dst_space) after the operation hbool_t share_selection; IN: Whether
+and src_space projected from src_space to dst_space) after the operation bool share_selection; IN: Whether
we are allowed to share structures inside dst_space with proj_space RETURNS Non-negative on success/Negative
on failure. DESCRIPTION Projects the intersection of of the selections of src_space and src_intersect_space
within the selection of src_space as a selection within the selection of dst_space. The result is placed in
@@ -11657,7 +11656,7 @@ if dst_space must be preserved. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS EXA
--------------------------------------------------------------------------*/
herr_t
H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_intersect_space,
- H5S_t *proj_space, hbool_t share_selection)
+ H5S_t *proj_space, bool share_selection)
{
H5S_hyper_project_intersect_ud_t udata; /* User data for subroutines */
H5S_hyper_span_info_t *ss_span_info;
@@ -11755,7 +11754,7 @@ H5S__hyper_project_intersection(H5S_t *src_space, H5S_t *dst_space, H5S_t *src_i
/* Check for elements in projected space */
if (udata.ps_span_info[0]) {
/* Allocate space for the hyperslab selection information (note this sets
- * diminfo_valid to FALSE, diminfo arrays to 0, and span list to NULL) */
+ * diminfo_valid to false, diminfo arrays to 0, and span list to NULL) */
if (NULL == (proj_space->select.sel_info.hslab = H5FL_CALLOC(H5S_hyper_sel_t)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTALLOC, FAIL, "can't allocate hyperslab info");
@@ -12012,7 +12011,7 @@ done:
hsize_t H5S__hyper_get_clip_extent_real(clip_space,num_slices,incl_trail)
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
hsize_t num_slizes, IN: Number of slices clip_space should contain when clipped
- hbool_t incl_trail; IN: Whether to include trailing unselected space
+ bool incl_trail; IN: Whether to include trailing unselected space
RETURNS
Clip extent to match num_slices (never fails)
DESCRIPTION
@@ -12020,7 +12019,7 @@ done:
(via H5S_hyper_clip_unlim) in order for it to contain num_slices
slices in the unlimited dimension. If the clipped selection would end
immediately before a section of unselected space (i.e. at the end of a
- block), then if incl_trail is TRUE, the returned clip extent is
+ block), then if incl_trail is true, the returned clip extent is
selected to include that trailing "blank" space, otherwise it is
selected to end at the end before the blank space.
GLOBAL VARIABLES
@@ -12030,7 +12029,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
static hsize_t
-H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbool_t incl_trail)
+H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, bool incl_trail)
{
const H5S_hyper_dim_t *diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension */
hsize_t count;
@@ -12090,16 +12089,16 @@ H5S__hyper_get_clip_extent_real(const H5S_t *clip_space, hsize_t num_slices, hbo
hsize_t H5S__hyper_get_clip_extent(clip_space,match_space,incl_trail)
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
const H5S_t *match_space, IN: Space containing the same number of elements as clip_space should after
-clipping hbool_t incl_trail; IN: Whether to include trailing unselected space RETURNS Calculated clip
+clipping bool incl_trail; IN: Whether to include trailing unselected space RETURNS Calculated clip
extent (never fails) DESCRIPTION Calculates and returns the extent that clip_space should be clipped to (via
H5S_hyper_clip_unlim) in order for it to contain the same number of elements as match_space. If the clipped
selection would end immediately before a section of unselected space (i.e. at the end of a block), then if
-incl_trail is TRUE, the returned clip extent is selected to include that trailing "blank" space, otherwise it
+incl_trail is true, the returned clip extent is selected to include that trailing "blank" space, otherwise it
is selected to end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this
assumes the offset has been normalized. EXAMPLES REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
-H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbool_t incl_trail)
+H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, bool incl_trail)
{
hsize_t num_slices; /* Number of slices in unlimited dimension */
hsize_t ret_value = 0; /* Return value */
@@ -12141,18 +12140,18 @@ H5S_hyper_get_clip_extent(const H5S_t *clip_space, const H5S_t *match_space, hbo
const H5S_t *clip_space, IN: Space that clip size will be calculated based on
const H5S_t *match_space, IN: Space that, after being clipped to match_clip_size, contains the same
number of elements as clip_space should after clipping hsize_t match_clip_size, IN: Extent match_space would
-be clipped to to match the number of elements in clip_space hbool_t incl_trail; IN: Whether to include
+be clipped to to match the number of elements in clip_space bool incl_trail; IN: Whether to include
trailing unselected space RETURNS Calculated clip extent (never fails) DESCRIPTION Calculates and returns the
extent that clip_space should be clipped to (via H5S_hyper_clip_unlim) in order for it to contain the same
number of elements as match_space would have after being clipped to match_clip_size. If the clipped selection
would end immediately before a section of unselected space (i.e. at the end of a block), then if incl_trail is
-TRUE, the returned clip extent is selected to include that trailing "blank" space, otherwise it is selected to
+true, the returned clip extent is selected to include that trailing "blank" space, otherwise it is selected to
end at the end before the blank space. GLOBAL VARIABLES COMMENTS, BUGS, ASSUMPTIONS Note this assumes the
offset has been normalized. EXAMPLES REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_space, hsize_t match_clip_size,
- hbool_t incl_trail)
+ bool incl_trail)
{
const H5S_hyper_dim_t
*match_diminfo; /* Convenience pointer to opt_unlim_diminfo in unlimited dimension in match_space */
@@ -12219,7 +12218,7 @@ H5S_hyper_get_clip_extent_match(const H5S_t *clip_space, const H5S_t *match_spac
H5S_t *H5S_hyper_get_unlim_block(space,block_index)
const H5S_t *space, IN: Space with unlimited selection
hsize_t block_index, IN: Index of block to return in unlimited dimension
- hbool_t incl_trail; IN: Whether to include trailing unselected space
+ bool incl_trail; IN: Whether to include trailing unselected space
RETURNS
New space on success/NULL on failure.
DESCRIPTION
@@ -12272,7 +12271,7 @@ H5S_hyper_get_unlim_block(const H5S_t *space, hsize_t block_index)
/* Create output space, copy extent */
if (NULL == (space_out = H5S_create(H5S_SIMPLE)))
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCREATE, NULL, "unable to create output dataspace");
- if (H5S__extent_copy_real(&space_out->extent, &space->extent, TRUE) < 0)
+ if (H5S__extent_copy_real(&space_out->extent, &space->extent, true) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTCOPY, NULL, "unable to copy destination space extent");
/* Select block as defined by start/stride/count/block computed above */
@@ -12300,15 +12299,15 @@ done:
hsize_t H5S_hyper_get_first_inc_block(space,clip_size,partial)
const H5S_t *space, IN: Space with unlimited selection
hsize_t clip_size, IN: Extent space would be clipped to
- hbool_t *partial; OUT: Whether the ret_valueth block (first incomplete block) is partial
+ bool *partial; OUT: Whether the ret_valueth block (first incomplete block) is partial
RETURNS
Index of first incomplete block in clip_size (never fails).
DESCRIPTION
Calculates and returns the index (as would be passed to
H5S_hyper_get_unlim_block()) of the first block in the unlimited
dimension of space which would be incomplete or missing when space is
- clipped to clip_size. partial is set to TRUE if the first incomplete
- block is partial, and FALSE if the first incomplete block is missing.
+ clipped to clip_size. partial is set to true if the first incomplete
+ block is partial, and false if the first incomplete block is missing.
GLOBAL VARIABLES
COMMENTS, BUGS, ASSUMPTIONS
Note this assumes the offset has been normalized.
@@ -12316,7 +12315,7 @@ done:
REVISION LOG
--------------------------------------------------------------------------*/
hsize_t
-H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *partial)
+H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, bool *partial)
{
H5S_hyper_sel_t *hslab; /* Convenience pointer to hyperslab info */
H5S_hyper_dim_t *diminfo; /* Convenience pointer to diminfo in unlimited dimension */
@@ -12337,7 +12336,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
if (diminfo->start >= clip_size) {
ret_value = 0;
if (partial)
- partial = FALSE;
+ partial = false;
} /* end if */
else {
/* Calculate index of first incomplete block */
@@ -12346,9 +12345,9 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
if (partial) {
/* Check for partial block */
if ((diminfo->stride * ret_value) < (clip_size - diminfo->start))
- *partial = TRUE;
+ *partial = true;
else
- *partial = FALSE;
+ *partial = false;
} /* end if */
} /* end else */
@@ -12364,7 +12363,7 @@ H5S_hyper_get_first_inc_block(const H5S_t *space, hsize_t clip_size, hbool_t *pa
htri_t H5Sis_regular_hyperslab(dsid)
hid_t dsid; IN: Dataspace ID of hyperslab selection to query
RETURNS
- TRUE/FALSE for hyperslab selection, FAIL on error or when querying other
+ true/false for hyperslab selection, FAIL on error or when querying other
selection types.
DESCRIPTION
If a hyperslab can be represented as a single call to H5Sselect_hyperslab,
@@ -12438,7 +12437,7 @@ H5Sget_regular_hyperslab(hid_t spaceid, hsize_t start[] /*out*/, hsize_t stride[
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataspace");
if (H5S_GET_SELECT_TYPE(space) != H5S_SEL_HYPERSLABS)
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a hyperslab selection");
- if (TRUE != H5S__hyper_is_regular(space))
+ if (true != H5S__hyper_is_regular(space))
HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a regular hyperslab selection");
/* Retrieve hyperslab parameters */