Commit d85fda7
Allow k and M suffixes in IVF indexes (#3812)
Summary:
Pull Request resolved: #3812
Allows factory strings like `IVF3k,Flat` as a shorthand for 3072 centroids.
The main question is whether k or M should be metric (k=1000) or power of 2 (k=1024):
* pro-metric: standard,
* pro-power of 2: in practice we use powers of 2 most often
The suffixes ki and Mi should be used for powers of 2 but this makes the notation more heavy (which is what we wanted to avoid in the first place).
So I picked power of 2.
Reviewed By: mnorris11
Differential Revision: D62019941
fbshipit-source-id: f547962625123ecdfaa406067781c773860177931 parent 6fe4640 commit d85fda7
2 files changed
+33
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
229 | 242 | | |
230 | 243 | | |
231 | 244 | | |
| |||
240 | 253 | | |
241 | 254 | | |
242 | 255 | | |
243 | | - | |
244 | | - | |
| 256 | + | |
| 257 | + | |
245 | 258 | | |
246 | 259 | | |
247 | 260 | | |
| |||
252 | 265 | | |
253 | 266 | | |
254 | 267 | | |
255 | | - | |
256 | | - | |
| 268 | + | |
| 269 | + | |
257 | 270 | | |
258 | 271 | | |
259 | 272 | | |
260 | | - | |
261 | | - | |
| 273 | + | |
| 274 | + | |
262 | 275 | | |
263 | 276 | | |
264 | 277 | | |
265 | | - | |
266 | | - | |
| 278 | + | |
| 279 | + | |
267 | 280 | | |
268 | 281 | | |
269 | 282 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
241 | 253 | | |
242 | 254 | | |
243 | 255 | | |
| |||
0 commit comments