@@ -31,7 +31,6 @@ Please see the file LICENSE for full copyright information.
31
31
32
32
#if defined(LIBSAIS_OPENMP )
33
33
#include <omp.h>
34
- #include <sys/param.h>
35
34
#else
36
35
#define UNUSED (_x ) (void)(_x)
37
36
#endif
@@ -2183,7 +2182,7 @@ static void libsais16_partial_sorting_scan_left_to_right_16u_block_place(sa_sint
2183
2182
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 )
2184
2183
{
2185
2184
#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)
2187
2186
#endif
2188
2187
{
2189
2188
#if defined(LIBSAIS_OPENMP )
@@ -3015,7 +3014,7 @@ static void libsais16_partial_sorting_scan_right_to_left_16u_block_place(sa_sint
3015
3014
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 )
3016
3015
{
3017
3016
#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)
3019
3018
#endif
3020
3019
{
3021
3020
#if defined(LIBSAIS_OPENMP )
@@ -4755,7 +4754,7 @@ static void libsais16_final_sorting_scan_left_to_right_32s_block_sort(const sa_s
4755
4754
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 )
4756
4755
{
4757
4756
#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)
4759
4758
#endif
4760
4759
{
4761
4760
#if defined(LIBSAIS_OPENMP )
@@ -4809,7 +4808,7 @@ static void libsais16_final_bwt_scan_left_to_right_16u_block_omp(const uint16_t
4809
4808
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 )
4810
4809
{
4811
4810
#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)
4813
4812
#endif
4814
4813
{
4815
4814
#if defined(LIBSAIS_OPENMP )
@@ -4863,7 +4862,7 @@ static void libsais16_final_bwt_aux_scan_left_to_right_16u_block_omp(const uint1
4863
4862
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 )
4864
4863
{
4865
4864
#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)
4867
4866
#endif
4868
4867
{
4869
4868
#if defined(LIBSAIS_OPENMP )
@@ -5410,7 +5409,7 @@ static void libsais16_final_sorting_scan_right_to_left_32s_block_sort(const sa_s
5410
5409
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 )
5411
5410
{
5412
5411
#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)
5414
5413
#endif
5415
5414
{
5416
5415
#if defined(LIBSAIS_OPENMP )
@@ -5464,7 +5463,7 @@ static void libsais16_final_bwt_scan_right_to_left_16u_block_omp(const uint16_t
5464
5463
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 )
5465
5464
{
5466
5465
#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)
5468
5467
#endif
5469
5468
{
5470
5469
#if defined(LIBSAIS_OPENMP )
@@ -5518,7 +5517,7 @@ static void libsais16_final_bwt_aux_scan_right_to_left_16u_block_omp(const uint1
5518
5517
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 )
5519
5518
{
5520
5519
#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)
5522
5521
#endif
5523
5522
{
5524
5523
#if defined(LIBSAIS_OPENMP )
0 commit comments