| 72 | } |
| 73 | |
| 74 | static void * align_with_offset(void * ptr, int offset) { |
| 75 | size_t dummy_size = MAX_ALIGNMENT * 4; |
| 76 | return (char *) std::align(MAX_ALIGNMENT, MAX_ALIGNMENT, ptr, dummy_size) + offset; |
| 77 | } |
| 78 | |
| 79 | static void benchmark_function(size_t size, size_t q_size, int64_t iterations, const std::function<float(void)> & func) { |
| 80 | int64_t min_time_us = INT64_MAX; |