| 239 | } |
| 240 | |
| 241 | std::string sample_points_i32(const std::vector<int32_t> & values) { |
| 242 | if (values.empty()) { |
| 243 | return "[]"; |
| 244 | } |
| 245 | const std::vector<size_t> points = sample_point_indices(values.size()); |
| 246 | std::ostringstream oss; |
| 247 | oss << "["; |
| 248 | for (size_t i = 0; i < points.size(); ++i) { |
| 249 | if (i != 0) { |
| 250 | oss << ","; |
| 251 | } |
| 252 | const size_t index = points[i]; |
| 253 | oss << index << ":" << values[index]; |
| 254 | } |
| 255 | oss << "]"; |
| 256 | return oss.str(); |
| 257 | } |
| 258 | |
| 259 | void trace_log_f32(const std::string & name, const std::vector<int64_t> & dims, const std::vector<float> & values) { |
| 260 | if (!trace_log_enabled()) { |
no test coverage detected