Page tree

 

JAVA

FORTRAN

C++

C

 

Link

H5P_SET_ALIGNMENT

Sets alignment properties of a file access property list

Procedure:

H5P_SET_ALIGNMENT ( plist, threshold, alignment )

Signature:

herr_t H5Pset_alignment(hid_t plist,
        hsize_t threshold,
        hsize_t alignment
    )
  

Fortran90 Interface: h5pset_alignment_f
    
SUBROUTINE h5pset_alignment_f(prp_id, threshold,  alignment, hdferr)
  IMPLICIT NONE
  INTEGER(HID_T), INTENT(IN) :: prp_id       ! Property list identifier
  INTEGER(HSIZE_T), INTENT(IN) :: threshold  ! Threshold value
  INTEGER(HSIZE_T), INTENT(IN) :: alignment  ! Alignment value
  INTEGER, INTENT(OUT) :: hdferr             ! Error code
                                             ! 0 on success and -1 on failure
END SUBROUTINE h5pset_alignment_f
	

Parameters:
hid_t plistIN: Identifier for a file access property list
hsize_t threshold    IN: Threshold value. Note that setting the threshold value to 0 (zero) has the effect of a special case, forcing everything to be aligned
hsize_t alignmentIN: Alignment value

Description:

H5Pset_alignment sets the alignment properties of a file access property list so that any file object greater than or equal in size to threshold bytes will be aligned on an address which is a multiple of alignment. The addresses are relative to the end of the user block; the alignment is calculated by subtracting the user block size from the absolute file address and then adjusting the address to be a multiple of alignment.

Default values for threshold and alignment are one, implying no alignment. Generally the default values will result in the best performance for single-process access to the file. For MPI IO and other parallel systems, choose an alignment which is a multiple of the disk block size.

If the file space handling strategy is set to H5F_FSPACE_STRATEGY_PAGE, then the alignment set via this routine is ignored. The file space handling strategy is set by H5Pset_file_space_strategy.

Returns:

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

Example:

Coming Soon!

--- Last Modified: December 04, 2017 | 08:33 AM