Skip to content

Commit c2bcfd4

Browse files
authored
Update LexCHA.cpp
1 parent ee04e12 commit c2bcfd4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

FullPermutation/LexCHA.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
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>
@@ -12,6 +12,7 @@
1212
#include <cstring>
1313
#include <algorithm>
1414
#include <cstdint> // Required for uint8_t
15+
#include <chrono> // Required for std::chrono
1516

1617
// ── Architecture Configuration ───────────────────────────────────────
1718
constexpr 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);

0 commit comments

Comments
 (0)