Page tree

The license could not be verified: License Certificate has expired!









Creates a new simple dataspace and opens it for access


H5S_CREATE_SIMPLE ( rank, current_dims, maximum_dims )


hid_t H5Screate_simple(
        int rank,
        const hsize_t * current_dims,
        const hsize_t * maximum_dims

Fortran90 Interface: h5screate_simple_f
SUBROUTINE h5screate_simple_f(rank, dims, space_id, hdferr, maxdims) 
  INTEGER, INTENT(IN) :: rank             ! Number of dataspace dimensions 
  INTEGER(HSIZE_T), INTENT(IN) :: dims(*) ! Array with current dimension sizes 
  INTEGER(HID_T), INTENT(OUT) :: space_id ! Dataspace identifier 
  INTEGER, INTENT(OUT) :: hdferr          ! Error code
                                          ! 0 on success and -1 on failure
                                          ! Array with the maximum 
                                          ! dimension sizes 
END SUBROUTINE h5screate_simple_f

int rankIN: Number of dimensions of dataspace
const hsize_t * current_dimsIN: Array specifying the size of each dimension
const hsize_t * maximum_dims    IN: Array specifying the maximum size of each dimension


H5S_CREATE_SIMPLE creates a new simple dataspace and opens it for access, returning a dataspace identifier.

rank is the number of dimensions used in the dataspace.

current_dims is a one-dimensional array of size rank specifying the size of each dimension of the dataset. maximum_dims is an array of the same size specifying the upper limit on the size of each dimension.

Any element of current_dims can be 0 (zero). Note that no data can be written to a dataset if the size of any dimension of its current dataspace is 0. This is sometimes a useful initial state for a dataset.

maximum_dims may be the null pointer, in which case the upper limit is the same as current_dims. Otherwise, no element of maximum_dims should be smaller than the corresponding element of current_dims.

If an element of maximum_dims is H5S_UNLIMITED, the maximum size of the corresponding dimension is unlimited.

Any dataset with an unlimited dimension must also be chunked; see H5P_SET_CHUNK. Similarly, a dataset must be chunked if current_dims does not equal maximum_dims.

The dataspace identifier returned from this function must be released with H5S_CLOSE or resource leaks will occur.

Once a dataspace has been created, specific regions or elements in the dataspace can be selected and selections can be removed, as well. For example, H5S_SELECT_HYPERSLAB selects a region in a dataspace and H5S_SELECT_ELEMENTS selects array elements in a dataspace. These functions are used for subsetting. H5S_SELECT_NONE removes all selections from a dataspace and is used in Parallel HDF5 when a process does not have or need to write data.


Returns a dataspace identifier if successful; otherwise returns a negative value.




--- Last Modified: October 23, 2020 | 02:50 PM