| 190 | break; |
| 191 | } |
| 192 | } |
| 193 | |
| 194 | inline void mem_prefetch_l2(const char* ptr, size_t num_lines) { |
| 195 | switch (num_lines) { |
| 196 | default: |
| 197 | [[fallthrough]]; |
| 198 | case 20: |
| 199 | prefetch_l2(ptr); |
| 200 | ptr += 64; |
| 201 | [[fallthrough]]; |
| 202 | case 19: |
| 203 | prefetch_l2(ptr); |
| 204 | ptr += 64; |
| 205 | [[fallthrough]]; |
| 206 | case 18: |
| 207 | prefetch_l2(ptr); |
| 208 | ptr += 64; |
| 209 | [[fallthrough]]; |
| 210 | case 17: |
| 211 | prefetch_l2(ptr); |
| 212 | ptr += 64; |
| 213 | [[fallthrough]]; |
| 214 | case 16: |
| 215 | prefetch_l2(ptr); |
| 216 | ptr += 64; |
| 217 | [[fallthrough]]; |
| 218 | case 15: |
| 219 | prefetch_l2(ptr); |
| 220 | ptr += 64; |
| 221 | [[fallthrough]]; |
| 222 | case 14: |
| 223 | prefetch_l2(ptr); |
| 224 | ptr += 64; |
| 225 | [[fallthrough]]; |
| 226 | case 13: |
| 227 | prefetch_l2(ptr); |
| 228 | ptr += 64; |
| 229 | [[fallthrough]]; |
| 230 | case 12: |
| 231 | prefetch_l2(ptr); |
| 232 | ptr += 64; |
| 233 | [[fallthrough]]; |
| 234 | case 11: |
| 235 | prefetch_l2(ptr); |
| 236 | ptr += 64; |
| 237 | [[fallthrough]]; |
| 238 | case 10: |
| 239 | prefetch_l2(ptr); |
| 240 | ptr += 64; |
| 241 | [[fallthrough]]; |
| 242 | case 9: |
| 243 | prefetch_l2(ptr); |
| 244 | ptr += 64; |
| 245 | [[fallthrough]]; |
| 246 | case 8: |
| 247 | prefetch_l2(ptr); |
| 248 | ptr += 64; |
| 249 | [[fallthrough]]; |
no test coverage detected