Skip to content

Commit

Permalink
Version 1.0.1: Improved cache coherence for ARMv8 architecture.
Browse files Browse the repository at this point in the history
  • Loading branch information
IlyaGrebnov committed Jun 21, 2022
1 parent 09afef5 commit b15c658
Show file tree
Hide file tree
Showing 7 changed files with 200 additions and 183 deletions.
8 changes: 6 additions & 2 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
* 2022-06-12 : Version 1.0.0
* Initial public release of the esa-matchfinder.
Changes in 1.0.1 (June 19, 2022)
- Improved cache coherence for ARMv8 architecture.

Changes in 1.0.0 (June 12, 2022)
- Initial public release of the esa-matchfinder.

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ The esa-matchfinder finds all distance optimal matches (between min_match_length
The esa-matchfinder released under the [Apache License Version 2.0](LICENSE "Apache license") and is considered suitable for production use. However, no warranty or fitness for a particular purpose is expressed or implied.

## Changes
* June 19, 2022 (1.0.1)
* Improved cache coherence for ARMv8 architecture.
* June 12, 2022 (1.0.0)
* Initial public release of the esa-matchfinder.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1
12 changes: 7 additions & 5 deletions esa_matchfinder.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,20 @@ typedef struct ESA_MF_CONTEXT
#endif

#if defined(ESA_MF_HAS_BUILTIN_PREFECTCH)
#define esa_matchfinder_prefetchr(address) __builtin_prefetch((const void *)(address), 0, 0)
#define esa_matchfinder_prefetchw(address) __builtin_prefetch((const void *)(address), 1, 0)
#define esa_matchfinder_prefetchr(address) __builtin_prefetch((const void *)(address), 0, 3)
#define esa_matchfinder_prefetchw(address) __builtin_prefetch((const void *)(address), 1, 3)
#elif defined (_M_IX86) || defined (_M_AMD64)
#include <intrin.h>
#define esa_matchfinder_prefetchr(address) _mm_prefetch((const void *)(address), _MM_HINT_NTA)
#define esa_matchfinder_prefetchr(address) _mm_prefetch((const void *)(address), _MM_HINT_T0)
#define esa_matchfinder_prefetchw(address) _m_prefetchw((const void *)(address))
#elif defined (_M_ARM)
#include <intrin.h>
#define esa_matchfinder_prefetchr(address) __prefetch((const void *)(address))
#define esa_matchfinder_prefetchw(address) __prefetchw((const void *)(address))
#elif defined (_M_ARM64)
#include <intrin.h>
#define esa_matchfinder_prefetchr(address) __prefetch2((const void *)(address), 1)
#define esa_matchfinder_prefetchw(address) __prefetch2((const void *)(address), 17)
#define esa_matchfinder_prefetchr(address) __prefetch2((const void *)(address), 0)
#define esa_matchfinder_prefetchw(address) __prefetch2((const void *)(address), 16)
#else
#error Your compiler, configuration or platform is not supported.
#endif
Expand Down Expand Up @@ -384,7 +384,9 @@ static ptrdiff_t esa_matchfinder_build_interval_tree
for (ptrdiff_t i = omp_block_start + omp_block_size - 1; i >= omp_block_start; i -= 1)
{
esa_matchfinder_prefetchr(&sa_parent_link[i - 2 * prefetch_distance]);

esa_matchfinder_prefetchw(&plcp_leaf_link[sa_parent_link[i - prefetch_distance]]);
esa_matchfinder_prefetchw(&sa_parent_link[next_interval_index - prefetch_distance]);

uint64_t next_pos = sa_parent_link[i];
uint64_t next_lcp = (uint64_t)plcp_leaf_link[next_pos] - min_match_length;
Expand Down
3 changes: 3 additions & 0 deletions libsais/CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Changes in 2.7.1 (June 19, 2022)
- Improved cache coherence for ARMv8 architecture.

Changes in 2.7.0 (April 12, 2022)
- Support for longest common prefix array (LCP) construction.

Expand Down
2 changes: 1 addition & 1 deletion libsais/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.0
2.7.1
354 changes: 180 additions & 174 deletions libsais/libsais.c

Large diffs are not rendered by default.

0 comments on commit b15c658

Please sign in to comment.