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. In SAF__ONE parallel mode, all processes except the process identified by the rank argument of the SAF__ONE macro are free to pass SAF__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. Pass NULL if this return value is not desired.
  • count: [OUT] The returned count of the collection. Pass NULL if this return value is not desired.
  • ispec: [OUT] The returned indexing specification for the collection. Pass NULL if this return value is not desired.
  • is_decomp: [OUT] Whether the collection is a decomposition of the containing set. Pass NULL 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. Pass NULL if this return value is not desired. Otherwise, if member_sets points to NULL, the library will allocate space for the returned set handles. Otherwise the caller allocates the space and the input value of count 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 and member_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: