[Top] [Prev] [Next] [Bottom]

SDsetchunkcache

intn SDsetchunkcache(int32 sds_id, int32 maxcache, int32 flags)
sds_id

IN:

SD interface identifier returned from SDstart

maxcache

IN:

Maximum number of chunks in the cache

flags

IN:

Flags determining the behavior of the routine

Purpose

Determines the size of the chunk cache.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

By default, when a generic SDS is promoted to be a chunked SDS, the maxcache parameter is set to the number of chunks along the last dimension and a cache for the chunks is created.

If the chunk cache is full and the value of the maxcache parameter is larger than the currently allowed maximum number of cached chunks, then the maximum number of cached chunks is reset to the value of maxcache. If the chunk cache is not full, then the size of the chunk cache is reset to the value of maxcache only if it is greater than current number of chunks in the cache.

Never set the value of maxcache to be less than the number of chunks along the last dimension of the biggest slab to be written or read via SDreaddata or SDwritedata. Doing this will cause internal thrashing. See the section on chunking in Chapter 13 of the HDF User's Guide, titled HDF Performance Issues, for more information on this.

Currently the only allowed value of the flags parameter is 0, which designates default operation. In the near future, the value HDF_CACHEALL will be supported to be used to specifiy that the whole SDS object is to be cached.



[Top] [Prev] [Next] [Bottom]

hdfhelp@ncsa.uiuc.edu
HDF User's Reference Manual, Draft 06/09/97, NCSA HDF Development Group.