| 85 | // the depth) with higher values than the surround. |
| 86 | template <typename T> |
| 87 | void FillRandomSkyscraper(std::vector<T>* vec, int depth, |
| 88 | double middle_proportion, uint8 middle_min, |
| 89 | uint8 sides_max) { |
| 90 | for (auto base_it = std::begin(*vec); base_it != std::end(*vec); |
| 91 | base_it += depth) { |
| 92 | auto left_it = base_it + std::ceil(0.5 * depth * (1.0 - middle_proportion)); |
| 93 | auto right_it = |
| 94 | base_it + std::ceil(0.5 * depth * (1.0 + middle_proportion)); |
| 95 | FillRandom(base_it, left_it, std::numeric_limits<T>::min(), sides_max); |
| 96 | FillRandom(left_it, right_it, middle_min, std::numeric_limits<T>::max()); |
| 97 | FillRandom(right_it, base_it + depth, std::numeric_limits<T>::min(), |
| 98 | sides_max); |
| 99 | } |
| 100 | } |
| 101 | |
| 102 | } // namespace tflite |
| 103 | #endif // TENSORFLOW_LITE_KERNELS_INTERNAL_TEST_UTIL_H_ |
no test coverage detected