Skip to content

Commit

Permalink
Restore the input array after suffix array construction (libsais64 & …
Browse files Browse the repository at this point in the history
…libsais16x64).
  • Loading branch information
IlyaGrebnov committed Jan 17, 2025
1 parent 5265154 commit 98b9bc4
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
Changes in 2.8.7 (January 16, 2025)
- Restore the input array after suffix array construction (libsais64 & libsais16x64).

Changes in 2.8.6 (November 18, 2024)
- Fixed out-of-bound memory access issue for large inputs.

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10)

project(libsais VERSION 2.8.6 LANGUAGES C DESCRIPTION "libsais is a library for linear time suffix array, longest common prefix array and burrows wheeler transform construction based on induced sorting algorithm.")
project(libsais VERSION 2.8.7 LANGUAGES C DESCRIPTION "libsais is a library for linear time suffix array, longest common prefix array and burrows wheeler transform construction based on induced sorting algorithm.")

set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The libsais is a library for fast (see [Benchmarks](#benchmarks) below) linear t
* Nataliya Timoshevskaya, Wu-chun Feng *SAIS-OPT: On the characterization and optimization of the SA-IS algorithm for suffix array construction*, 2014
* Jing Yi Xie, Ge Nong, Bin Lao, Wentao Xu *Scalable Suffix Sorting on a Multicore Machine*, 2020

Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>

>The libsais is inspired by [libdivsufsort](https://github.com/y-256/libdivsufsort), [sais](https://sites.google.com/site/yuta256/sais) libraries by Yuta Mori and [msufsort](https://github.com/michaelmaniscalco/msufsort) by Michael Maniscalco.
Expand All @@ -23,6 +23,8 @@ The libsais provides simple C99 API to construct suffix array and Burrows-Wheele
The libsais is released under the [Apache License Version 2.0](LICENSE "Apache license")

## Changes
* January 16, 2025 (2.8.7)
* Restore the input array after suffix array construction (libsais64 & libsais16x64).
* November 18, 2024 (2.8.6)
* Fixed out-of-bound memory access issue for large inputs.
* July 31, 2024 (2.8.5)
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.8.6
2.8.7
6 changes: 3 additions & 3 deletions include/libsais.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.

#define LIBSAIS_VERSION_MAJOR 2
#define LIBSAIS_VERSION_MINOR 8
#define LIBSAIS_VERSION_PATCH 6
#define LIBSAIS_VERSION_STRING "2.8.6"
#define LIBSAIS_VERSION_PATCH 7
#define LIBSAIS_VERSION_STRING "2.8.7"

#ifdef _WIN32
#ifdef LIBSAIS_SHARED
Expand Down
6 changes: 3 additions & 3 deletions include/libsais16.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.

#define LIBSAIS16_VERSION_MAJOR 2
#define LIBSAIS16_VERSION_MINOR 8
#define LIBSAIS16_VERSION_PATCH 6
#define LIBSAIS16_VERSION_STRING "2.8.6"
#define LIBSAIS16_VERSION_PATCH 7
#define LIBSAIS16_VERSION_STRING "2.8.7"

#ifdef _WIN32
#ifdef LIBSAIS_SHARED
Expand Down
6 changes: 3 additions & 3 deletions include/libsais16x64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.

#define LIBSAIS16X64_VERSION_MAJOR 2
#define LIBSAIS16X64_VERSION_MINOR 8
#define LIBSAIS16X64_VERSION_PATCH 6
#define LIBSAIS16X64_VERSION_STRING "2.8.6"
#define LIBSAIS16X64_VERSION_PATCH 7
#define LIBSAIS16X64_VERSION_STRING "2.8.7"

#ifdef _WIN32
#ifdef LIBSAIS_SHARED
Expand Down
6 changes: 3 additions & 3 deletions include/libsais64.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.

#define LIBSAIS64_VERSION_MAJOR 2
#define LIBSAIS64_VERSION_MINOR 8
#define LIBSAIS64_VERSION_PATCH 6
#define LIBSAIS64_VERSION_STRING "2.8.6"
#define LIBSAIS64_VERSION_PATCH 7
#define LIBSAIS64_VERSION_STRING "2.8.7"

#ifdef _WIN32
#ifdef LIBSAIS_SHARED
Expand Down
2 changes: 1 addition & 1 deletion src/libsais.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
2 changes: 1 addition & 1 deletion src/libsais16.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
3 changes: 2 additions & 1 deletion src/libsais16x64.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.
Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -6298,6 +6298,7 @@ static sa_sint_t libsais16x64_main_32s_recursion(sa_sint_t * RESTRICT T, sa_sint
if (index >= 0)
{
libsais16x64_convert_inplace_32u_to_64u_omp((uint32_t *)SA, n, threads);
libsais16x64_convert_inplace_32u_to_64u_omp((uint32_t *)T, n, threads);
}

return index;
Expand Down
3 changes: 2 additions & 1 deletion src/libsais64.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This file is a part of libsais, a library for linear time suffix array,
longest common prefix array and burrows wheeler transform construction.

Copyright (c) 2021-2024 Ilya Grebnov <[email protected]>
Copyright (c) 2021-2025 Ilya Grebnov <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -6320,6 +6320,7 @@ static sa_sint_t libsais64_main_32s_recursion(sa_sint_t * RESTRICT T, sa_sint_t
if (index >= 0)
{
libsais64_convert_inplace_32u_to_64u_omp((uint32_t *)SA, n, threads);
libsais64_convert_inplace_32u_to_64u_omp((uint32_t *)T, n, threads);
}

return index;
Expand Down

0 comments on commit 98b9bc4

Please sign in to comment.