mirror of
https://github.com/HDFGroup/hdf5.git
synced 2026-09-25 04:09:44 +03:00
* Consolidate documentation under doc/ directory
Move user-facing guides from release_docs/ and doxygen/ into a single
doc/ root. release_docs/ now holds only release artifacts (changelogs,
history, release process, maintainer info).
- git mv release_docs/INSTALL*.md, USING_*.md, README_HPC.md,
BuildSystemNotes.md, AutotoolsToCMakeOptions.md,
HDF5_Library_2.0.0_Migration_Guide.md → doc/
- git mv doxygen/ → doc/doxygen/
- Update CMakeLists.txt: HDF5_DOXYGEN_DIR and add_subdirectory path
- Update CMakeInstallation.cmake: all install paths for moved files
- Update bin/make_vers: hardcoded doxygen/ path substitution
- Update doc/doxygen/CMakeLists.txt: EXAMPLES_DIRECTORY and comments
- Update README.md, CONTRIBUTING.md, SECURITY.md, config/README.md,
release_docs/RELEASE_PROCESS.md: links to moved files
- Update doxygen .dox files: release_docs/ URLs for moved guides
- Rewrite release_docs/README.md for narrowed scope
* Add HDF5_DOCS_DIR variable for doc/ root path
Introduce HDF5_DOCS_DIR = \${HDF5_SOURCE_DIR}/doc so that
CMakeInstallation.cmake and future callers reference the doc/
directory symbolically rather than by hardcoded path.
HDF5_DOXYGEN_DIR is now derived from HDF5_DOCS_DIR.
62 lines
1.5 KiB
C
62 lines
1.5 KiB
C
/* -*- c-file-style: "stroustrup" -*- */
|
|
|
|
#include "hdf5.h"
|
|
|
|
#include <assert.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
int ret_val = EXIT_SUCCESS;
|
|
|
|
//! <!-- [large_attribute] -->
|
|
{
|
|
__label__ fail_attr, fail_aspace, fail_fapl, fail_file;
|
|
hid_t fapl, file, aspace, attr;
|
|
|
|
if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) {
|
|
ret_val = EXIT_FAILURE;
|
|
goto fail_fapl;
|
|
}
|
|
#if H5_VERSION_GE(1, 10, 0)
|
|
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST) < 0) {
|
|
#elif H5_VERSION_GE(1, 8, 0)
|
|
if (H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) {
|
|
#else
|
|
#error Only HDF5 1.8.x and later supported.
|
|
#endif
|
|
ret_val = EXIT_FAILURE;
|
|
goto fail_file;
|
|
}
|
|
if ((file = H5Fcreate("large_attribute.h5", H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) {
|
|
ret_val = EXIT_FAILURE;
|
|
goto fail_file;
|
|
}
|
|
|
|
if ((aspace = H5Screate_simple(1, (hsize_t[]){1024 * 1024}, NULL)) < 0) {
|
|
ret_val = EXIT_FAILURE;
|
|
goto fail_aspace;
|
|
}
|
|
if ((attr = H5Acreate(file, "4MiB", H5T_IEEE_F32LE, aspace, H5P_DEFAULT, H5P_DEFAULT)) < 0) {
|
|
ret_val = EXIT_FAILURE;
|
|
goto fail_attr;
|
|
}
|
|
|
|
H5Aclose(attr);
|
|
fail_attr:
|
|
H5Sclose(aspace);
|
|
fail_aspace:
|
|
H5Fclose(file);
|
|
fail_file:
|
|
H5Pclose(fapl);
|
|
fail_fapl:;
|
|
}
|
|
//! <!-- [large_attribute] -->
|
|
|
|
assert(ret_val == EXIT_SUCCESS);
|
|
|
|
return ret_val;
|
|
}
|