| 174 | assert_integral<T>(); |
| 175 | scalar_impl::scalar_quantize_optimized(result, vec0, dim, lo, delta); |
| 176 | } |
| 177 | |
| 178 | template <typename T> |
| 179 | inline std::vector<T> compute_centroid( |
| 180 | const T* data, size_t num_points, size_t dim, size_t num_threads |
| 181 | ) { |
| 182 | const auto thread_count = static_cast<int>(std::max<size_t>( |
| 183 | 1, |
| 184 | std::min( |
| 185 | {num_threads, |
| 186 | std::max<size_t>(num_points, 1), |
| 187 | static_cast<size_t>(std::numeric_limits<int>::max())} |
| 188 | ) |
| 189 | )); |
| 190 | std::vector<std::vector<T>> all_results(thread_count, std::vector<T>(dim, 0)); |
| 191 | |
| 192 | #pragma omp parallel for schedule(dynamic) num_threads(thread_count) |
no outgoing calls
no test coverage detected