1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/*
* Copyright (c) Microsoft Corporation.
* Licensed under the MIT license.
*/
#[cfg(not(miri))]
pub mod size_constants {
/// The recommended dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_DATASET_SIZE_RECOMMENDED: u64 = 991;
/// The small dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_DATASET_SIZE_SMALL: u64 = 101;
/// The recommended query size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_QUERYSET_SIZE_RECOMMENDED: u64 = 101;
/// The small query size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_QUERYSET_SIZE_SMALL: u64 = 11;
/// The recommended number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
/// When "memory aligned" the dimensions become 64 (8*8). Setting to non-aligned value to ensure aligning works.
pub const TEST_NUM_DIMENSIONS_RECOMMENDED: usize = 59;
/// The recommended "memory aligned" number of dimensions for testing the library (64=8*8).
pub const TEST_NUM_DIMENSIONS_RECOMMENDED_MEMORY_ALIGNED: usize = 64;
/// The small number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_NUM_DIMENSIONS_SMALL: usize = 13;
/// The small "memory aligned" number of dimensions for testing the library.
pub const TEST_NUM_DIMENSIONS_SMALL_MEMORY_ALIGNED: usize = 16;
}
#[cfg(miri)]
pub mod size_constants {
/// The recommended dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_DATASET_SIZE_RECOMMENDED: u64 = 7;
/// The small dataset size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_DATASET_SIZE_SMALL: u64 = 3;
/// The recommended query size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_QUERYSET_SIZE_RECOMMENDED: u64 = 3;
/// The small query size for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_QUERYSET_SIZE_SMALL: u64 = 1;
/// The recommended number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
/// When "memory aligned" the dimensions become 16 (8*2). Setting to non-aligned value to ensure aligning works.
pub const TEST_NUM_DIMENSIONS_RECOMMENDED: usize = 13;
/// The recommended "memory aligned" number of dimensions for testing the library (16=8*2).
pub const TEST_NUM_DIMENSIONS_RECOMMENDED_MEMORY_ALIGNED: usize = 16;
/// The small number of dimensions for testing the library.
/// A prime number is used to avoid any accidental patterns in the data.
pub const TEST_NUM_DIMENSIONS_SMALL: usize = 7;
/// The small "memory aligned" number of dimensions for testing the library.
pub const TEST_NUM_DIMENSIONS_SMALL_MEMORY_ALIGNED: usize = 8;
}