@@ -99,11 +99,11 @@ function _sort_chunks_int_right!(x, idx::Vector{<:Integer}, idx_cpy, where, numb
9999 cz = div (length (x), number_of_chunks)
100100 en = length (x)
101101 Threads. @threads :static for i in 1 : number_of_chunks
102- ds_sort_int_missatright! (x, idx, idx_cpy, where [Threads. threadid ( )], (i- 1 )* cz+ 1 ,i* cz, rangelen, minval)
102+ ds_sort_int_missatright! (x, idx, idx_cpy, where [tid ( Threads. nthreads () )], (i- 1 )* cz+ 1 ,i* cz, rangelen, minval)
103103 end
104104 # take care of the last few observations
105105 if number_of_chunks* div (length (x), number_of_chunks) < en
106- ds_sort_int_missatright! (x, idx, idx_cpy, where [Threads . threadid ( )], number_of_chunks* div (length (x), number_of_chunks)+ 1 , en, rangelen, minval)
106+ ds_sort_int_missatright! (x, idx, idx_cpy, where [tid ( 1 )], number_of_chunks* div (length (x), number_of_chunks)+ 1 , en, rangelen, minval)
107107 end
108108end
109109
@@ -112,11 +112,11 @@ function _sort_chunks_int_left!(x, idx::Vector{<:Integer}, idx_cpy, where, numbe
112112 cz = div (length (x), number_of_chunks)
113113 en = length (x)
114114 Threads. @threads :static for i in 1 : number_of_chunks
115- ds_sort_int_missatleft! (x, idx, idx_cpy, where [Threads. threadid ( )], (i- 1 )* cz+ 1 ,i* cz, rangelen, minval)
115+ ds_sort_int_missatleft! (x, idx, idx_cpy, where [tid ( Threads. nthreads () )], (i- 1 )* cz+ 1 ,i* cz, rangelen, minval)
116116 end
117117 # take care of the last few observations
118118 if number_of_chunks* div (length (x), number_of_chunks) < en
119- ds_sort_int_missatleft! (x, idx, idx_cpy, where [Threads . threadid ( )], number_of_chunks* div (length (x), number_of_chunks)+ 1 , en, rangelen, minval)
119+ ds_sort_int_missatleft! (x, idx, idx_cpy, where [tid ( 1 )], number_of_chunks* div (length (x), number_of_chunks)+ 1 , en, rangelen, minval)
120120 end
121121end
122122
@@ -263,7 +263,7 @@ function _ds_sort_int_missatright_nopermx_threaded!(x, original_P, copy_P, lo, h
263263 where [i][2 ] = 1
264264 end
265265 Threads. @threads :static for i = lo: hi
266- @inbounds ismissing (x[i]) ? where [Threads. threadid () ][rangelen+ 3 ] += 1 : where [Threads. threadid ( )][Int (x[i]) + offs + 2 ] += 1
266+ @inbounds ismissing (x[i]) ? where [tid ( Threads. nthreads ()) ][rangelen+ 3 ] += 1 : where [tid ( Threads. nthreads () )][Int (x[i]) + offs + 2 ] += 1
267267 end
268268 for j in 3 : length (where [1 ])
269269 for i in 2 : nt
@@ -307,7 +307,7 @@ function _ds_sort_int_missatright_nopermx_threaded!(x, original_P, rangelen, min
307307 where [i][2 ] = 1
308308 end
309309 Threads. @threads :static for i = 1 : length (x)
310- @inbounds ismissing (x[i]) ? where [Threads. threadid () ][rangelen+ 3 ] += 1 : where [Threads. threadid ( )][Int (x[i]) + offs + 2 ] += 1
310+ @inbounds ismissing (x[i]) ? where [tid ( Threads. nthreads ()) ][rangelen+ 3 ] += 1 : where [tid ( Threads. nthreads () )][Int (x[i]) + offs + 2 ] += 1
311311 end
312312 for j in 3 : length (where [1 ])
313313 for i in 2 : nt
@@ -349,7 +349,7 @@ function _ds_sort_int_missatleft_nopermx_threaded!(x, original_P, copy_P, lo, hi
349349 where [i][2 ] = 1
350350 end
351351 Threads. @threads :static for i = lo: hi
352- @inbounds ismissing (x[i]) ? where [Threads. threadid () ][3 ] += 1 : where [Threads. threadid ( )][Int (x[i]) + offs + 3 ] += 1
352+ @inbounds ismissing (x[i]) ? where [tid ( Threads. nthreads ()) ][3 ] += 1 : where [tid ( Threads. nthreads () )][Int (x[i]) + offs + 3 ] += 1
353353 end
354354 for j in 3 : length (where [1 ])
355355 for i in 2 : nt
@@ -393,7 +393,7 @@ function _ds_sort_int_missatleft_nopermx_threaded!(x, original_P, rangelen, minv
393393 where [i][2 ] = 1
394394 end
395395 Threads. @threads :static for i = 1 : length (x)
396- @inbounds ismissing (x[i]) ? where [Threads. threadid () ][3 ] += 1 : where [Threads. threadid ( )][Int (x[i]) + offs + 3 ] += 1
396+ @inbounds ismissing (x[i]) ? where [tid ( Threads. nthreads ()) ][3 ] += 1 : where [tid ( Threads. nthreads () )][Int (x[i]) + offs + 3 ] += 1
397397 end
398398 for j in 3 : length (where [1 ])
399399 for i in 2 : nt
0 commit comments