MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / mem_prefetch_l1

Function mem_prefetch_l1

include/rabitqlib/utils/memory.hpp:103–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101 __builtin_prefetch(addr, 0, 2);
102#endif
103}
104
105inline void mem_prefetch_l1(const char* ptr, size_t num_lines) {
106 switch (num_lines) {
107 default:
108 [[fallthrough]];
109 case 20:
110 prefetch_l1(ptr);
111 ptr += 64;
112 [[fallthrough]];
113 case 19:
114 prefetch_l1(ptr);
115 ptr += 64;
116 [[fallthrough]];
117 case 18:
118 prefetch_l1(ptr);
119 ptr += 64;
120 [[fallthrough]];
121 case 17:
122 prefetch_l1(ptr);
123 ptr += 64;
124 [[fallthrough]];
125 case 16:
126 prefetch_l1(ptr);
127 ptr += 64;
128 [[fallthrough]];
129 case 15:
130 prefetch_l1(ptr);
131 ptr += 64;
132 [[fallthrough]];
133 case 14:
134 prefetch_l1(ptr);
135 ptr += 64;
136 [[fallthrough]];
137 case 13:
138 prefetch_l1(ptr);
139 ptr += 64;
140 [[fallthrough]];
141 case 12:
142 prefetch_l1(ptr);
143 ptr += 64;
144 [[fallthrough]];
145 case 11:
146 prefetch_l1(ptr);
147 ptr += 64;
148 [[fallthrough]];
149 case 10:
150 prefetch_l1(ptr);
151 ptr += 64;
152 [[fallthrough]];
153 case 9:
154 prefetch_l1(ptr);
155 ptr += 64;
156 [[fallthrough]];
157 case 8:
158 prefetch_l1(ptr);
159 ptr += 64;
160 [[fallthrough]];

Callers 3

find_candidatesMethod · 0.85
search_base_layerMethod · 0.85

Calls 1

prefetch_l1Function · 0.85

Tested by

no test coverage detected