Skip to content

Commit 18c8f5a

Browse files
committed
Miscellaneous changes to reduce compiler warnings about implicit functions.
1 parent 60f8369 commit 18c8f5a

12 files changed

+48
-47
lines changed

CHANGES

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Changes in 2.8.5 (July 31, 2024)
2+
- Miscellaneous changes to reduce compiler warnings about implicit functions.
3+
14
Changes in 2.8.4 (June 13, 2024)
25
- Additional OpenMP acceleration (libsais16 & libsais16x64).
36

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.10)
22

3-
project(libsais VERSION 2.8.4 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.")
3+
project(libsais VERSION 2.8.5 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.")
44

55
set(CMAKE_C_STANDARD 99)
66
set(CMAKE_C_STANDARD_REQUIRED ON)

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ The libsais provides simple C99 API to construct suffix array and Burrows-Wheele
2323
The libsais is released under the [Apache License Version 2.0](LICENSE "Apache license")
2424

2525
## Changes
26+
* July 31, 2024 (2.8.5)
27+
* Miscellaneous changes to reduce compiler warnings about implicit functions.
2628
* June 13, 2024 (2.8.4)
2729
* Additional OpenMP acceleration (libsais16 & libsais16x64).
2830
* June 11, 2024 (2.8.3)
@@ -129,7 +131,7 @@ The libsais is released under the [Apache License Version 2.0](LICENSE "Apache l
129131
CPMAddPackage(
130132
NAME libsais
131133
GITHUB_REPOSITORY IlyaGrebnov/libsais
132-
GIT_TAG v2.8.3
134+
GIT_TAG v2.8.5
133135
OPTIONS
134136
"LIBSAIS_USE_OPENMP OFF"
135137
"LIBSAIS_BUILD_SHARED_LIB OFF"

VERSION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.8.4
1+
2.8.5

include/libsais.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.
2626

2727
#define LIBSAIS_VERSION_MAJOR 2
2828
#define LIBSAIS_VERSION_MINOR 8
29-
#define LIBSAIS_VERSION_PATCH 4
30-
#define LIBSAIS_VERSION_STRING "2.8.4"
29+
#define LIBSAIS_VERSION_PATCH 5
30+
#define LIBSAIS_VERSION_STRING "2.8.5"
3131

3232
#ifdef _WIN32
3333
#ifdef LIBSAIS_SHARED

include/libsais16.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.
2626

2727
#define LIBSAIS16_VERSION_MAJOR 2
2828
#define LIBSAIS16_VERSION_MINOR 8
29-
#define LIBSAIS16_VERSION_PATCH 4
30-
#define LIBSAIS16_VERSION_STRING "2.8.4"
29+
#define LIBSAIS16_VERSION_PATCH 5
30+
#define LIBSAIS16_VERSION_STRING "2.8.5"
3131

3232
#ifdef _WIN32
3333
#ifdef LIBSAIS_SHARED

include/libsais16x64.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.
2626

2727
#define LIBSAIS16X64_VERSION_MAJOR 2
2828
#define LIBSAIS16X64_VERSION_MINOR 8
29-
#define LIBSAIS16X64_VERSION_PATCH 4
30-
#define LIBSAIS16X64_VERSION_STRING "2.8.4"
29+
#define LIBSAIS16X64_VERSION_PATCH 5
30+
#define LIBSAIS16X64_VERSION_STRING "2.8.5"
3131

3232
#ifdef _WIN32
3333
#ifdef LIBSAIS_SHARED

include/libsais64.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ Please see the file LICENSE for full copyright information.
2626

2727
#define LIBSAIS64_VERSION_MAJOR 2
2828
#define LIBSAIS64_VERSION_MINOR 8
29-
#define LIBSAIS64_VERSION_PATCH 4
30-
#define LIBSAIS64_VERSION_STRING "2.8.4"
29+
#define LIBSAIS64_VERSION_PATCH 5
30+
#define LIBSAIS64_VERSION_STRING "2.8.5"
3131

3232
#ifdef _WIN32
3333
#ifdef LIBSAIS_SHARED

src/libsais.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Please see the file LICENSE for full copyright information.
3131

3232
#if defined(LIBSAIS_OPENMP)
3333
#include <omp.h>
34-
#include <sys/param.h>
3534
#else
3635
#define UNUSED(_x) (void)(_x)
3736
#endif
@@ -2205,7 +2204,7 @@ static void libsais_partial_sorting_scan_left_to_right_8u_block_place(sa_sint_t
22052204
static sa_sint_t libsais_partial_sorting_scan_left_to_right_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT buckets, sa_sint_t d, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
22062205
{
22072206
#if defined(LIBSAIS_OPENMP)
2208-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
2207+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
22092208
#endif
22102209
{
22112210
#if defined(LIBSAIS_OPENMP)
@@ -3037,7 +3036,7 @@ static void libsais_partial_sorting_scan_right_to_left_8u_block_place(sa_sint_t
30373036
static sa_sint_t libsais_partial_sorting_scan_right_to_left_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT buckets, sa_sint_t d, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
30383037
{
30393038
#if defined(LIBSAIS_OPENMP)
3040-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
3039+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
30413040
#endif
30423041
{
30433042
#if defined(LIBSAIS_OPENMP)
@@ -4777,7 +4776,7 @@ static void libsais_final_sorting_scan_left_to_right_32s_block_sort(const sa_sin
47774776
static void libsais_final_bwt_scan_left_to_right_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
47784777
{
47794778
#if defined(LIBSAIS_OPENMP)
4780-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4779+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
47814780
#endif
47824781
{
47834782
#if defined(LIBSAIS_OPENMP)
@@ -4831,7 +4830,7 @@ static void libsais_final_bwt_scan_left_to_right_8u_block_omp(const uint8_t * RE
48314830
static void libsais_final_bwt_aux_scan_left_to_right_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t rm, sa_sint_t * RESTRICT I, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
48324831
{
48334832
#if defined(LIBSAIS_OPENMP)
4834-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4833+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
48354834
#endif
48364835
{
48374836
#if defined(LIBSAIS_OPENMP)
@@ -4885,7 +4884,7 @@ static void libsais_final_bwt_aux_scan_left_to_right_8u_block_omp(const uint8_t
48854884
static void libsais_final_sorting_scan_left_to_right_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
48864885
{
48874886
#if defined(LIBSAIS_OPENMP)
4888-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4887+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
48894888
#endif
48904889
{
48914890
#if defined(LIBSAIS_OPENMP)
@@ -5432,7 +5431,7 @@ static void libsais_final_sorting_scan_right_to_left_32s_block_sort(const sa_sin
54325431
static void libsais_final_bwt_scan_right_to_left_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
54335432
{
54345433
#if defined(LIBSAIS_OPENMP)
5435-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5434+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
54365435
#endif
54375436
{
54385437
#if defined(LIBSAIS_OPENMP)
@@ -5486,7 +5485,7 @@ static void libsais_final_bwt_scan_right_to_left_8u_block_omp(const uint8_t * RE
54865485
static void libsais_final_bwt_aux_scan_right_to_left_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t rm, sa_sint_t * RESTRICT I, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
54875486
{
54885487
#if defined(LIBSAIS_OPENMP)
5489-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5488+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
54905489
#endif
54915490
{
54925491
#if defined(LIBSAIS_OPENMP)
@@ -5540,7 +5539,7 @@ static void libsais_final_bwt_aux_scan_right_to_left_8u_block_omp(const uint8_t
55405539
static void libsais_final_sorting_scan_right_to_left_8u_block_omp(const uint8_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
55415540
{
55425541
#if defined(LIBSAIS_OPENMP)
5543-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5542+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
55445543
#endif
55455544
{
55465545
#if defined(LIBSAIS_OPENMP)

src/libsais16.c

+8-9
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ Please see the file LICENSE for full copyright information.
3131

3232
#if defined(LIBSAIS_OPENMP)
3333
#include <omp.h>
34-
#include <sys/param.h>
3534
#else
3635
#define UNUSED(_x) (void)(_x)
3736
#endif
@@ -2183,7 +2182,7 @@ static void libsais16_partial_sorting_scan_left_to_right_16u_block_place(sa_sint
21832182
static sa_sint_t libsais16_partial_sorting_scan_left_to_right_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT buckets, sa_sint_t d, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
21842183
{
21852184
#if defined(LIBSAIS_OPENMP)
2186-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
2185+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
21872186
#endif
21882187
{
21892188
#if defined(LIBSAIS_OPENMP)
@@ -3015,7 +3014,7 @@ static void libsais16_partial_sorting_scan_right_to_left_16u_block_place(sa_sint
30153014
static sa_sint_t libsais16_partial_sorting_scan_right_to_left_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT buckets, sa_sint_t d, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
30163015
{
30173016
#if defined(LIBSAIS_OPENMP)
3018-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
3017+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
30193018
#endif
30203019
{
30213020
#if defined(LIBSAIS_OPENMP)
@@ -4755,7 +4754,7 @@ static void libsais16_final_sorting_scan_left_to_right_32s_block_sort(const sa_s
47554754
static void libsais16_final_bwt_scan_left_to_right_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
47564755
{
47574756
#if defined(LIBSAIS_OPENMP)
4758-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4757+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
47594758
#endif
47604759
{
47614760
#if defined(LIBSAIS_OPENMP)
@@ -4809,7 +4808,7 @@ static void libsais16_final_bwt_scan_left_to_right_16u_block_omp(const uint16_t
48094808
static void libsais16_final_bwt_aux_scan_left_to_right_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t rm, sa_sint_t * RESTRICT I, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
48104809
{
48114810
#if defined(LIBSAIS_OPENMP)
4812-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4811+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
48134812
#endif
48144813
{
48154814
#if defined(LIBSAIS_OPENMP)
@@ -4863,7 +4862,7 @@ static void libsais16_final_bwt_aux_scan_left_to_right_16u_block_omp(const uint1
48634862
static void libsais16_final_sorting_scan_left_to_right_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
48644863
{
48654864
#if defined(LIBSAIS_OPENMP)
4866-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
4865+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
48674866
#endif
48684867
{
48694868
#if defined(LIBSAIS_OPENMP)
@@ -5410,7 +5409,7 @@ static void libsais16_final_sorting_scan_right_to_left_32s_block_sort(const sa_s
54105409
static void libsais16_final_bwt_scan_right_to_left_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
54115410
{
54125411
#if defined(LIBSAIS_OPENMP)
5413-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5412+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
54145413
#endif
54155414
{
54165415
#if defined(LIBSAIS_OPENMP)
@@ -5464,7 +5463,7 @@ static void libsais16_final_bwt_scan_right_to_left_16u_block_omp(const uint16_t
54645463
static void libsais16_final_bwt_aux_scan_right_to_left_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t rm, sa_sint_t * RESTRICT I, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
54655464
{
54665465
#if defined(LIBSAIS_OPENMP)
5467-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5466+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
54685467
#endif
54695468
{
54705469
#if defined(LIBSAIS_OPENMP)
@@ -5518,7 +5517,7 @@ static void libsais16_final_bwt_aux_scan_right_to_left_16u_block_omp(const uint1
55185517
static void libsais16_final_sorting_scan_right_to_left_16u_block_omp(const uint16_t * RESTRICT T, sa_sint_t * RESTRICT SA, sa_sint_t k, sa_sint_t * RESTRICT induction_bucket, fast_sint_t block_start, fast_sint_t block_size, sa_sint_t threads, LIBSAIS_THREAD_STATE * RESTRICT thread_state)
55195518
{
55205519
#if defined(LIBSAIS_OPENMP)
5521-
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * MAX(k, 256) && omp_get_dynamic() == 0)
5520+
#pragma omp parallel num_threads(threads) if(threads > 1 && block_size >= 64 * (k > 256 ? k : 256) && omp_get_dynamic() == 0)
55225521
#endif
55235522
{
55245523
#if defined(LIBSAIS_OPENMP)

0 commit comments

Comments
 (0)