Set the destination form of a field¶
saf_target_field
is a function defined in field.c.
Synopsis:
-
int
saf_target_field
(SAF_FieldTarget *target, SAF_Unit *targ_units, SAF_Cat *targ_storage_decomp, SAF_Cat *targ_coeff_assoc, int targ_assoc_ratio, SAF_Cat *targ_eval_coll, SAF_Eval *targ_func, hid_t targ_data_type, SAF_Interleave comp_intlv, int *comp_order)¶
Formal Arguments:
target
: [OUT
] The target information that will be initialized by this call.targ_units
: The new units. This parameter is ignored at this time.targ_storage_decomp
: The new storage decomposition.targ_coeff_assoc
: This parameter is ignored at this time.targ_assoc_ratio
: This parameter is ignored at this time.targ_eval_coll
: This parameter is ignored at this time.targ_func
: This parameter is ignored at this time.targ_data_type
: The new destination data type. When the saf_write_field function is called the datatype of the dataset produced is determined by this parameter. When the saf_read_field function is called, the datatype of the values placed in the caller’s memory is determined by this parameter. If a value ofH5I_INVALID_HID
is passed for this parameter then datatype targeting is turned off and the default mechanism for determining the destination datatype is used.comp_intlv
: The particular fashion in which components are interleaved. Currently there are really only two:SAF__INTERLEAVE_VECTOR
andSAF__INTERLEAVE_COMPONENT
. These represent theXYZXYZ
…``XYZ`` and theXXX
…``XYYY``…``YZZZ``…``Z`` cases. Note that interleave really only deals with a single blob of storage. In the case of a composite field whose coefficients are stored independently on the component fields then interleave really has no meaning (useSAF__INTERLEAVE_INDEPENDENT
). Interleave only has meaning on fields with storage. In the case of a scalar field interleave is also meaningless, both cases degenerate to the same layout:XXX
…``X`` (useSAF__INTERLEAVE_NONE
). This parameter is ignored at this time.comp_order
: Only relevant for fields with component fields. This value indicates the order of the field IDs in theCOMP_FLDS
relative to the registered order. PassNULL
if the permutation is the identity. This parameter is ignored at this time.
Description: Setup targeting information for a field during read or write. Please see the introductory note in the Field’s chapter for some information on field targeting.
Preconditions:
STORAGE_DECOMP
must be eitherNOT_SET
,SELF_DECOMP
or a valid cat handle. (low-cost)target
must be non-null. (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.
See Also:
- saf_read_field: 16.21: Read the data for a field
- saf_write_field: 16.23: Write the data for a field
- Fields: Introduction for current chapter