diff --git a/opening-hdf5/README.md b/opening-hdf5/README.md index 301bc25..44aca1b 100644 --- a/opening-hdf5/README.md +++ b/opening-hdf5/README.md @@ -11,7 +11,6 @@ interactive-track-and-trace/ ``` ## Compiling -Makes use of `mdspan` which is not supported by GCC libstdc++ at time of writing. See [compiler support](https://en.cppreference.com/w/cpp/compiler_support/23) for `mdspan`. Let the current directory be the `src` directory. Run: ```shell mkdir build @@ -19,3 +18,7 @@ cd build cmake .. make ``` + +### Building with Linux +Makes use of `mdspan` which is not supported by GCC libstdc++ at time of writing. See [compiler support](https://en.cppreference.com/w/cpp/compiler_support/23) for `mdspan`. Probably you will need to install Clang libc++. + diff --git a/opening-hdf5/src/CMakeLists.txt b/opening-hdf5/src/CMakeLists.txt index 07d1489..aad0646 100644 --- a/opening-hdf5/src/CMakeLists.txt +++ b/opening-hdf5/src/CMakeLists.txt @@ -6,7 +6,7 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -find_package(netCDF REQUIRED) +# find_package(netCDF REQUIRED) add_executable(ReadHDF5 main.cpp) diff --git a/opening-hdf5/src/main.cpp b/opening-hdf5/src/main.cpp index 691e160..68e0ee8 100644 --- a/opening-hdf5/src/main.cpp +++ b/opening-hdf5/src/main.cpp @@ -91,6 +91,7 @@ int main () { auto [vec, size] = get3DMat(vars.find("uo")->second); + auto arr = std::mdspan(vec.data(), size); print3DMatrixSlice(arr, 100);