| 158 | using ModuleRunner = CpuModuleRunner; |
| 159 | |
| 160 | std::vector<float> make_patterned_f32(size_t count, float phase, float scale) { |
| 161 | std::vector<float> values(count, 0.0f); |
| 162 | for (size_t i = 0; i < count; ++i) { |
| 163 | const float x = static_cast<float>(i); |
| 164 | values[i] = scale * (std::sin(phase + 0.173f * x) + 0.5f * std::cos(phase * 0.7f + 0.097f * x)); |
| 165 | } |
| 166 | return values; |
| 167 | } |
| 168 | |
| 169 | std::vector<float> make_global_attention_bias_for_test(int64_t frames, int64_t valid_frames) { |
| 170 | std::vector<float> mask(static_cast<size_t>(frames * frames), -std::numeric_limits<float>::infinity()); |
no outgoing calls
no test coverage detected