summaryrefslogtreecommitdiffstats
path: root/doc
ModeNameSize
-rw-r--r--Access.33049logstatsplain
-rw-r--r--AddErrInfo.313471logstatsplain
-rw-r--r--Alloc.33119logstatsplain
-rw-r--r--AllowExc.31683logstatsplain
-rw-r--r--AppInit.33073logstatsplain
-rw-r--r--AssocData.33614logstatsplain
-rw-r--r--Async.36803logstatsplain
-rw-r--r--BackgdErr.33237logstatsplain
-rw-r--r--Backslash.31521logstatsplain
-rw-r--r--BoolObj.33796logstatsplain
-rw-r--r--ByteArrObj.34226logstatsplain
-rw-r--r--CallDel.32577logstatsplain
-rw-r--r--Cancel.32652logstatsplain
-rw-r--r--ChnlStack.33965logstatsplain
-rw-r--r--Class.310377logstatsplain
-rw-r--r--CmdCmplt.31042logstatsplain
-rw-r--r--Concat.31812logstatsplain
-rw-r--r--CrtChannel.339329logstatsplain
-rw-r--r--CrtChnlHdlr.33812logstatsplain
-rw-r--r--CrtCloseHdlr.31860logstatsplain
-rw-r--r--CrtCommand.36398logstatsplain
-rw-r--r--CrtFileHdlr.33678logstatsplain
-rw-r--r--CrtInterp.37017logstatsplain
-rw-r--r--CrtMathFnc.36754logstatsplain
-rw-r--r--CrtObjCmd.313279logstatsplain
-rw-r--r--CrtSlave.310250logstatsplain
-rw-r--r--CrtTimerHdlr.32954logstatsplain
-rw-r--r--CrtTrace.38603logstatsplain
-rw-r--r--DString.36148logstatsplain
-rw-r--r--DetachPids.33154logstatsplain
-rw-r--r--DictObj.310684logstatsplain
-rw-r--r--DoOneEvent.34212logstatsplain
-rw-r--r--DoWhenIdle.33493logstatsplain
-rw-r--r--DoubleObj.32722logstatsplain
-rw-r--r--DumpActiveMemory.32342logstatsplain
-rw-r--r--Encoding.328265logstatsplain
-rw-r--r--Ensemble.39262logstatsplain
-rw-r--r--Environment.31089logstatsplain
-rw-r--r--Eval.38842logstatsplain
-rw-r--r--Exit.36038logstatsplain
-rw-r--r--ExprLong.33768logstatsplain
-rw-r--r--ExprLongObj.33777logstatsplain
-rw-r--r--FileSystem.368039logstatsplain
-rw-r--r--FindExec.32019logstatsplain
-rwxr-xr-xGetCwd.31792logstatsplain
-rw-r--r--GetHostName.3719logstatsplain
-rw-r--r--GetIndex.34373logstatsplain
-rw-r--r--GetInt.33194logstatsplain
-rw-r--r--GetOpnFl.32173logstatsplain
-rw-r--r--GetStdChan.33677logstatsplain
-rw-r--r--GetTime.34401logstatsplain
-rwxr-xr-xGetVersion.31705logstatsplain
-rw-r--r--Hash.313654logstatsplain
-rw-r--r--Init.3787logstatsplain
-rw-r--r--InitStubs.33542logstatsplain
-rw-r--r--IntObj.36456logstatsplain
-rw-r--r--Interp.36129logstatsplain
-rw-r--r--Limit.37925logstatsplain
-rw-r--r--LinkVar.38853logstatsplain
-rw-r--r--ListObj.310520logstatsplain
-rw-r--r--Method.310529logstatsplain
-rw-r--r--NRE.312943logstatsplain
-rw-r--r--Namespace.36462logstatsplain
-rw-r--r--Notifier.329871logstatsplain
-rw-r--r--Object.314282logstatsplain
-rw-r--r--ObjectType.310473logstatsplain
-rw-r--r--OpenFileChnl.331312logstatsplain
-rw-r--r--OpenTcp.37545logstatsplain
-rw-r--r--Panic.33590logstatsplain
-rw-r--r--ParseArgs.37315logstatsplain
-rw-r--r--ParseCmd.321177logstatsplain
-rw-r--r--PkgRequire.33428logstatsplain
-rw-r--r--Preserve.34634logstatsplain
-rw-r--r--PrintDbl.31981logstatsplain
-rw-r--r--RecEvalObj.32006logstatsplain
-rw-r--r--RecordEval.32134logstatsplain
-rw-r--r--RegConfig.34413logstatsplain
-rw-r--r--RegExp.315321logstatsplain
-rw-r--r--SaveResult.35396logstatsplain
-rw-r--r--SetChanErr.36262logstatsplain
-rw-r--r--SetErrno.32158logstatsplain
-rw-r--r--SetRecLmt.31938logstatsplain
-rw-r--r--SetResult.310795logstatsplain
-rw-r--r--SetVar.310372logstatsplain
-rw-r--r--Signal.31070logstatsplain
-rw-r--r--Sleep.31135logstatsplain
-rw-r--r--SourceRCFile.3927logstatsplain
-rw-r--r--SplitList.37746logstatsplain
-rw-r--r--SplitPath.33480logstatsplain
-rw-r--r--StaticPkg.32971logstatsplain
-rw-r--r--StdChannels.34929logstatsplain
-rw-r--r--StrMatch.31696logstatsplain
-rw-r--r--StringObj.316791logstatsplain
-rw-r--r--SubstObj.32825logstatsplain
-rw-r--r--TCL_MEM_DEBUG.33789logstatsplain
-rw-r--r--Tcl.n9224logstatsplain
-rw-r--r--TclZlib.36593logstatsplain
-rw-r--r--Tcl_Main.38913logstatsplain
-rw-r--r--Thread.38653logstatsplain
-rw-r--r--ToUpper.33058logstatsplain
-rw-r--r--TraceCmd.37335logstatsplain
-rw-r--r--TraceVar.316946logstatsplain
-rw-r--r--Translate.32943logstatsplain
-rw-r--r--UniCharIsAlpha.32692logstatsplain
-rw-r--r--UpVar.32947logstatsplain
-rw-r--r--Utf.310925logstatsplain
-rw-r--r--WrongNumArgs.32956logstatsplain
-rw-r--r--after.n5654logstatsplain
-rw-r--r--append.n1383logstatsplain
-rw-r--r--apply.n3213logstatsplain
-rw-r--r--array.n7745logstatsplain
-rw-r--r--bgerror.n4079logstatsplain
-rw-r--r--binary.n34630logstatsplain
-rw-r--r--break.n1351logstatsplain
-rw-r--r--case.n2629logstatsplain
-rw-r--r--catch.n5246logstatsplain
-rw-r--r--cd.n1210logstatsplain
-rw-r--r--chan.n38783logstatsplain
-rw-r--r--class.n4926logstatsplain
-rw-r--r--clock.n40828logstatsplain
-rw-r--r--close.n4050logstatsplain
-rw-r--r--concat.n1693logstatsplain
-rw-r--r--continue.n1379logstatsplain
-rw-r--r--copy.n1917logstatsplain
-rw-r--r--coroutine.n4935logstatsplain
-rw-r--r--dde.n7420logstatsplain
-rw-r--r--define.n13797logstatsplain
-rw-r--r--dict.n14712logstatsplain
-rw-r--r--encoding.n3931logstatsplain
-rw-r--r--eof.n1653logstatsplain
-rw-r--r--error.n2403logstatsplain
-rw-r--r--eval.n2766logstatsplain
-rw-r--r--exec.n16919logstatsplain
-rw-r--r--exit.n1436logstatsplain
-rw-r--r--expr.n15342logstatsplain
-rw-r--r--fblocked.n2447logstatsplain
-rw-r--r--fconfigure.n12382logstatsplain
-rw-r--r--fcopy.n5804logstatsplain
-rw-r--r--file.n21752logstatsplain
-rw-r--r--fileevent.n6533logstatsplain
-rw-r--r--filename.n7550logstatsplain
-rw-r--r--flush.n1631logstatsplain
-rw-r--r--for.n2941logstatsplain
-rw-r--r--foreach.n3296logstatsplain
-rw-r--r--format.n10602logstatsplain
-rw-r--r--gets.n2521logstatsplain
-rw-r--r--glob.n8688logstatsplain
-rw-r--r--global.n1940logstatsplain
-rw-r--r--history.n4262logstatsplain
-rw-r--r--http.n21812logstatsplain
-rw-r--r--if.n2444logstatsplain
-rw-r--r--incr.n1731logstatsplain
-rw-r--r--info.n24697logstatsplain
-rw-r--r--interp.n41743logstatsplain
-rw-r--r--join.n1245logstatsplain
-rw-r--r--lappend.n1591logstatsplain
-rw-r--r--lassign.n1915logstatsplain
-rw-r--r--library.n13956logstatsplain
-rw-r--r--lindex.n3363logstatsplain
-rw-r--r--linsert.n1764logstatsplain
-rw-r--r--list.n1687logstatsplain
-rw-r--r--llength.n1378logstatsplain
-rw-r--r--load.n6947logstatsplain
-rw-r--r--lrange.n2292logstatsplain
-rw-r--r--lrepeat.n1244logstatsplain
-rw-r--r--lreplace.n2911logstatsplain
-rw-r--r--lreverse.n930logstatsplain
-rw-r--r--lsearch.n7339logstatsplain
-rwxr-xr-xlset.n4527logstatsplain
-rw-r--r--lsort.n7426logstatsplain
-rw-r--r--man.macros5880logstatsplain
-rw-r--r--mathfunc.n9471logstatsplain
-rw-r--r--mathop.n10799logstatsplain
-rw-r--r--memory.n4668logstatsplain
-rw-r--r--msgcat.n11794logstatsplain
-rw-r--r--my.n1716logstatsplain
-rw-r--r--namespace.n35994logstatsplain
-rw-r--r--next.n6802logstatsplain
-rw-r--r--object.n4483logstatsplain
-rw-r--r--open.n18692logstatsplain
-rw-r--r--package.n13354logstatsplain
-rw-r--r--packagens.n1998logstatsplain
-rw-r--r--pid.n1592logstatsplain
-rw-r--r--pkgMkIndex.n10653logstatsplain
-rw-r--r--platform.n2803logstatsplain
-rw-r--r--platform_shell.n2331logstatsplain
-rw-r--r--prefix.n3400logstatsplain
-rw-r--r--proc.n4131logstatsplain
-rw-r--r--puts.n3501logstatsplain
-rw-r--r--pwd.n1237logstatsplain
-rw-r--r--re_syntax.n26877logstatsplain
-rw-r--r--read.n3593logstatsplain
-rw-r--r--refchan.n14000logstatsplain
-rw-r--r--regexp.n7027logstatsplain
-rw-r--r--registry.n7519logstatsplain
-rw-r--r--regsub.n5985logstatsplain
-rw-r--r--rename.n1512logstatsplain
-rw-r--r--return.n12354logstatsplain
-rw-r--r--safe.n15610logstatsplain
-rw-r--r--scan.n11312logstatsplain
-rw-r--r--seek.n2870logstatsplain
-rw-r--r--self.n4167logstatsplain
-rw-r--r--set.n2564logstatsplain
-rw-r--r--socket.n7557logstatsplain
-rw-r--r--source.n2196logstatsplain
-rw-r--r--split.n2684logstatsplain
-rw-r--r--string.n16872logstatsplain
-rw-r--r--subst.n4788logstatsplain
-rw-r--r--switch.n6611logstatsplain
-rw-r--r--tailcall.n1892logstatsplain
-rw-r--r--tclsh.15969logstatsplain
-rw-r--r--tcltest.n46336logstatsplain
-rw-r--r--tclvars.n19245logstatsplain
-rw-r--r--tell.n1656logstatsplain
-rw-r--r--throw.n1800logstatsplain
-rw-r--r--time.n1214logstatsplain
-rw-r--r--tm.n10665logstatsplain
-rw-r--r--trace.n18164logstatsplain
-rw-r--r--transchan.n6816logstatsplain
-rw-r--r--try.n4114logstatsplain
-rw-r--r--unknown.n4195logstatsplain
-rw-r--r--unload.n7420logstatsplain
-rw-r--r--unset.n2196logstatsplain
-rw-r--r--update.n2385logstatsplain
-rw-r--r--uplevel.n4093logstatsplain
-rw-r--r--upvar.n4795logstatsplain
-rw-r--r--variable.n3168logstatsplain
-rw-r--r--vwait.n6957logstatsplain
-rw-r--r--while.n2285logstatsplain
-rw-r--r--zlib.n12193logstatsplain
>**pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(btree_split_ratio); HDassert(size); if(NULL != *pp) { /* Encode the size of a double*/ *(*pp)++ = (uint8_t)sizeof(double); /* Encode the left split value */ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio) btree_split_ratio++; /* Encode the middle split value */ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio) btree_split_ratio++; /* Encode the right split value */ H5_ENCODE_DOUBLE(*pp, *(const double *)btree_split_ratio) } /* end if */ /* Size of B-tree split ratio values */ *size += 1 + (3 * sizeof(double)); FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_btree_split_ratio_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_btree_split_ratio_dec * * Purpose: Callback routine which is called whenever the B-tree split * ratio property in the dataset transfer property list * is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_btree_split_ratio_dec(const void **_pp, void *_value) { double *btree_split_ratio = (double *)_value; /* B-tree split ratio */ unsigned enc_size; /* Size of encoded property */ const uint8_t **pp = (const uint8_t **)_pp; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(btree_split_ratio); /* Decode the size */ enc_size = *(*pp)++; if(enc_size != sizeof(double)) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "double value can't be decoded") /* Decode the left, middle & left B-tree split ratios */ H5_DECODE_DOUBLE(*pp, btree_split_ratio[0]) H5_DECODE_DOUBLE(*pp, btree_split_ratio[1]) H5_DECODE_DOUBLE(*pp, btree_split_ratio[2]) done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_btree_split_ratio_dec() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_set * * Purpose: Copies a data transform property when it's set for a property list * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Tuesday, Sept 1, 2015 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_set(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ HDassert(value); /* Make copy of data transform */ if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_set() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_get * * Purpose: Copies a data transform property when it's retrieved for a property list * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Tuesday, Sept 1, 2015 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_get(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ HDassert(value); /* Make copy of data transform */ if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_get() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_enc * * Purpose: Callback routine which is called whenever the data transform * property in the dataset transfer property list * is encoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Monday, August 6, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_enc(const void *value, void **_pp, size_t *size) { const H5Z_data_xform_t *data_xform_prop = *(const H5Z_data_xform_t * const *)value; /* Create local alias for values */ const char *pexp = NULL; /* Pointer to transform expression */ size_t len = 0; /* Length of transform expression */ uint8_t **pp = (uint8_t **)_pp; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); HDassert(size); /* Check for data transform set */ if(NULL != data_xform_prop) { /* Get the transform expression */ if(NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") /* Get the transform string expression size */ len = HDstrlen(pexp) + 1; } /* end if */ if(NULL != *pp) { uint64_t enc_value; unsigned enc_size; /* encode the length of the prefix */ enc_value = (uint64_t)len; enc_size = H5VM_limit_enc_size(enc_value); HDassert(enc_size < 256); *(*pp)++ = (uint8_t)enc_size; UINT64ENCODE_VAR(*pp, enc_value, enc_size); if(NULL != data_xform_prop) { /* Sanity check */ HDassert(pexp); /* Copy the expression into the buffer */ HDmemcpy(*pp, (const uint8_t *)pexp, len); *pp += len; *pp[0] = '\0'; } /* end if */ } /* end if */ /* Size of encoded data transform */ *size += (1 + H5VM_limit_enc_size((uint64_t)len)); if(NULL != pexp) *size += len; done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_dec * * Purpose: Callback routine which is called whenever the data transform * property in the dataset transfer property list * is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Monday, August 6, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_dec(const void **_pp, void *_value) { H5Z_data_xform_t **data_xform_prop = (H5Z_data_xform_t **)_value; /* New data xform property */ size_t len; /* Length of encoded string */ const uint8_t **pp = (const uint8_t **)_pp; unsigned enc_size; uint64_t enc_value; herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(data_xform_prop); HDcompile_assert(sizeof(size_t) <= sizeof(uint64_t)); /* Decode the length of xform expression */ enc_size = *(*pp)++; HDassert(enc_size < 256); UINT64DECODE_VAR(*pp, enc_value, enc_size); len = (size_t)enc_value; if(0 != len) { if(NULL == (*data_xform_prop = H5Z_xform_create((const char *)*pp))) HGOTO_ERROR(H5E_PLIST, H5E_CANTCREATE, FAIL, "unable to create data transform info") *pp += len; } /* end if */ else *data_xform_prop = H5D_XFER_XFORM_DEF; done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_dec() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_del * * Purpose: Frees memory allocated by H5P_dxfr_xform_set * * Return: Success: SUCCEED, Failure: FAIL * * Programmer: Leon Arber larber@uiuc.edu * * Date: April 9, 2004 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_del(hid_t H5_ATTR_UNUSED prop_id, const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC HDassert(value); if(H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_del() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_copy * * Purpose: Creates a copy of the user's data transform string and its * associated parse tree. * * Return: Success: SUCCEED, Failure: FAIL * * Programmer: Leon Arber larber@uiuc.edu * * Date: April 9, 2004 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_copy(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC /* Sanity check */ HDassert(value); /* Make copy of data transform */ if(H5Z_xform_copy((H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCOPY, FAIL, "error copying the data transform info") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_copy() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_cmp * * Purpose: Compare two data transforms. * * Return: positive if VALUE1 is greater than VALUE2, negative if VALUE2 is * greater than VALUE1 and zero if VALUE1 and VALUE2 are equal. * * Programmer: Quincey Koziol * Wednesday, August 15, 2012 * *------------------------------------------------------------------------- */ static int H5P__dxfr_xform_cmp(const void *_xform1, const void *_xform2, size_t H5_ATTR_UNUSED size) { const H5Z_data_xform_t * const *xform1 = (const H5Z_data_xform_t * const *)_xform1; /* Create local aliases for values */ const H5Z_data_xform_t * const *xform2 = (const H5Z_data_xform_t * const *)_xform2; /* Create local aliases for values */ const char *pexp1, *pexp2; /* Pointers to transform expressions */ herr_t ret_value = 0; /* Return value */ FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(xform1); HDassert(xform2); HDassert(size == sizeof(H5Z_data_xform_t *)); /* Check for a property being set */ if(*xform1 == NULL && *xform2 != NULL) HGOTO_DONE(-1); if(*xform1 != NULL && *xform2 == NULL) HGOTO_DONE(1); if(*xform1) { HDassert(*xform2); /* Get the transform expressions */ pexp1 = H5Z_xform_extract_xform_str(*xform1); pexp2 = H5Z_xform_extract_xform_str(*xform2); /* Check for property expressions */ if(pexp1 == NULL && pexp2 != NULL) HGOTO_DONE(-1); if(pexp1 != NULL && pexp2 == NULL) HGOTO_DONE(1); if(pexp1) { HDassert(pexp2); ret_value = HDstrcmp(pexp1, pexp2); } /* end if */ } /* end if */ done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_copy() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_xform_close * * Purpose: Frees memory allocated by H5P_dxfr_xform_set * * Return: Success: SUCCEED, Failure: FAIL * * Programmer: Leon Arber larber@uiuc.edu * * Date: April 9, 2004 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_xform_close(const char H5_ATTR_UNUSED *name, size_t H5_ATTR_UNUSED size, void *value) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_STATIC HDassert(value); if(H5Z_xform_destroy(*(H5Z_data_xform_t **)value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTCLOSEOBJ, FAIL, "error closing the parse tree") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P__dxfr_xform_close() */ /*------------------------------------------------------------------------- * Function: H5Pset_data_transform * * Purpose: Sets data transform expression. * * Return: Non-negative on success/Negative on failure * * Programmer: Leon Arber * Monday, March 07, 2004 * *------------------------------------------------------------------------- */ herr_t H5Pset_data_transform(hid_t plist_id, const char *expression) { H5P_genplist_t *plist; /* Property list pointer */ H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*s", plist_id, expression); /* Check arguments */ if(expression == NULL) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "expression cannot be NULL") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* See if a data transform is already set, and free it if it is */ if(H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") /* Destroy previous data transform property */ if(H5Z_xform_destroy(data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CLOSEERROR, FAIL, "unable to release data transform expression") /* Create data transform info from expression */ if(NULL == (data_xform_prop = H5Z_xform_create(expression))) HGOTO_ERROR(H5E_PLINE, H5E_NOSPACE, FAIL, "unable to create data transform info") /* Update property list (takes ownership of transform) */ if(H5P_poke(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Error setting data transform expression") done: if(ret_value < 0) if(data_xform_prop && H5Z_xform_destroy(data_xform_prop) < 0) HDONE_ERROR(H5E_PLINE, H5E_CLOSEERROR, FAIL, "unable to release data transform expression") FUNC_LEAVE_API(ret_value) } /* end H5Pset_data_transform() */ /*------------------------------------------------------------------------- * Function: H5Pget_data_transform * * Purpose: Gets data transform expression. * * Return: Non-negative on success/Negative on failure * * Comments: * If `expression' is non-NULL then write up to `size' bytes into that * buffer and always return the length of the transform name. * Otherwise `size' is ignored and the function does not store the expression, * just returning the number of characters required to store the expression. * If an error occurs then the buffer pointed to by `expression' (NULL or non-NULL) * is unchanged and the function returns a negative value. * If a zero is returned for the name's length, then there is no name * associated with the ID. * * Programmer: Leon Arber * August 27, 2004 * *------------------------------------------------------------------------- */ ssize_t H5Pget_data_transform(hid_t plist_id, char *expression /*out*/, size_t size) { H5P_genplist_t *plist; /* Property list pointer */ H5Z_data_xform_t *data_xform_prop = NULL; /* New data xform property */ size_t len; const char* pexp; ssize_t ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("Zs", "ixz", plist_id, expression, size); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") if(H5P_peek(plist, H5D_XFER_XFORM_NAME, &data_xform_prop) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "error getting data transform expression") if(NULL == data_xform_prop) HGOTO_ERROR(H5E_PLIST, H5E_BADVALUE, FAIL, "data transform has not been set") /* Get the data transform string */ if(NULL == (pexp = H5Z_xform_extract_xform_str(data_xform_prop))) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "failed to retrieve transform expression") /* Copy into application buffer */ len = HDstrlen(pexp); if(expression) { HDstrncpy(expression, pexp, MIN(len + 1, size)); if(len >= size) expression[size - 1] = '\0'; } /* end if */ ret_value = (ssize_t)len; done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_data_transform() */ /*------------------------------------------------------------------------- * Function: H5Pset_buffer * * Purpose: Given a dataset transfer property list, set the maximum size * for the type conversion buffer and background buffer and * optionally supply pointers to application-allocated buffers. * If the buffer size is smaller than the entire amount of data * being transfered between application and file, and a type * conversion buffer or background buffer is required then * strip mining will be used. * * If TCONV and/or BKG are null pointers then buffers will be * allocated and freed during the data transfer. * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Monday, March 16, 1998 * *------------------------------------------------------------------------- */ herr_t H5Pset_buffer(hid_t plist_id, size_t size, void *tconv, void *bkg) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iz*x*x", plist_id, size, tconv, bkg); /* Check arguments */ if(size == 0) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "buffer size must not be zero") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ if(H5P_set(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer buffer size") if(H5P_set(plist, H5D_XFER_TCONV_BUF_NAME, &tconv) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set transfer type conversion buffer") if(H5P_set(plist, H5D_XFER_BKGR_BUF_NAME, &bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "Can't set background type conversion buffer") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_buffer() */ /*------------------------------------------------------------------------- * Function: H5Pget_buffer * * Purpose: Reads values previously set with H5Pset_buffer(). * * Return: Success: Buffer size. * * Failure: 0 * * Programmer: Robb Matzke * Monday, March 16, 1998 * *------------------------------------------------------------------------- */ size_t H5Pget_buffer(hid_t plist_id, void **tconv/*out*/, void **bkg/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ size_t size; /* Type conversion buffer size */ size_t ret_value; /* Return value */ FUNC_ENTER_API(0) H5TRACE3("z", "ixx", plist_id, tconv, bkg); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, 0, "can't find object for ID") /* Return values */ if(tconv) if(H5P_get(plist, H5D_XFER_TCONV_BUF_NAME, tconv) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get transfer type conversion buffer") if(bkg) if(H5P_get(plist, H5D_XFER_BKGR_BUF_NAME, bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, 0, "Can't get background type conversion buffer") /* Get the size */ if(H5P_get(plist, H5D_XFER_MAX_TEMP_BUF_NAME, &size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, 0, "Can't set transfer buffer size") /* Set the return value */ ret_value = size; done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_buffer() */ /*------------------------------------------------------------------------- * Function: H5Pset_preserve * * Purpose: When reading or writing compound data types and the * destination is partially initialized and the read/write is * intended to initialize the other members, one must set this * property to TRUE. Otherwise the I/O pipeline treats the * destination datapoints as completely uninitialized. * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Tuesday, March 17, 1998 * *------------------------------------------------------------------------- */ herr_t H5Pset_preserve(hid_t plist_id, hbool_t status) { H5P_genplist_t *plist; /* Property list pointer */ H5T_bkg_t need_bkg; /* Value for background buffer type */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "ib", plist_id, status); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ need_bkg = status ? H5T_BKG_YES : H5T_BKG_NO; if(H5P_set(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_preserve() */ /*------------------------------------------------------------------------- * Function: H5Pget_preserve * * Purpose: The inverse of H5Pset_preserve() * * Return: Success: TRUE or FALSE * * Failure: Negative * * Programmer: Robb Matzke * Tuesday, March 17, 1998 * *------------------------------------------------------------------------- */ int H5Pget_preserve(hid_t plist_id) { H5T_bkg_t need_bkg; /* Background value */ H5P_genplist_t *plist; /* Property list pointer */ int ret_value; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE1("Is", "i", plist_id); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get value */ if(H5P_get(plist, H5D_XFER_BKGR_BUF_TYPE_NAME, &need_bkg) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") /* Set return value */ ret_value = need_bkg ? TRUE : FALSE; done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_preserve() */ /*------------------------------------------------------------------------- * Function: H5Pset_edc_check * * Purpose: Enable or disable error-detecting for a dataset reading * process. This error-detecting algorithm is whichever * user chooses earlier. This function cannot control * writing process. * * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * Jan 3, 2003 * *------------------------------------------------------------------------- */ herr_t H5Pset_edc_check(hid_t plist_id, H5Z_EDC_t check) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iZe", plist_id, check); /* Check argument */ if(check != H5Z_ENABLE_EDC && check != H5Z_DISABLE_EDC) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "not a valid value") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ if(H5P_set(plist, H5D_XFER_EDC_NAME, &check) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_edc_check() */ /*------------------------------------------------------------------------- * Function: H5Pget_edc_check * * Purpose: Enable or disable error-detecting for a dataset reading * process. This error-detecting algorithm is whichever * user chooses earlier. This function cannot control * writing process. * * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * Jan 3, 2003 * *------------------------------------------------------------------------- */ H5Z_EDC_t H5Pget_edc_check(hid_t plist_id) { H5P_genplist_t *plist; /* Property list pointer */ H5Z_EDC_t ret_value; /* Return value */ FUNC_ENTER_API(H5Z_ERROR_EDC) H5TRACE1("Ze", "i", plist_id); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, H5Z_ERROR_EDC, "can't find object for ID") /* Update property list */ if(H5P_get(plist, H5D_XFER_EDC_NAME, &ret_value) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, H5Z_ERROR_EDC, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_edc_check() */ /*------------------------------------------------------------------------- * Function: H5Pset_filter_callback * * Purpose: Sets user's callback function for dataset transfer property * list. This callback function defines what user wants to do * if certain filter fails. * * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * Jan 14, 2003 * * Modifications: * *------------------------------------------------------------------------- */ herr_t H5Pset_filter_callback(hid_t plist_id, H5Z_filter_func_t func, void *op_data) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value=SUCCEED; /* return value */ H5Z_cb_t cb_struct; FUNC_ENTER_API(FAIL) H5TRACE3("e", "ix*x", plist_id, func, op_data); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ cb_struct.func = func; cb_struct.op_data = op_data; if (H5P_set(plist,H5D_XFER_FILTER_CB_NAME,&cb_struct)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /*------------------------------------------------------------------------- * Function: H5Pset_type_conv_cb * * Purpose: Sets user's callback function for dataset transfer property * list. This callback function defines what user wants to do * if there's exception during datatype conversion. * * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * April 15, 2004 * * Modifications: * *------------------------------------------------------------------------- */ herr_t H5Pset_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t op, void *operate_data) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value=SUCCEED; /* return value */ H5T_conv_cb_t cb_struct; FUNC_ENTER_API(FAIL) H5TRACE3("e", "ix*x", plist_id, op, operate_data); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ cb_struct.func = op; cb_struct.user_data = operate_data; if (H5P_set(plist,H5D_XFER_CONV_CB_NAME,&cb_struct)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /*------------------------------------------------------------------------- * Function: H5Pget_type_conv_cb * * Purpose: Gets callback function for dataset transfer property * list. This callback function defines what user wants to do * if there's exception during datatype conversion. * * Return: Non-negative on success/Negative on failure * * Programmer: Raymond Lu * April 15, 2004 * * Modifications: * *------------------------------------------------------------------------- */ herr_t H5Pget_type_conv_cb(hid_t plist_id, H5T_conv_except_func_t *op, void **operate_data) { H5P_genplist_t *plist; /* Property list pointer */ H5T_conv_cb_t cb_struct; herr_t ret_value=SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*x**x", plist_id, op, operate_data); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id,H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get property */ if (H5P_get(plist,H5D_XFER_CONV_CB_NAME,&cb_struct)<0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") /* Assign return value */ *op = cb_struct.func; *operate_data = cb_struct.user_data; done: FUNC_LEAVE_API(ret_value) } /*------------------------------------------------------------------------- * Function: H5Pget_btree_ratios * * Purpose: Queries B-tree split ratios. See H5Pset_btree_ratios(). * * Return: Success: Non-negative with split ratios returned through * the non-null arguments. * * Failure: Negative * * Programmer: Robb Matzke * Monday, September 28, 1998 * *------------------------------------------------------------------------- */ herr_t H5Pget_btree_ratios(hid_t plist_id, double *left/*out*/, double *middle/*out*/, double *right/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ double btree_split_ratio[3]; /* B-tree node split ratios */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "ixxx", plist_id, left, middle, right); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Get the split ratios */ if(H5P_get(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &btree_split_ratio) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") /* Get values */ if(left) *left = btree_split_ratio[0]; if(middle) *middle = btree_split_ratio[1]; if(right) *right = btree_split_ratio[2]; done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_btree_ratios() */ /*------------------------------------------------------------------------- * Function: H5Pset_btree_ratios * * Purpose: Sets B-tree split ratios for a dataset transfer property * list. The split ratios determine what percent of children go * in the first node when a node splits. The LEFT ratio is * used when the splitting node is the left-most node at its * level in the tree; the RIGHT ratio is when the splitting node * is the right-most node at its level; and the MIDDLE ratio for * all other cases. A node which is the only node at its level * in the tree uses the RIGHT ratio when it splits. All ratios * are real numbers between 0 and 1, inclusive. * * Return: Non-negative on success/Negative on failure * * Programmer: Robb Matzke * Monday, September 28, 1998 * *------------------------------------------------------------------------- */ herr_t H5Pset_btree_ratios(hid_t plist_id, double left, double middle, double right) { H5P_genplist_t *plist; /* Property list pointer */ double split_ratio[3]; /* B-tree node split ratios */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE4("e", "iddd", plist_id, left, middle, right); /* Check arguments */ if(left < (double)0.0f || left > (double)1.0f || middle < (double)0.0f || middle > (double)1.0f || right < (double)0.0f || right > (double)1.0f) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "split ratio must satisfy 0.0<=X<=1.0") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Set values */ split_ratio[0] = left; split_ratio[1] = middle; split_ratio[2] = right; /* Set the split ratios */ if(H5P_set(plist, H5D_XFER_BTREE_SPLIT_RATIO_NAME, &split_ratio) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_btree_ratios() */ /*------------------------------------------------------------------------- * Function: H5P_set_vlen_mem_manager * * Purpose: Sets the memory allocate/free pair for VL datatypes. The * allocation routine is called when data is read into a new * array and the free routine is called when H5Dvlen_reclaim is * called. The alloc_info and free_info are user parameters * which are passed to the allocation and freeing functions * respectively. To reset the allocate/free functions to the * default setting of using the system's malloc/free functions, * call this routine with alloc_func and free_func set to NULL. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 1, 1999 * *------------------------------------------------------------------------- */ herr_t H5P_set_vlen_mem_manager(H5P_genplist_t *plist, H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, void *free_info) { herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_NOAPI(FAIL) HDassert(plist); /* Update property list */ if(H5P_set(plist, H5D_XFER_VLEN_ALLOC_NAME, &alloc_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") if(H5P_set(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, &alloc_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") if(H5P_set(plist, H5D_XFER_VLEN_FREE_NAME, &free_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") if(H5P_set(plist, H5D_XFER_VLEN_FREE_INFO_NAME, &free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_NOAPI(ret_value) } /* end H5P_set_vlen_mem_manager() */ /*------------------------------------------------------------------------- * Function: H5Pset_vlen_mem_manager * * Purpose: Sets the memory allocate/free pair for VL datatypes. The * allocation routine is called when data is read into a new * array and the free routine is called when H5Dvlen_reclaim is * called. The alloc_info and free_info are user parameters * which are passed to the allocation and freeing functions * respectively. To reset the allocate/free functions to the * default setting of using the system's malloc/free functions, * call this routine with alloc_func and free_func set to NULL. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 1, 1999 * *------------------------------------------------------------------------- */ herr_t H5Pset_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t alloc_func, void *alloc_info, H5MM_free_t free_func, void *free_info) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "ix*xx*x", plist_id, alloc_func, alloc_info, free_func, free_info); /* Check arguments */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL, "not a dataset transfer property list") /* Update property list */ if(H5P_set_vlen_mem_manager(plist, alloc_func, alloc_info, free_func, free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set values") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_vlen_mem_manager() */ /*------------------------------------------------------------------------- * Function: H5Pget_vlen_mem_manager * * Purpose: The inverse of H5Pset_vlen_mem_manager() * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Thursday, July 1, 1999 * *------------------------------------------------------------------------- */ herr_t H5Pget_vlen_mem_manager(hid_t plist_id, H5MM_allocate_t *alloc_func/*out*/, void **alloc_info/*out*/, H5MM_free_t *free_func/*out*/, void **free_info/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE5("e", "ixxxx", plist_id, alloc_func, alloc_info, free_func, free_info); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") if(alloc_func) if(H5P_get(plist, H5D_XFER_VLEN_ALLOC_NAME, alloc_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") if(alloc_info) if(H5P_get(plist, H5D_XFER_VLEN_ALLOC_INFO_NAME, alloc_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") if(free_func) if(H5P_get(plist, H5D_XFER_VLEN_FREE_NAME, free_func) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") if(free_info) if(H5P_get(plist, H5D_XFER_VLEN_FREE_INFO_NAME, free_info) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_vlen_mem_manager() */ /*------------------------------------------------------------------------- * Function: H5Pset_hyper_vector_size * * Purpose: Given a dataset transfer property list, set the number of * "I/O vectors" (offset and length pairs) which are to be * accumulated in memory before being issued to the lower levels * of the library for reading or writing the actual data. * Increasing the number should give better performance, but use * more memory during hyperslab I/O. The vector size must be * greater than 1. * * The default is to use 1024 vectors for I/O during hyperslab * reading/writing. * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Monday, July 9, 2001 * *------------------------------------------------------------------------- */ herr_t H5Pset_hyper_vector_size(hid_t plist_id, size_t vector_size) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "iz", plist_id, vector_size); /* Check arguments */ if(vector_size < 1) HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "vector size too small") /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Update property list */ if(H5P_set(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, &vector_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTSET, FAIL, "unable to set value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pset_hyper_vector_size() */ /*------------------------------------------------------------------------- * Function: H5Pget_hyper_vector_size * * Purpose: Reads values previously set with H5Pset_hyper_vector_size(). * * Return: Non-negative on success/Negative on failure * * Programmer: Quincey Koziol * Monday, July 9, 2001 * *------------------------------------------------------------------------- */ herr_t H5Pget_hyper_vector_size(hid_t plist_id, size_t *vector_size/*out*/) { H5P_genplist_t *plist; /* Property list pointer */ herr_t ret_value = SUCCEED; /* Return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "ix", plist_id, vector_size); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ if(vector_size) if(H5P_get(plist, H5D_XFER_HYPER_VECTOR_SIZE_NAME, vector_size) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_hyper_vector_size() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_io_xfer_mode_enc * * Purpose: Callback routine which is called whenever the I/O transfer * mode property in the dataset transfer property list * is encoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_io_xfer_mode_enc(const void *value, void **_pp, size_t *size) { const H5FD_mpio_xfer_t *xfer_mode = (const H5FD_mpio_xfer_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(xfer_mode); HDassert(size); if(NULL != *pp) /* Encode I/O transfer mode */ *(*pp)++ = (uint8_t)*xfer_mode; /* Size of I/O transfer mode */ (*size)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_io_xfer_mode_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_io_xfer_mode_dec * * Purpose: Callback routine which is called whenever the I/O transfer * mode property in the dataset transfer property list * is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_io_xfer_mode_dec(const void **_pp, void *_value) { H5FD_mpio_xfer_t *xfer_mode = (H5FD_mpio_xfer_t *)_value; /* I/O transfer mode */ const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(xfer_mode); /* Decode I/O transfer mode */ *xfer_mode = (H5FD_mpio_xfer_t)*(*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_io_xfer_mode_dec() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_collective_opt_enc * * Purpose: Callback routine which is called whenever the MPI-I/O * collective optimization property in the dataset transfer * property list is encoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_mpio_collective_opt_enc(const void *value, void **_pp, size_t *size) { const H5FD_mpio_collective_opt_t *coll_opt = (const H5FD_mpio_collective_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(coll_opt); HDassert(size); if(NULL != *pp) /* Encode MPI-I/O collective optimization property */ *(*pp)++ = (uint8_t)*coll_opt; /* Size of MPI-I/O collective optimization property */ (*size)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_collective_opt_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_collective_opt_dec * * Purpose: Callback routine which is called whenever the MPI-I/O * collective optimization property in the dataset transfer * property list is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_mpio_collective_opt_dec(const void **_pp, void *_value) { H5FD_mpio_collective_opt_t *coll_opt = (H5FD_mpio_collective_opt_t *)_value; /* MPI-I/O collective optimization mode */ const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(coll_opt); /* Decode MPI-I/O collective optimization mode */ *coll_opt = (H5FD_mpio_collective_opt_t)*(*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_collective_opt_dec() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_chunk_opt_hard_enc * * Purpose: Callback routine which is called whenever the MPI-I/O * chunk optimization property in the dataset transfer * property list is encoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_mpio_chunk_opt_hard_enc(const void *value, void **_pp, size_t *size) { const H5FD_mpio_chunk_opt_t *chunk_opt = (const H5FD_mpio_chunk_opt_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(chunk_opt); HDassert(size); if(NULL != *pp) /* Encode MPI-I/O chunk optimization property */ *(*pp)++ = (uint8_t)*chunk_opt; /* Size of MPI-I/O chunk optimization property */ (*size)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_chunk_opt_hard_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_mpio_chunk_opt_hard_enc * * Purpose: Callback routine which is called whenever the MPI-I/O * chunk collective optimization property in the dataset transfer * property list is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_mpio_chunk_opt_hard_dec(const void **_pp, void *_value) { H5FD_mpio_chunk_opt_t *chunk_opt = (H5FD_mpio_chunk_opt_t *)_value; /* MPI-I/O chunk optimization mode */ const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(chunk_opt); /* Decode MPI-I/O chunk optimization mode */ *chunk_opt = (H5FD_mpio_chunk_opt_t)*(*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_mpio_chunk_opt_hard_dec() */ #ifdef H5_HAVE_PARALLEL /*------------------------------------------------------------------------- * Function: H5Pget_mpio_actual_chunk_opt_mode * * Purpose: Retrieves the chunked io optimization scheme that library chose * * Return: Non-negative on success/Negative on failure * * Programmer: Jacob Gruber * Wednesday, May 4, 2011 * *------------------------------------------------------------------------- */ herr_t H5Pget_mpio_actual_chunk_opt_mode(hid_t plist_id, H5D_mpio_actual_chunk_opt_mode_t *actual_chunk_opt_mode) { H5P_genplist_t *plist; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*Do", plist_id, actual_chunk_opt_mode); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ if(actual_chunk_opt_mode) if(H5P_get(plist, H5D_MPIO_ACTUAL_CHUNK_OPT_MODE_NAME, actual_chunk_opt_mode) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_actual_chunk_opt_mode() */ /*------------------------------------------------------------------------- * Function: H5Pget_mpio_actual_io_mode * * Purpose: Retrieves the type of I/O actually preformed when collective I/O * is requested. * * Return: Non-negative on success/Negative on failure * * Programmer: Jacob Gruber * Wednesday, May 4, 2011 * *------------------------------------------------------------------------- */ herr_t H5Pget_mpio_actual_io_mode(hid_t plist_id, H5D_mpio_actual_io_mode_t *actual_io_mode) { H5P_genplist_t *plist; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE2("e", "i*Di", plist_id, actual_io_mode); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ if(actual_io_mode) if(H5P_get(plist, H5D_MPIO_ACTUAL_IO_MODE_NAME, actual_io_mode) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_actual_io_mode() */ /*------------------------------------------------------------------------- * Function: H5Pget_mpio_no_collective_cause * * Purpose: Retrieves cause for the broke collective I/O * * Return: Non-negative on success/Negative on failure * * Programmer: Jonathan Kim * Aug 3, 2012 *------------------------------------------------------------------------- */ herr_t H5Pget_mpio_no_collective_cause(hid_t plist_id, uint32_t *local_no_collective_cause, uint32_t *global_no_collective_cause) { H5P_genplist_t *plist; herr_t ret_value = SUCCEED; /* return value */ FUNC_ENTER_API(FAIL) H5TRACE3("e", "i*Iu*Iu", plist_id, local_no_collective_cause, global_no_collective_cause); /* Get the plist structure */ if(NULL == (plist = H5P_object_verify(plist_id, H5P_DATASET_XFER))) HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL, "can't find object for ID") /* Return values */ if(local_no_collective_cause) if(H5P_get(plist, H5D_MPIO_LOCAL_NO_COLLECTIVE_CAUSE_NAME, local_no_collective_cause) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get local value") if(global_no_collective_cause) if(H5P_get(plist, H5D_MPIO_GLOBAL_NO_COLLECTIVE_CAUSE_NAME, global_no_collective_cause) < 0) HGOTO_ERROR(H5E_PLIST, H5E_CANTGET, FAIL, "unable to get global value") done: FUNC_LEAVE_API(ret_value) } /* end H5Pget_mpio_no_collective_cause() */ #endif /* H5_HAVE_PARALLEL */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_edc_enc * * Purpose: Callback routine which is called whenever the error detect * property in the dataset transfer property list * is encoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_edc_enc(const void *value, void **_pp, size_t *size) { const H5Z_EDC_t *check = (const H5Z_EDC_t *)value; /* Create local alias for values */ uint8_t **pp = (uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity check */ HDassert(check); HDassert(size); if(NULL != *pp) /* Encode EDC property */ *(*pp)++ = (uint8_t)*check; /* Size of EDC property */ (*size)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_edc_enc() */ /*------------------------------------------------------------------------- * Function: H5P__dxfr_edc_dec * * Purpose: Callback routine which is called whenever the error detect * property in the dataset transfer property list * is decoded. * * Return: Success: Non-negative * Failure: Negative * * Programmer: Quincey Koziol * Friday, August 3, 2012 * *------------------------------------------------------------------------- */ static herr_t H5P__dxfr_edc_dec(const void **_pp, void *_value) { H5Z_EDC_t *check = (H5Z_EDC_t *)_value; /* EDC property */ const uint8_t **pp = (const uint8_t **)_pp; FUNC_ENTER_STATIC_NOERR /* Sanity checks */ HDassert(pp); HDassert(*pp); HDassert(check); /* Decode EDC property */ *check = (H5Z_EDC_t)*(*pp)++; FUNC_LEAVE_NOAPI(SUCCEED) } /* end H5P__dxfr_edc_dec() */