Last modified: 18 March 2016

Name: H5Pset_virtual

Signature:
herr_t H5Pset_virtual( hid_t dcpl_id, hid_t vspace_id, const char *src_file_name, const char *src_dset_name, hid_t src_space_id )

Purpose:
Sets the mapping between virtual and source datasets.

Description:
H5Pset_virtual maps elements of the virtual dataset (VDS) described by the virtual dataspace identifier vspace_id to the elements of the source dataset described by the source dataset dataspace identifier src_space_id. The source dataset is identified by the name of the file where it is located, src_file_name, and the name of the dataset, src_dset_name.

Parameters:
hid_t dcpl_id   IN: The identifier of the dataset creation property list that will be used when creating the virtual dataset.
hid_t vspace_id   IN: The dataspace identifier with the selection within the virtual dataset applied, possibly an unlimited selection.
const char *src_file_name   IN: The name of the HDF5 file where the source dataset is located. The file might not exist yet. The name can be specified using a C-style printf statement as described below.
const char *src_dset_name   IN: The path to the HDF5 dataset in the file specified by src_file_name. The dataset might not exist yet. The dataset name can be specified using a C-style printf statement as described below.
hid_t src_space_id   IN: The source dataset’s dataspace identifier with a selection applied, possibly an unlimited selection

C-style printf Formatting Statements:
C-style printf formatting allows a pattern to be specified in the name of a source file or dataset. Strings for the file and dataset names are treated as literals except for the following substitutions:

"%%"   Replaced with a single "%" (percent) character.
"%<d>b"   Where "<d> is the virtual dataset dimension axis (0-based) and "b" indicates that the block count of the selection in that dimension should be used. The full expression (for example, "%0b") is replaced with a single numeric value when the mapping is evaluated at VDS access time. Example code for many source and virtual dataset mappings is available in the “Examples of Source to Virtual Dataset Mapping” chapter in “RFC: HDF5 Virtual Dataset” (see [1]).

If the printf form is used for the source file or dataset names, the selection in the source dataset’s dataspace must be fixed-size; for more information see [1].

Returns:
Returns a non-negative value if successful; otherwise returns a negative value.

Fortran Interface: h5pset_virtual_f
Signature:
  SUBROUTINE h5pset_virtual_f(dcpl_id, vspace_id, src_file_name, 
                              src_dset_name, src_space_id, hdferr)
    INTEGER(HID_T), INTENT(IN)   :: dcpl_id
    INTEGER(HID_T), INTENT(IN)   :: vspace_id
    CHARACTER(LEN=*), INTENT(IN) :: src_file_name
    CHARACTER(LEN=*), INTENT(IN) :: src_dset_name
    INTEGER(HID_T), INTENT(IN)   :: src_space_id
    INTEGER, INTENT(OUT)         :: hdferr
Inputs:
  dcpl_id       - The identifier of the dataset creation property list that 
                  will be used when creating the virtual dataset.
  vspace_id     - The dataspace identifier with the selection within the virtual 
                  dataset applied, possibly an unlimited selection.
  src_file_name - The name of the HDF5 file where the source dataset is located.
  src_dset_name - The path to the HDF5 dataset in the file specified by 
                  src_file_name.
  src_space_id  - The source dataset's dataspace identifier with a selection 
                  applied, possibly an unlimited selection
Outputs:
  hdferr  - Returns 0 if successful and -1 if fails

See Also:
  • Virtual Dataset Overview
  • Using HDF5 Virtual Datasets
     
  •  
    Supporting functions:
  • H5Pset_layout
  • H5Pget_layout
  • H5Sis_regular_hyperslab
  • H5Sget_regular_hyperslab
  • H5Sselect_hyperslab
  • VDS functions:
  • H5Pget_virtual_count
  • H5Pget_virtual_vspace
  • H5Pget_virtual_srcspace
  • H5Pget_virtual_filename
  • H5Pget_virtual_dsetname
  • H5Pset_virtual_printf_gap
  • H5Pget_virtual_printf_gap
  • H5Pset_virtual_view
  • H5Pget_virtual_view

  • History:
    Release     Change
    1.10.0 C function introduced with this release.