Skip to content

Commit

Permalink
latest from coda-oss (#543)
Browse files Browse the repository at this point in the history
* trying to fix build error

* HDF5 source code (not built)

* don't do push after sync'ing externals

* copy_externals.csh

* Squashed 'externals/coda-oss/' changes from 67d6362..cbfb20ce2

cbfb20ce2 update release notes for C++11/master release (#658)
4bdaf10d9 Change xml lite function to virtual (#645)
6be8f0a2e move debug -g flags to be turned on only if debugging (#644)
e1b0fa349 commit (but not build) HDF5 source code (#634)
1ac97fe48 add HDF5 source code (not built) (#612)
fde6c864f Merge pull request #607 from mdaus/bugfix/change-order-of-config-header-install
c8a004401 Install the cmake-configured header after installing the xercesc source tree. Otherwise, the original config will persist in the install
dda2c9acd Merge pull request #606 from mdaus/fix-xerces-config
004a00f09 Bump zlib version for conan builds
207f4dbb9 Fix Xerces config issue and install its config.h
b84241767 Add support for debug optimizations.
0f6cda57d Use enhanced debug information with gcc/gdb.
5047dce1a Work around GCC avx support bug.
001ab1875 Rebuild the waf self-extractor with a fix for the FIPS error.
5a7f64fca Revert "Rebuild the waf self-extractor with a fix for the FIPS problem."
9f6f775f8 Rebuild the waf self-extractor with a fix for the FIPS problem.
963e8ff40 Revert "add HDF5 source code (#603)"
ec7bb2e52 add HDF5 source code (#603)
6f41c09d7 Release 2022-08-30 (#596)
f91668012 Added handler accessor to MinidomParser for inheriting modules (#594)
72d29e9c2 get unittests working when "nested" in other projects (#595)
f8f18fea5 Actually look at unit test results when using waf (#593)
cda679cee more overloads to take a string length (#592)
b95a32bc4 by default, Uri()s aren't validated (#591)
173930a6f fix a UTF-8 conversion bug (#590)
c5c221a83 CODA code inherits from xml.lite classes :-( (#589)
a4c6294c3 use EncodedStringView instead of _bstr_t (#588)
83c982f0c remove work-arounds to write non-UTF-8 XML (#586)
ebf6db176 <bit> is part of C++20
d3aa8aa5c std::u8string is in C++20, not C++17
03654933c changes to math.linear from coda (#587)
5a2f8e52f release 2022-08-02 (#585)
e5516aba2 tweak names to match utf8:: conventions (#584)
3083ec791 move most platform-specific code to EncodedStringView (#583)
36371410c EncodedString tweaks for XML processing (#582)
cf2016205 remove any vestiges of Expat and libXML (#580)
33538aa0f update for newer Intel compiler
ed65e4ccc Add two patch candidates to fix FIPS problems in waf.
a731ebf8e release 2022-06-29 (#579)
59387bd87 update "ReleaseNotes.md" for recent changes (#578)
e4f940854 remove "boost" and "serialize" (#577)
80b70537e update to zlib-1.2.12 (#576)
202084bac Remove some compiler warnings (#575)
c61232224 build most code with Visual Studio (#574)
6e4d952be some unit-tests need argc/argv (#573)
36e051d7b Add run1D method to GenerationThreadPool (#572)
0a08b8e4e build "coda-oss-lite" as a VS2022 project (#571)
6677cc38e simplify creation of encodes string (#570)
ba62c610c Add the 'universal_newlines=True' flag to python Popen calls.
984e4a96c Fix a bug in waf platform detection.
d2aca8d4b release 2022-05-03 (#569)
ff55fed59 can't replace all TEST_ASSERT macros with functions (#568)
89a636a fix copy/assignment in EncodedString (#567)
c3fe91d latest tweaks to build with C++17 (#566)
a59a51b be sure we use a 64-bit time_t (#565)
1f79fb3 Poly2D::atY() bugfix (#564)
ac53076 Testing to see if windows-2019 works with github actions (#563)
8d0726b Fix a bug in waf platform detection.
c662b5a Update ReleaseNotes.md
ef4a3bb Release 2022-02-22 (aka 2/22/22) (#562)
0a0e6cf use char16_t on Linux (#560)
fe65bfd fix units for ICC, sys::filesystem (#559)
def9791 update to GSL 4.0.0 (#558)
fe365e5 fix XML validation for UTF-8 (#557)
502e582 support conversion to std::wstring (#556)
e694225 Delete codeql-analysis.yml
45bc6a9 Create codeql-analysis.yml
87d9a7e remove CodeQL
eab5ecb Update build_unittest.yml
8ab12d4 Delete codeql-analysis.yml
9e54209 try running CodeQL as part of build-linux-cmake
de0c506 Create codeql-analysis.yml
0496087 tweaks to build in "coda" (#554)
0ba2423 replace sys::U8string with coda_oss::u8string (#553)
bcee655 add EncodedString class (#552)
c2eecd3 simplify implementation of EncodedStringView (#551)
c1320ef fix 'typename' for other compilers (#550)
ac3b939 tweaks to make "main" build easier (#549)
78da741 remove sys/Optional.h (#548)
f31730a put our std work-arounds in one place (#547)
9b7bb57 Add an EncodedStringView class (#545)
c0e1da5 another batch of tweaks to cleanup compiler warnings, etc. (#546)
0f3bfd9 added missing "virtual", support unique_ptr (#544)
ca32f99 Add option to specify curl installation location. (#501)
2df9c1a allow std::filesystem::path to be used for validation (#543)
2891435 add SinCos for units::Angle (#542)
e430edd Delete log4j as 1) it's old, 2) coda-oss doesn't use it, and 3) remove any questions about security vulnerability (#541)
bb11134 xml.lite tweaks (#540)
955b33e Release 2021_12_13 (#539)
d73d74d xml.lite tweaks (#537)
3a90e25 use more C++11 functionality (#538)
9ca2a0e remove more compiler warnings (#536)
0ec9da1 be sure == and != are in-sync (#535)
9084be3 fix size_t compiler warnings (#534)
abd6469 fix ICC errors (#533)
09cb36f update version number before cutting a new release (#532)
c29e4d2 fix ICC warnings/errors from high-side (#531)
91f8f1c simplify our std:: implementations (#530)
7c633c7 Further reduce use of std::auto_ptr (#529)
d858837 Provide support for creating simple version numbers (#528)
b035825 Merge pull request #527 from mdaus/fix-crypt-h-clash
ffed3d6 Disable encryption support in minizip build and remove crypt.h header
ee2b2bf Merge pull request #525 from mdaus/swig-fix
3c02ff2 Fix config-python prefix issue
6149053 Add new config-python module for SWIG compatibility workarounds
30acf5b mt::transform_async(), mem::SharedPtr, math::SinCos() (#526)
21efd6a Implement better workaround for lack of SWIG support for "final"
60837a6 Revert unneeded changes
0bc994d Fix SWIG path issue for waf build
070f4e9 Update SWIG generated files
f8472b0 Fix SWIG path issues and warnings
e10707f Set minimum SWIG version to 4.0.1
b8cdba5 Fix waf SWIG build issue
2bd0ee3 Enable SWIG in Github waf build
f2b0011 Try fixing SWIG compile issue again
afafabc Fix SWIG compile issue on Linux due to missing macro
7c8d4a8 Add SWIG to the CI flow
4023d72 Regenerate SWIG bindings
1d8c701 Add some compile definitions needed by SWIG for CMake build
e5cc585 Remove some functions which return unique_ptr from SWIG bindings (incompatible).
965a291 Remove "final" specifier from structs bound in SWIG (incompatible)
f1bec56 Merge branch 'master' of https://github.com/mdaus/coda-oss
c01c4d7 do in-line initialization (#524)
fb7230e Update CMakeLists.txt
5dfb056 tweaks for C++17 (#523)
1a7d3ab Merge pull request #515 from mdaus/security-and-conan-updates
d13885d make it easier to create a new Element with the right encoding (#522)
3fb09e7 Merge pull request #359 from mdaus/parseArgUpdate
0d546a8 Tweak some ArgumentParser tests for the ignoreUnknownArguments option
14bd1f2 Merge remote-tracking branch 'origin/master' into parseArgUpdate
cf398c0 tweak code for C++11/C++17 (#521)
2d0322b reduce use of std::auto_ptr (#520)
853320e reduce use of deprecated C++98 code (#519)
4752ba2 Replace some warning pragmas with macros
3268555 Merge remote-tracking branch 'origin/master' into security-and-conan-updates
f0350c0 Merge pull request #518 from mdaus/bugfix/python3.9-related
fc01df0 fix typos in gcc macros
9d356f3 fix gcc impl
8124da7 remove unreachable code
d034b3a clobber warnings from numpy innards
9941a40 macros to disable warnings around system headers
8a725bb Merge pull request #516 from mdaus/mbraswell-enablecpp17-windows
2e7b816 Fixed pragma stuff on gcc
9775bb0 Fixed pragma stuff on gcc
680d3cc Merge branch 'master' of https://github.com/mdaus/coda-oss
8ffd6ed forgot to add "units" to CMakeFiles.txt
0683567 Remove Auto_ptr flag and make disable warnings cross_platform compatible
d62efec Merge branch 'master' of https://github.com/mdaus/coda-oss into mbraswell-enablecpp17-windows
d04042e Merge pull request #517 from mdaus/develop/compiler-warning-helpers
cf5cd16 Fix macro usage on gcc
a88bbcd Macros to narrowly target disabling warnings
c0d5cdf Formatting Changes
be019b4 Formatting Changes
2eb04dc Fixed compiler warnings and added option to compile cpp17 with waf on windows
5d9f27f Refactor coda-oss conan recipe
ce66457 Disable warning for MSVC2017 and earlier
ecfefbf Merge remote-tracking branch 'origin/master' into security-and-conan-updates
8b14798 Merge pull request #514 from mdaus/develop/fix-unused-symbol-errors
1d9a4ec Add conan option to use std::regex instead of pcre
6dd5d44 add required include
4c0ae77 add required include
1873cee parameterize build (somewhat)
c9ef567 fix Release compile error
e6b47e9 fix compiler error
eff205b helper macro to fix unusual targets
342098a Fix CMake build for modules without include files
5625706 Enable cpp17 option for windows builds
98e12b1 Use consistent line endings for *.in template files
d01fea0 Configure coda_add_module to install more file extension types
30823f6 Delete stray file
ac7760b Load dependency targets when loading coda-oss for conan build
14781ca Implement conan build for openjpeg and pcre2 dependencies
9d955ef Exclude unsupported XML backend wrappers from CMake build to remove warnings
1e8c9b2 Merge remote-tracking branch 'origin/master' into security-and-conan-updates
772d804 Implement conan build for libjpeg dependency
98b653d Implement conan build for xerces-c dependency
11323e8 Implement conan build for zlib dependency
d0e6bf2 Improve conan test_package
a03e129 Fix uninitialized member variable warning in mt::AbstractTiedThreadPool
c7bb47b Remove member variable duplicated in derived class io::ToggleOutputStream
0838ac2 Use consistent line endings for conan recipes and CMake files.
2768e5f Update libjpeg to v9d
d75f55b Update zlib to 1.2.11
ca2f84c Fix warning in GSL for MSVC 2015 and earlier
1babd19 Fix warning in thread tests for MSVC
2f17632 Fix warning in except module for Visual Studio 2015 and earlier
a485bf6 Fix BIGENDIAN redefinition warning
59543e4 Disable warning in dbi for MSVC 2017 and earlier
b4b2128 Fix warnings in numpyutils for MSVC 2017 and earlier
2b179b6 Fix integer overflow issue
898151a Hook up simple "units" (#513)
4d6beee Merge pull request #511 from mdaus/develop/horizontal-improved-numerical-precision
c1878b2 Fix for numerical precision issues surrounding horizontal lines
7d1442c Merge pull request #510 from mbraswell/fix-testnumelements-build
58fc85f Whitespace change to trigger workflow
ab74026 Fix wscript to successfully build test_num_elements
323283c Merge pull request #509 from mbraswell/develop-mbraswell-cpp17
16a5502 Added option to enable cpp17
b0625cf tweak debug stuff (#508)
8455494 fix RowCol casting (#507)
01fbb5f Get std::u8string working right with C++20 (#506)
df9413e more "noexcept" for fewer code-analysis diagnostics (#505)
e6219f9 reduce compiler warnings/code-analysis diagnostics (#504)
4c9ea0e tweaks for VS2019 16.10 (#503)
0d8ea07 reduce compiler warnings (#502)
625b8b5 reduce compiler warnings (#500)
3795758 get rid of more compiler warnings/code-analysis diagnostics (#499)
427f91b reduce compiler-warnings and code-analysis diagnostics (#498)
c82dd9e cleanup compiler and code-analysis diagnistics (#496)
b5105b5 reduce compiler warnings (#495)
e0099cc Develop/compiler optimizations (#494)
0eeb3f9 tweaks to python wrappers made in "nitro" (#492)
5f91f70 fix printf() format string (#491)
55b855a Delete codeql-analysis.yml
603c192 Update codeql-analysis.yml
f306979 Update codeql-analysis.yml
4a1f78f Create codeql-analysis.yml
3c80a65 add back coda_oss::filesystem::path (#490)
eaea659 tweak how std:: features are exposed (#489)
0492f0d simplify code exposing std:: routines (#488)
e5f3d77 remove code-analysis diagnostics (#485)
5be599e make HOME and USERPROFILE the same (#484)
62b22ae cleanup more compiler warnings (#483)
c32ec7d add unit-tests for env-var editing (#482)
311aea4 allow an environment-variable to be "edited" during expansion (#481)
bbcab13 static_assert is C++11, don't use it when checking for C++11 (#480)
068562f fix glitches in expandEnviromentVariables() (#479)
30ed1d9 produce a new Path::expandEnviromentVariables() function (#478)
074a873 remove compiler warnings (#477)
e29f654 latest C++17 tweaks (#476)
c4e681b tweak code when wchar_t is a built-in type (#474)
8449ac2 wchar_t might not be a built-in type on old systems (#473)
a62bdb3 add operator= to sys::Optional (#472)
8e310a7 use compiler-provided macros to determine features (#470)
88405c8 "constexpr" can be hard to get right with older compilers; don't even try (#471)
b195ab3 need at least VS2017 to use the real GSL (#469)
2978f91 tweaks to build with older compilers (#468)
7235b89 The (old) version of SWIG we're using doesn't like certain C++11 features. (#464)
cccde7f only look in the Win1252->UTF-8 map as a last resort (#467)
3db0974 get rid of more compiler warnings (#465)
5e0d2e8 get rid of "char8_t" compiler warning (#463)
d710bc6 make getValue() easier to use (#462)
f5a9284 make getElement*() be consistent for both 0 and >1 (#461)
88be6db consistently add C++14/17/20 library features (#459)
59c3a7e use coda_oss:: as a drop-in replacement for std:: (#458)
35de452 use sys::Filesystem::path rather than std::string (#457)
cace666 make sys::Filesystem::path better conform to std::filesystem::path (#456)
f395edc remove ambiguous overloads w/C++17 (#455)
eac4371 use newly added sys::Optional<> to manage "encoding" (#454)
243ef5e don't derive from std::iterator (#453)
a48b011 Arguments should be "const&" to prevent C4866 (#452)
878bff9 provide std::span (#451)
81727c4 remove newly added a new pure virtual as that's a breaking change (#450)
93cf0f0 main -> master (#449)
5af37a7 be sure code compiles with C++17 (#448)
82b5aec build with C++17 (#407)
6ffb888 reduce compiler warnings (#439)
9137dda GSL (Guideline Support Library) from https://github.com/Microsoft/GSL (#423)
bc5552c update to xerces-c-3.2.3 (#409)
6fe09e1 update to openjpeg-2.3.1 (#417)
6405c0c reduce differences in #407 (#438)
2987bbf tweak how std::filesystem is enabled (#437)
8fd3c2f tweak how std::endian is enabled (#436)
138372c more straight-forward reduction of std::auto_ptr (#435)
f13c7ce straight-forward reduction of std::auto_ptr (#434)
d243b08 add mem::auto_ptr for transition to C++17 (#432)
54ed521 allow clients to specify custom toType and toString (#431)
7f90aab remove trailing underscore from macro (#429)
999e490 with C++11, several sys typedefs are the same on both Windows & *nix (#427)
6f075b1 add sys::Byte (#426)
92221bd allow except::Throwable to derive from std::exception (#421)
a8f52d0 reduce compiler warnings (#424)
63ea20a #including <bit> w/C++17 generates warnings (#408)
10ef060 reduce compiler warnings (#405)
cf233fd forgot Conf.cpp changes for sys::Endian (#403)
cc53b18 fix several compiler warnings/code-analysis diagnostics (#404)
1db3751 implmeent sys::Endian from C++20 (#402)
f042cd6 support std::filesystem if desired (#400)
4895a9f WIN32 is old, but existing code might still use it; _WIN32 is better (#398)
e2a62f8 make it easier to use xml.lite (#396)
1059b7d allow for explicit use of a UTF-8 string (#395)
27de8b8 Optionally record how std::string is encoded when manipulating XML (#378)
e0018ce implement some <filesystem>-like routines until we can use C++17 (#388)
cafb236 Merge pull request #363 from mdaus/feature/fix-compiler-warnings
6a78bec use the existing sys::ubyte rather than making our own pre-C++17 std::byte
14c9fc4 fix a couple of G++ compiler warnings via static_cast<>
e596a60 std::numeric_limits<T>::epsilon() can be "constexpr"
78b0f6b another try at removing the compiler warning from tiff::split()
8e1de21 fixed typo; added a few nots about why we're not using strncpy()
fed3ba8 retore previous tiff::split() code as the change got rid of the compiler warning but wasn't portable
98a5896 get rid of g++ strncpy() warning
798f847 don't use memset(0) with C++ objects
7f697d0 casting result of system() to void doesn't get rid of compiler warning
d55a849 remove new g++ compiler warnings in WSL
d0aaa29 Merge pull request #361 from mdaus/feature/fix-compiler-warnings
cc62e86 fix compiler warnings
d45c1f9 Updates based on peer review comments which include changing ostream to pointer, adding a couple of more tests, and updating all auto_ptr to unique_ptr in unit test.
fb12ba1 Update ArgumentParser to use a stream as an argument if the ignore unknown argument flag is set to true.
536d2b0 Added ability to ignore unknown arguments in the ArgumentParser.
27288f4 Merge pull request #358 from mdaus/conan-options
fd5e1ee Expose additional CMake options in conan recipe
c972161 Remove unneeded CMake function

git-subtree-dir: externals/coda-oss
git-subtree-split: cbfb20ce2e64635131ed17790d93bd54b78754d6

* copy_externals.csh

* fix compiler erros in test_VectorN.cpp

* restore 'main'

* restore 'main'

* Squashed 'externals/coda-oss/' changes from cbfb20ce2e..e87c32b4de

e87c32b4de Merge branch 'master'
605d248984 duplicate existing HDF5 unittests using HighFive (#657)
1342332795 add 'override'; fix ASAN-detected memory leaks (#656)
4c68fa0d34 fix directory names
5ee2f039a9 poor-man's version of "import module std;" (#655)
fad02842cd Add HighFive library (#654)
b31f5b6ab3 have Python 3.6 on a build server
ba8547621a don't put 'struct' in the macro
bd79aa11f2 require Python 3.7, do MD5 check
ecfa687c55 use std::filesystem (instead of sys::filesystem) where possible (#652)
243bc99912 add 'override'
c0fd2124dc wrap common "file open" routines to support sys::expandEnviromentVariables() (#651)
0657f3297a adjust compiler flags for clean CMake builds (#650)
81285872ff build cleanly with all G++ warnings enabled (#649)
b9ea37bbf3 xml::lite::Validator can be moved (#648)
9cfe9a4a8b Merge branch 'master'
e989b09101 createElement() needs to be virtual (#646)
d17b57a545 Merge branch 'master'
fa00a54309 move debug -g flags to be turned on only if debugging (#644)
44ab728544 routines for simple writing to HDF5 files (#643)
aabc5818e6 remove more C++11 work-arounds (#642)
b04ccca174 remove more C++11 work-arounds (#641)
e460970a7c increase GCC warnings (#640)
91284249b5 provide ComplexView iterator support (#639)
453b7ec68b try to get std::make_unique working with old Intel compiler (#638)
5736cfd4db is_trivially_copyable for old Intel compiler (#637)
7c2aea38f7 use H5 SDK naming conventions (#636)
fc3008b8d4 use 'modern' C pre-processor
b44709a950 added ComplexSpansView utility (#635)
986307c9c0 Merge branch 'master'
3fd5ddae52 Merge branch 'main' into develop/remove-cpp11-workarounds
37d7ec76ef restore C++14 workarounds for older compilers (#632)
244dfdb3d3 Merge branch 'develop/main' into develop/remove-cpp11-workarounds
714ca4ed77 restore C++14 workarounds for older compilers
640f2247c2 Delete hdf5-hdf5-1_13_2.tar.gz
eb365cbfba Merge branch 'master' into develop/remove-cpp11-workarounds
57b938eeb4 don't need __INTEL_COMPILER work-around with C++14
65779f3b1a build C code with -std=gnu99
94dc9280fa C++14 work-arounds for an old version of the Intel compiler
3744d05e2f slam-in "main"
82b2fd63b6 restore some C++14 work-arounds for old compilers that only have partial C++14 support
94f6950a27 Merge branch 'main' into develop/remove-cpp11-workarounds
1582c6ac9e further progress on implementing hdf5::lite (#631)
0622af1fe9 rename "11" exception classes to "Ex" (#630)
1384b8a5e2 Merge pull request #629 from mdaus/zlib-update
ebbd57247c ZIP APIs use std::string in this branch
9cc19fe822 ZIP unittests
b8d25d3642 Update zlib to 1.2.13
c53304a907 using std::auto_ptr can cause 'deprecated' warnings
418130d4d1 trying to fix build error on github
59d2f678e3 Release 2022-12-14 (#628)
1e82442914 new --with-optz=fastest-possible option (#627)
6ae81142d9 new --optz=faster option for WAF builds (#626)
11206c1798 sym-links don't work on Windows filesystems
edd3e8fb9c overloads to make simplify routine XML processing (#625)
dfece6106c use sym-links rather than copying files (#624)
22f1f07767 build hdf5.lite with WAF (#623)
5665970439 Conan versioning, hdf5, and pcre2 fixes (#622)
61aa5e4303 Squashed commit of the following:
6557ee34cd Yet another attempt at finding test files for unittests (#621)
501add035a -march=native for fastest optimization level (#620)
f1dd0a5b4f overloads to make creating XML documents easier (#619)
ab45464820 remove C++17 workarounds (#618)
3d5daf702e unittests for creating XML from scratch (#617)
8241dfe7e6 remove last vestiges of std::auto_ptr (#616)
d06dc6534d mem::AutoPtr for C++17 (#615)
83443602a6 mem::AutoPtr class to aid C++17 transition (#614)
f10fa2009c Release 2022-11-04 (#613)
8ab9828204 Squashed commit of the following:
31781a14a0 remove C++17 work-arounds
c15f6930cf Revert "<filesystem> is in C++17"
0fe38c16f3 restore recent buld.py changes
0c75411ee0 <filesystem> is in C++17
bbbcd562ac remove C++11 work-arounds
c1e15e9d9a Merge branch 'main' into main-cpp17
a32e697044 remove exception specifications (#609)
bea818fb03 must use C++17 in this branch
91653a0963 another place where C++17 is set
7d555f2be6 back to C++17
b1969d9962 merge main
084f19126a utilities to find files/directories for unittests (#608)
a3cedada96 Merge branch 'master'
af7229bd83 utilities to find files from a build (#605)
264ae49dd7 be sure downstream projects build w/C++14 (#604)
0792c77bf0 Merge branch 'main' into develop/remove-cpp11-workarounds
7a7b13cbd5 "hello world" for HDF5 (#602)
33cff0ff43 more C++14
7b5e71a006 add HDF5 source code (#603)
ec26f703e7 build in NITRO and SIX (#601)
f4361a9730 make it easier to write cli unit-tests (#600)
34b6fdeee1 tweak toString() to reduce specialization (#599)
e49f273c15 Merge branch 'main' into develop/remove-cpp11-workarounds
240b610448 allow sys::Mutex references, instead of pointers, to be passed to sys::ConditionVar
5907b3ed60 remove C++11 workarounds (#598)
9500d6f4bd Merge branch 'main' into develop/remove-cpp11-workarounds
f1529942f4 std::make_unique instead of new
be9b6a71ca Squashed commit of the following:
62a2ec4e13 Revert "remove our GSL work-around for C++11"
1db082c21f Revert "try the current "main" of GSL"
44b70edde1 try the current "main" of GSL
4edbf6badf Revert ""There is no warning 4814""
bcd7458be4 "There is no warning 4814"
c185bf3f14 starting working on MutexCpp11
313bdd1d98 AtomicCounter* files have been removed
c1c4480519 remove our GSL work-around for C++11
37ae1193e2 remove our mem::SharedPtr, it's now always std::shared_ptr
71f3c12990 remove no-longer-used NSPR code
8e77cb210c removed no-longer-used Irix and Solaris files
fabef69661 use std::atomic for all AtomicCounter implementations
ace5b6d5a6 TEST_FAIL -> TEST_FAIL_MSG
30076c1d16 turns out there was already a TEST_FAIL macro
d73ee16fb4 need "::" to find global test
ba01c48df7 remove C++11 workarounds for C++14 features
cbd4a31aef Squashed commit of the following:
caed59480d Release 2022-08-30_cpp14 (#597)
2630d41e08 get rid of merge conflict
652bce3854 Merge branch 'master'
838c323d6a Merge branch 'master'
4189c429e8 Merge branch 'master'
903ee7ffff Merge branch 'master'
a1c0a1eea6 Merge branch 'master'
1bfe5fc402 Merge branch 'master'
b21c203b8d Squashed commit of the following:
6c2df8bb62 "main" is now C++14 (not C++20)
2ce4161080 Squashed commit of the following:
3a0f7fd14d Merge branch 'master'
142fd7185e Merge branch 'master'
d442e5be0f Merge branch 'master'
32f08a9e40 Squashed commit of the following:
ee15ba3172 Merge branch 'master'
bede753547 fix unit-test with C++20
61a8033f62 consistent use of coda_oss:: and std::
5d3bf9eb83 Merge branch 'master'
34c40bd397 Merge branch 'master'
a9b9d2a9fa Merge branch 'master'
24a3f01afe Merge branch 'master'
f92811a53b Merge branch 'master'
5b542c60fd Squashed commit of the following:
cb0cf94ff6 ByteStream.cpp is now warning-free
f5daa37fc7 cast to DWORD; "const" correctness
bfaf644ff6 #pragma-away compiler warnings from standard headers
72d202dbe3 Merge branch 'master' into develop/reduce-compiler-warnings
414c25c551 build with C++20 in VS
1a99a29da3 Merge branch 'master'
5cca863d7e Merge branch 'master'
6d4776235e Merge branch 'master'
8f1173f4a6 fix build errors
f21af35b0b Merge branch 'master'
4db8ada411 restore changes clobbered with merge from "master"
a1f36e1839 Merge branch 'master'
80fe8e9f8a Merge branch 'master'
33b0f3f6eb Merge branch 'master'
8bd0c8cf4a Merge branch 'main' of github.com:mdaus/coda-oss
7e41b4b5e4 Merge branch 'feature/use-cpp11-code'
fc99e4b3e6 recreate from "master"
510317c07a use std::filesystem to "implement" sys::filesystem
895f6c77cd always implement sys::filesystem
0d83ae22fc "units" changes from master
b58173b781 latest from "master" (not quite)
793e3442c8 Squashed commit of the following:
91a729f5a2 re-create from "master"
b076580cdc trying to fix GCC compiler warning
1687dc7fca Merge branch 'master' into develop/reduce-compiler-warnings
2c5db86dbe Merge branch 'master' into develop/reduce-compiler-warnings
6f76c2e3e1 Update CMakeLists.txt
c3ca4a5388 do in-line initialization
8e67336183 remove G++ compiler warning
a0eff51cf8 Merge branch 'master' into develop/reduce-compiler-warnings
af19d88a65 Merge branch 'master' into develop/reduce-compiler-warnings
ba31cbaa9b use "void*" to avoid reinterpret_cast<>
08da1f8a1d Merge branch 'master' into develop/reduce-compiler-warnings
d1d453a2e2 Merge branch 'master' into develop/reduce-compiler-warnings
f5074a996a CODA_OSS_NDEBUG is extra gunk and not used; omit for now.
22de488585 don't even bother compiling our own versions of localtime_s() and gmtime_s() if we're not going to use them (compiler warning about "unused static funtion.")
0c92eba58a tweak NDEBUG/CODA_OSS_NDEBUG; update comments
544604775f Don't need to expose our own versions of localtime_s() and gmtime_s()
a050796c1b Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings
fed6046170 older compilers want std::string() as argument to std::logic_error()
cf2c502a64 do more debug & release builds on GitHub
d4aa99256f build some debug targets on Gitlab
3682452586 tweak CODA_OSS_DEBUG again for G++
24ba64f71f tweak how CODA_OSS_DEBUG is set
9680e8f0e1 add check for _GLIBCXX_DEBUG
943218f83a Merge branch 'master' into develop/reduce-compiler-warnings
01c68e7056 %#@*@%)*%@ fix RowCol::cast() again! :-(
b8472b4576 oops ... gsl::narrow<> should be gsl::narrow_cast<> so that int/double conversion doesn't throw
109255ca83 "final" breaks SWIG; wrap RowCol use of gsl::narrow
e51e4c2ad2 no need to create local just to return
e546f2510c Merge branch 'master' into develop/reduce-compiler-warnings
d1391f9898 use template for to_std_string() overloading
566942680a fix std::char8_t when building with C++20
cf604b1abf fix C++17 build errors
48a0fbedbf get rid of coda_oss namespace; use CODA_OSS_cpp17 instead
9706a43365 remove code-analysis diagnostics
50592e4f84 G++ complains about an unneeded call to std::move()
9c7643c3f7 Merge branch 'master' into develop/reduce-compiler-warnings
ecfe1f8a75 more "noexcept"
b7ac50fb9b Merge branch 'master' into develop/reduce-compiler-warnings
eaecf46ed2 tweak CODA_OSS_cplusplus from "main"
5773b1ec15 trying to get C++17 WAF build working on Windows
a048a00a1c unique names for waf & CMake
7a5a0d5b28 do a better job of setting CODA_OSS_DEBUG
4355aae923 Merge branch 'master' into develop/reduce-compiler-warnings
1fd8cede23 cleanup for VS 2019 16.10
4dffa13949 explicitly =delete copy/assignment
df8f8920a0 Merge branch 'master' into develop/reduce-compiler-warnings
42b4e99b62 remove code-analysis diagnostics
70ce322c94 reduce compiler warnings/code-analysis diagnostics when building six
20eac2f495 Merge branch 'master' into develop/reduce-compiler-warnings
ff3ded56d7 get rid of more compiler warnings/code-analysis diagnostics
669dd51ffe Merge branch 'master' into develop/reduce-compiler-warnings
623b65ab93 Merge branch 'master' into develop/reduce-compiler-warnings
11c75df53f fix release build errors
66f048b92d turn on more compiler warnings where possible
eb615e315e consolidate calls to mem::make::unique
a6f5eb690d reduce use of explicit new
84d5e1b011 use mem::make::unique instead of explicit new
019d726eac = default for default constructors
86ab5d8f37 use std::unique_ptr and "const noexcept"
b071972d76 another batch of =default for default constructors
98276da943 more =default for default .ctor()s
ceb7bc596e do default constructors with =default
7bed517508 more code-analysis cleanup
f9c04b1177 "noexcept" code-analysis warnings
6586ae3908 need gsl::make_span from gsl/span_ext
722089774f remove gsl/mem dependency cycle
d741a07611 use gsl::narrow<> instead of static_cast
99eb4b36e2 get rid of signed/unsigned mismatch compiler warning
814450522d remove more code-analysis diagnostics
c8441b309a Merge branch 'master' into develop/reduce-compiler-warnings
e6d70a9ffb last of "const" from code-analysis
b8445814a4 mark a few more things as "const" per code-analysis
d18544ec7e don't need to create temporary std::strings
ee7faa9790 still more code-analysis cleanup
5cd6f864d8 cleanup more code-analysis diagnostics
492fb0a866 one more compiler warning about implicitly deleted copy/assignment
b8f782c880 remove compiler warnings about implicitly deleted copy/assignment/move
14d1d1cb82 #pragma-away warnings from GSL
86c40ea6c2 assert() to prevent some code-analysis diagnostics
7204517a96 make copy/assignment explicit
3ce8240797 reduce code-analysis diagnostics
01e367a56e Merge branch 'master' into develop/reduce-compiler-warnings
03f3ddde91 proper printf format
877d7dc93a Merge branch 'master' into develop/reduce-compiler-warnings
5a4a3d5751 code-analysis doesn't like C-style casts
a3fdae4165 code-analysis doesn't like NULL
6309baedce Merge branch 'master' into develop/reduce-compiler-warnings
d1194a2fed Merge branch 'master' into develop/reduce-compiler-warnings
535b4757d3 Merge branch 'develop/reduce-compiler-warnings' of github.com:mdaus/coda-oss into develop/reduce-compiler-warnings
a60b95d60d "constexpr" can be hard to get right with older C++11 compilers; don't even try
c07b5303ec Merge branch 'master' into develop/reduce-compiler-warnings
04306bbee0 need at least VS2017 to use the real GSL
796ad820b5 Merge branch 'master' into develop/reduce-compiler-warnings
16c240cd66 Merge branch 'master' into develop/reduce-compiler-warnings
e07e89f0cf turn on "warnings as errors" for CMAKE builds
5c019f8917 complex "constexpr" functions not available with our version of g++
4ab074a584 fix a few more compiler warnings ... nearing the end! :-)
dea7ea41bd And still more compiler warnings ... almost done 🤞🏻
fbe3bbb205 remove assorted compiler warnings
e60b7fd3c1 Merge branch 'master' into develop/reduce-compiler-warnings
e9df212c62 Arguments should be "const&" to prevent C4866
94e75cbeda Merge branch 'master' into develop/reduce-compiler-warnings
d3130414af Merge branch 'master' into develop/reduce-compiler-warnings
9a5e71f314 Merge branch 'master' into develop/reduce-compiler-warnings
bd27c0232a Merge branch 'master' into develop/reduce-compiler-warnings
c053362d2c remove still more compiler warnings
9f133b85a3 remove some more compiler warnings
0883c729c1 Merge branch 'master' into develop/reduce-compiler-warnings
f4b7668800 avoid comparision between signed/unsigned to prevent compiler warning
1e6564a6eb eliminate more compiler warnings
85a7b8ad0f remove a few compiler warnings
09c82049fe Merge branch 'master' into develop/reduce-compiler-warnings
31f1662 Merge branch 'master' into develop/reduce-compiler-warnings
a313562 Merge branch 'feature/fix-compiler-warnings' into develop/reduce-compiler-warnings
8547cdd eliminiate GCC warnings from Filesystem.h
b5044b2 fix several compiler warnings/code-analysis diagnostics
9d2f90b GetEnvironmentVariable() and getenv() aren't quite the same
6faa366 remove more compiler warnings

git-subtree-dir: externals/coda-oss
git-subtree-split: e87c32b4def7c535b57acd69d18ee3b2c8128207

* copy_externals

* Squashed 'externals/coda-oss/' changes from e87c32b4de..857ff0af32

857ff0af32 HighFive utility routines (#661)
35c19e7e81 change actions to @V3 (#660)
cde6147ced tweak HighFive wrappers (#659)

git-subtree-dir: externals/coda-oss
git-subtree-split: 857ff0af32ebe20a6f1d7059f1f12edf904a2ec0
  • Loading branch information
J. Daniel Smith authored Mar 20, 2023
1 parent c8ecbe9 commit 90d513a
Show file tree
Hide file tree
Showing 4 changed files with 158 additions and 47 deletions.
2 changes: 1 addition & 1 deletion ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ except that C++14 is now required. [master](https://github.com/mdaus/nitro/tree
* [coda-oss](https://github.com/mdaus/coda-oss) release [2022-08-30](https://github.com/mdaus/coda-oss/releases/tag/2022-08-30)
* Build JPEG decompression as a plug-in.
* tweak unittests so they run in SIX.
* ~~Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/nitro/tree/main).~~
* Final C++11 release 🤞🏻; future releases will be C++14 from [main](https://github.com/mdaus/nitro/tree/main).

## [Version 2.10.11](https://github.com/mdaus/nitro/releases/tag/NITRO-2.10.11); August 2, 2022
* [coda-oss](https://github.com/mdaus/coda-oss) release [2022-08-02](https://github.com/mdaus/coda-oss/releases/tag/2022-08-02)
Expand Down
12 changes: 6 additions & 6 deletions externals/coda-oss/.github/workflows/build_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
Expand Down Expand Up @@ -59,9 +59,9 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.python-version }}-CMake
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install python dependencies
Expand Down Expand Up @@ -97,9 +97,9 @@ jobs:
name: ${{ matrix.os }}-${{ matrix.python-version }}-waf
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: configure_with_swig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
*/

#include <string>
#include <stdexcept>
#include <vector>

#include "highfive/H5Easy.hpp"
#include "highfive/H5DataSet.hpp"
Expand All @@ -40,8 +42,21 @@ namespace hdf5
{
namespace lite
{

// Save the trouble of specifying a return type of std::vector<>
template <typename T>
inline auto v_load(const H5Easy::File& file, const std::string& dataset_name)
{
return H5Easy::load<std::vector<T>>(file, dataset_name);
}
template <typename T>
inline auto vv_load(const H5Easy::File& file, const std::string& dataset_name)
{
return H5Easy::load<std::vector<std::vector<T>>>(file, dataset_name);
}

template <typename T>
inline HighFive::DataSet writeDataSet(H5Easy::File& file, SpanRC<T> data, const std::string& dataset_name /*, TODO ...*/)
inline HighFive::DataSet writeDataSet(H5Easy::File& file, const std::string& dataset_name, SpanRC<T> data /*, TODO ...*/)
{
const std::vector<size_t> dims{data.dims().row, data.dims().col};
const HighFive::DataSpace dataspace{dims};
Expand All @@ -50,11 +65,26 @@ inline HighFive::DataSet writeDataSet(H5Easy::File& file, SpanRC<T> data, const
return retval;
}

template<typename T>
inline HighFive::DataSet writeDataSet(const H5Easy::File& file, const std::string& dataset_name, const T& values /*, TODO ...*/)
{
auto dataset = file.createDataSet<T>(dataset_name, HighFive::DataSpace::From(values));
dataset.write(values);
return dataset;
}

// This loads 2D data into one large block of contiguous memory.
// (HighFive::DataSet::read() uses a vector of vectors).
template <typename T>
inline SpanRC<T> readDataSet(HighFive::DataSet& dataSet, std::vector<T>& result /*, TODO ...*/)
inline SpanRC<T> readDataSet(const HighFive::DataSet& dataSet, std::vector<T>& result /*, TODO ...*/)
{
const auto dimensions = dataSet.getSpace().getDimensions();
const types::RowCol<size_t> dims(dimensions[0], dimensions[1]);
if (dimensions.size() > 2)
{
throw std::invalid_argument("'dataSet' has unexpected dimensions.");
}
const auto col = dimensions.size() == 2 ? dimensions[1] : 1;
const types::RowCol<size_t> dims(dimensions[0], col);

result.resize(dims.area());
dataSet.read(result.data());
Expand All @@ -63,7 +93,7 @@ inline SpanRC<T> readDataSet(HighFive::DataSet& dataSet, std::vector<T>& result
}

template <typename T>
inline SpanRC<T> load(H5Easy::File& file, const std::string& dataset_name, std::vector<T>& result /*, TODO ...*/)
inline SpanRC<T> loadDataSet(const H5Easy::File& file, const std::string& dataset_name, std::vector<T>& result /*, TODO ...*/)
{
auto dataSet = file.getDataSet(dataset_name);
return readDataSet(dataSet, result);
Expand Down
153 changes: 117 additions & 36 deletions externals/coda-oss/modules/c++/hdf5.lite/unittests/test_highfive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "sys/FileFinder.h"
#include "types/RowCol.h"
#include "mem/ComplexView.h"

#include "highfive/H5Easy.hpp"
#include "highfive/H5DataSet.hpp"
Expand All @@ -46,10 +47,23 @@ TEST_CASE(test_highfive_load)
static const auto path = find_unittest_file("example.h5");

const H5Easy::File file(path.string());
const auto lat = H5Easy::load<std::vector<double>>(file, "/g4/lat");
TEST_ASSERT_EQ(lat.size(), 19);
TEST_ASSERT_ALMOST_EQ(lat[0], -90.0);
TEST_ASSERT_ALMOST_EQ(lat[0], -lat[18]);

{
const auto lat = H5Easy::load<std::vector<double>>(file, "/g4/lat");
TEST_ASSERT_EQ(lat.size(), 19);
TEST_ASSERT_ALMOST_EQ(lat[0], -90.0);
TEST_ASSERT_ALMOST_EQ(lat[0], -lat[18]);
}
{
std::vector<double> lat;
const auto rc = hdf5::lite::loadDataSet(file, "/g4/lat", lat);
TEST_ASSERT_EQ(lat.size(), 19);
TEST_ASSERT_EQ(lat.size(), rc.area());
TEST_ASSERT_EQ(rc.dims().row, 19);
TEST_ASSERT_EQ(rc.dims().col, 1);
TEST_ASSERT_ALMOST_EQ(lat[0], -90.0);
TEST_ASSERT_ALMOST_EQ(lat[0], -lat[18]);
}
}

TEST_CASE(test_highfive_FileException)
Expand Down Expand Up @@ -77,18 +91,43 @@ TEST_CASE(test_highfive_nested)
static const auto path = find_unittest_file("123_barfoo_catdog_cx.h5");

const H5Easy::File file(path.string());
const auto i = H5Easy::load<std::vector<std::vector<double>>>(file, "/1/bar/cat/i");
const auto i = hdf5::lite::vv_load<double>(file, "/1/bar/cat/i");
TEST_ASSERT_EQ(i.size(), 1);
TEST_ASSERT_EQ(i[0].size(), 10);

const auto r = H5Easy::load<std::vector<std::vector<double>>>(file, "/1/bar/dog/r");
const auto r = hdf5::lite::vv_load<double>(file, "/1/bar/dog/r");
TEST_ASSERT_EQ(r.size(), 1);
TEST_ASSERT_EQ(r[0].size(), 10);

TEST_ASSERT_EQ(i.size(), r.size());
TEST_ASSERT_EQ(i[0].size(), r[0].size());
}

template<typename T>
static auto read_complex(const HighFive::DataSet& r, const HighFive::DataSet& i)
{
std::vector<T> r_result;
hdf5::lite::readDataSet(r, r_result);
std::vector<T> i_result;
hdf5::lite::readDataSet(i, i_result);
return std::make_pair(r, i);
}
template<typename T>
static auto read_complex(const HighFive::Group& group)
{
const auto i = group.getDataSet("i");
const auto r = group.getDataSet("r");
return read_complex<T>(r, i);
}
template<typename T>
static auto load_complex(const H5Easy::File& file,
const std::string& r_path, const std::string& i_path)
{
const auto r = hdf5::lite::v_load<T>(file, r_path);
const auto i = hdf5::lite::v_load<T>(file, i_path);
return std::make_pair(r, i);
}

TEST_CASE(test_highfive_nested_small)
{
// top group: Data
Expand All @@ -100,15 +139,22 @@ TEST_CASE(test_highfive_nested_small)
static const auto path = find_unittest_file("nested_complex_float32_data_small.h5");

const H5Easy::File file(path.string());
const auto i = H5Easy::load<std::vector<float>>(file, "/Data/1/bar/cat/a/i");

const auto i = hdf5::lite::v_load<float>(file, "/Data/1/bar/cat/a/i");
TEST_ASSERT_EQ(i.size(), 10);
auto actual = std::accumulate(i.cbegin(), i.cend(), 0.0);
TEST_ASSERT_EQ(actual, 0.0);
auto actual = std::accumulate(i.begin(), i.end(), 0.0f);
TEST_ASSERT_EQ(actual, 0.0f);

const auto r = H5Easy::load<std::vector<float>>(file, "/Data/5/foo/dog/d/r");
const auto r = hdf5::lite::v_load<float>(file, "/Data/5/foo/dog/d/r");
TEST_ASSERT_EQ(r.size(), 10);
actual = std::accumulate(r.cbegin(), r.cend(), 0.0);
TEST_ASSERT_EQ(actual, 10.0);
actual = std::accumulate(r.begin(), r.end(), 0.0f);
TEST_ASSERT_EQ(actual, 10.0f);

const auto a = load_complex<float>(file, "/Data/1/bar/cat/a/r", "/Data/1/bar/cat/a/i");
const auto cx_view = mem::make_ComplexSpansView(a.first, a.second);
const auto cx_actual = std::accumulate(cx_view.begin(), cx_view.end(), std::complex<float>(0.0));
TEST_ASSERT_EQ(cx_actual.real(), 10.0f);
TEST_ASSERT_EQ(cx_actual.imag(), 0.0f);
}

TEST_CASE(test_highfive_nested_small_wrongType)
Expand Down Expand Up @@ -228,15 +274,18 @@ TEST_CASE(test_highfive_datasetinfo)
TEST_ASSERT_EQ(time.listAttributeNames().size(), 2);
}

static void read_complex(const std::string& testName, const HighFive::Group& group)
{
const auto i = group.getDataSet("i");
TEST_ASSERT(i.getDataType().getClass() == HighFive::DataTypeClass::Float);
TEST_ASSERT_EQ(i.getElementCount(), 10);

const auto r = group.getDataSet("r");
static void read_complex(const std::string& testName, const HighFive::DataSet& r, const HighFive::DataSet& i)
{
TEST_ASSERT(r.getDataType().getClass() == HighFive::DataTypeClass::Float);
TEST_ASSERT_EQ(r.getElementCount(), 10);
TEST_ASSERT(i.getDataType().getClass() == HighFive::DataTypeClass::Float);
TEST_ASSERT_EQ(i.getElementCount(), 10);
std::ignore = read_complex<double>(r, i);
}
static void read_complex(const std::string& testName, const HighFive::Group& group)
{
read_complex(testName, group.getDataSet("r"), group.getDataSet("i"));
std::ignore = read_complex<double>(group);
}
TEST_CASE(test_highfive_info_nested)
{
Expand Down Expand Up @@ -299,26 +348,58 @@ TEST_CASE(test_highfive_info_nested)

//*******************************************************************************

TEST_CASE(test_highfive_create)
template<typename T>
static auto make_data(const types::RowCol<size_t>& dims)
{
static const auto path_ = find_unittest_file("example.h5");
static const auto path = path_.parent_path() / "TEST_highfive_create_TMP.h5";
H5Easy::File file(path.string(), H5Easy::File::Overwrite);

const types::RowCol<size_t> dims{10, 20};
std::vector<std::vector<float>> DS1(dims.row);
float d = 0.0f;
for (auto&& r : DS1)
std::vector<std::vector<T>> retval(dims.row);
int d = 0;
for (auto&& r : retval)
{
r.resize(dims.col);
for (size_t c = 0; c < r.size(); c++)
for (auto&& v : r)
{
r[c] = d++;
v = static_cast<T>(d++);
}
}
return retval;
}

TEST_CASE(test_highfive_dump)
{
static const std::string dataset_name("/DS1");
using dataset_t = float;
static const auto path_ = find_unittest_file("example.h5");
const auto path = path_.parent_path() / "TEST_highfive_create_TMP.h5";

{
const std::vector<dataset_t> data{1, 2, 3, 4, 5};
H5Easy::File file(path.string(), H5Easy::File::Overwrite);
//std::ignore = H5Easy::dump(file, dataset_name, data);
TEST_SUCCESS;
}

H5Easy::dump(file, "/DS1", DS1);
TEST_SUCCESS;
const types::RowCol<size_t> dims{10, 20};
const auto data = make_data<dataset_t>(dims);
{
H5Easy::File file(path.string(), H5Easy::File::Overwrite);
//std::ignore = H5Easy::dump(file, dataset_name, data);
TEST_SUCCESS;
}

// Be sure we can read the file just written
const H5Easy::File file(path.string(), H5Easy::File::ReadOnly);
//const auto DS1 = hdf5::lite::vv_load<dataset_t>(file, dataset_name);
//TEST_ASSERT_EQ(DS1.size(), dims.row);
//TEST_ASSERT_EQ(DS1[0].size(), dims.col);
//for (size_t r = 0; r < DS1.size(); r++)
//{
// for (size_t c = 0; c < DS1[r].size(); c++)
// {
// const auto expected = data[r][c];
// const auto actual = DS1[r][c];
// TEST_ASSERT_EQ(actual, expected);
// }
//}
}

TEST_CASE(test_highfive_write)
Expand All @@ -339,7 +420,7 @@ TEST_CASE(test_highfive_write)
}
{
H5Easy::File file(path.string(), H5Easy::File::Overwrite);
const auto ds = hdf5::lite::writeDataSet(file, data, "DS1");
const auto ds = hdf5::lite::writeDataSet(file, "DS1", data);
const auto dimensions = ds.getDimensions();
TEST_ASSERT_EQ(dimensions.size(), 2);
TEST_ASSERT_EQ(dims.row, dimensions[0]);
Expand All @@ -350,7 +431,7 @@ TEST_CASE(test_highfive_write)
{
const H5Easy::File file(path.string());

const auto DS1 = H5Easy::load<std::vector<std::vector<double>>>(file, "/DS1");
const auto DS1 = hdf5::lite::vv_load<double>(file, "/DS1");
TEST_ASSERT_EQ(DS1.size(), dims.row);
TEST_ASSERT_EQ(DS1[0].size(), dims.col);

Expand All @@ -368,7 +449,7 @@ TEST_CASE(test_highfive_write)
H5Easy::File file(path.string());

std::vector<double> result;
const auto rc = hdf5::lite::load(file, "/DS1", result);
const auto rc = hdf5::lite::loadDataSet(file, "/DS1", result);
TEST_ASSERT(rc.dims() == dims);
TEST_ASSERT_EQ(dims.area(), result.size());
for (size_t i = 0; i < result.size(); i++)
Expand All @@ -391,6 +472,6 @@ TEST_MAIN(
TEST_CHECK(test_highfive_datasetinfo);
TEST_CHECK(test_highfive_info_nested);

//TEST_CHECK(test_highfive_create);
TEST_CHECK(test_highfive_dump);
//TEST_CHECK(test_highfive_write);
)

0 comments on commit 90d513a

Please sign in to comment.