Describe a collection¶
saf_describe_collection
is a function defined in coll.c.
Synopsis:
-
int
saf_describe_collection
(SAF_ParMode pmode, SAF_Set *containing_set, SAF_Cat *cat, SAF_CellType *t, int *count, SAF_IndexSpec *ispec, SAF_DecompMode *is_decomp, SAF_Set **member_sets)¶
Formal Arguments:
pmode
: The parallel mode.containing_set
: The containing set of the desired collection. InSAF__ONE
parallel mode, all processes except the process identified by the rank argument of theSAF__ONE
macro are free to passSAF__NULL
with the set’s database handle.cat
: The collection category of the desired collection.t
: [OUT
] The cell-type of the members of the collection. PassNULL
if this return value is not desired.count
: [OUT
] The returned count of the collection. PassNULL
if this return value is not desired.ispec
: [OUT
] The returned indexing specification for the collection. PassNULL
if this return value is not desired.is_decomp
: [OUT
] Whether the collection is a decomposition of the containing set. PassNULL
if this return value is not desired.member_sets
: If the collection is non-primitive, this argument is used to return the specific set handles for the sets that are in the collection. PassNULL
if this return value is not desired. Otherwise, ifmember_sets
points toNULL
, the library will allocate space for the returned set handles. Otherwise the caller allocates the space and the input value ofcount
indicates the size of the space in number of set handles.
Description: Returns information about a collection.
Preconditions:
pmode
must be valid. (low-cost)- The
containing_set
must be valid for all participating processes. (low-cost) cat
must be a valid category handle for participating processes. (low-cost)NUM_SETS
andmember_sets
must be compatible for return value allocation. (low-cost)
Return Value: The constant SAF__SUCCESS
is returned when this function is successful. Otherwise this function either returns
an error number or throws an exception, depending on the value of the library’s error handling property.
Issues: having both arguments NULL
will cause _saf_valid_memhints
to return false, but in this particular case, having both
arguments NULL
is ok, so we dont call _saf_valid_memhints
if both are 0.
See Also:
- Collections: Introduction for current chapter