omni::extras::getOutArrayï
Defined in omni/extras/OutArrayUtils.h
- 
template<typename T, typename GetCallable, typename FillCallable>
 omni::core::Result omni::extras::getOutArray(GetCallable &&getFn, FillCallable &&fillFn, uint32_t stackCount = (4096 / sizeof(T)), uint32_t maxRetryCount = (UINT32_MAX - 1))ï
- Retrieves an array of unknown size using - getFnand passes it to- fillFn.- This utility is useful for transferring a raw array from the ABI to a modern C++ container. - In order to avoid heap access, - stackCountcan be used to try to transfer the array from- getFnto- fillFnusing temporary stack storage.- stackCountis the number of Tâs that should be temporarily allocated on the stack. If- stackCountis inadequate, this function falls back to using the heap. Care should be taken to not set- stackCountto a value that would cause a stack overflow.- The source array may be dynamically growing in another thread, in which case this method will try - maxRetryCounttimes to allocate an array of the proper size and retrieve the values. If this method exceeds the retry count, omni::core::kResultTryAgain is returned.- Return values
- omni::core::kResultSuccess â on success, an appropriate error code otherwise.