| 23 | T G_k1xSumq_ = 0; // G_k1xSumq |
| 24 | MetricType metric_type_; |
| 25 | |
| 26 | public: |
| 27 | explicit BatchQuery( |
| 28 | const T* rotated_query, size_t padded_dim, MetricType metric_type = METRIC_L2 |
| 29 | ) |
| 30 | : lookup_table_(rotated_query, padded_dim), metric_type_(metric_type) { |
| 31 | float c_1 = -((1 << 1) - 1) / 2.F; |
| 32 | |
| 33 | T sumq = |
| 34 | std::accumulate(rotated_query, rotated_query + padded_dim, static_cast<T>(0)); |
| 35 | |
| 36 | G_k1xSumq_ = sumq * c_1; |
| 37 | } |
nothing calls this directly
no test coverage detected