File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 * Official Implementation of LexCHA Indexing Algorithms
33 * Author: Yusheng Hu
44 * Research: A Divide-and-Conquer Engine for Lexicographical Permutations
5- * * Note: Added <cstdint > to resolve compilation errors regarding uint8_t .
5+ * * Note: Added <chrono > to resolve time-related compilation errors.
66 */
77
88#include < iostream>
1212#include < cstring>
1313#include < algorithm>
1414#include < cstdint> // Required for uint8_t
15+ #include < chrono> // Required for std::chrono
1516
1617// ── Architecture Configuration ───────────────────────────────────────
1718constexpr int TAIL_DEPTH = 5 ;
@@ -57,6 +58,7 @@ unsigned long long benchmark_accelerated(int N) {
5758 std::vector<int > D (N);
5859 for (int i = 0 ; i < N; ++i) D[i] = i;
5960
61+ // Aligned buffer to ensure safe memory access for SIMD
6062 alignas (16 ) uint8_t buffer[32 ] = {0 };
6163 std::memcpy (buffer, &D[N - TAIL_DEPTH ], TAIL_DEPTH * sizeof (int ));
6264 __m128i p_reg = _mm_load_si128 ((__m128i*)buffer);
You can’t perform that action at this time.
0 commit comments