| 2044 | #endif // !defined(IS_MOBILE_PLATFORM) && !defined(IS_SLIM_BUILD) |
| 2045 | |
| 2046 | void TF_FinishWhile(const TF_WhileParams* params, TF_Status* status, |
| 2047 | TF_Output* outputs) { |
| 2048 | #if defined(IS_MOBILE_PLATFORM) || defined(IS_SLIM_BUILD) |
| 2049 | status->status = tensorflow::errors::Unimplemented( |
| 2050 | "Creating while loops is not supported on mobile. File a bug at " |
| 2051 | "https://github.com/tensorflow/tensorflow/issues if this feature is " |
| 2052 | "important to you"); |
| 2053 | #else |
| 2054 | // If it appears the caller created or modified `params`, don't free resources |
| 2055 | if (!ValidateConstWhileParams(*params, status)) return; |
| 2056 | TF_FinishWhileHelper(params, status, outputs); |
| 2057 | FreeWhileResources(params); |
| 2058 | #endif // defined(IS_MOBILE_PLATFORM) || defined(IS_SLIM_BUILD) |
| 2059 | } |
| 2060 | |
| 2061 | void TF_AbortWhile(const TF_WhileParams* params) { FreeWhileResources(params); } |
| 2062 | |