Create a new spec. Sorts the provided dims ascending.
(mut truncation_dims: Vec<u32>)
| 35 | impl MatryoshkaSpec { |
| 36 | /// Create a new spec. Sorts the provided dims ascending. |
| 37 | pub fn new(mut truncation_dims: Vec<u32>) -> Self { |
| 38 | truncation_dims.sort_unstable(); |
| 39 | truncation_dims.dedup(); |
| 40 | Self { truncation_dims } |
| 41 | } |
| 42 | |
| 43 | /// Pick the largest supported dim ≤ `requested`. |
| 44 | /// |