[Back to Interface] [Prev] [Next]

SDsetfillmode/sfsflmd

intn SDsetfillmode(int32 sd_id, intn fill_mode)

sd_id IN:

SD interface identifier returned by SDstart

fill_mode IN:

Fill mode

Purpose

Sets the current fill mode of a file.

Return value

Returns the fill mode value before it was reset if successful and FAIL (or -1) otherwise.

Description

SDsetfillmode applies the fill mode specified by the parameter fill_mode to all data sets contained in the file identified by the parameter sd_id.

Possible values of fill_mode are SD_FILL (or 0) and SD_NOFILL (or 256). SD_FILL is the default mode, and indicates that fill values will be written when the data set is created. SD_NOFILL indicates that fill values will not be written.

When a data set without unlimited dimensions is created, by default the first SDwritedata call will fill the entire data set with the default or user-defined fill value (set by SDsetfillvalue). In data sets with an unlimited dimension , if a new write operation takes place along the unlimited dimension beyond the last location of the previous write operation, the array locations between these written areas will be initialized to the user-defined fill value, or the default fill value if a user-defined fill value has not been specified.

If it is certain that all data set values will be written before any read operation takes place, there is no need to write the fill values. Simply call SDsetfillmode with fill_mode value set to SD_NOFILL, which will eliminate all fill value write operations to the data set. For large data sets, this can improve the speed by almost 50%.

FORTRAN

integer function sfsflmd(sd_id, fill_mode)

integer sd_id, fill_mode



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.