Skip to content

Commit f10864f

Browse files
authored
Merge pull request #1750 from Jambon8/master
Update types.py
2 parents ce83a37 + fa4a343 commit f10864f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Compiler/types.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7463,7 +7463,7 @@ def iter(i):
74637463
column = column.secure_permute(permutation, reverse=reverse)
74647464
self.set_column(i, column)
74657465

7466-
def sort(self, key_indices=None, n_bits=None, batcher=False):
7466+
def sort(self, key_indices=None, n_bits=None, batcher=False, n_threads=None):
74677467
""" Sort sub-arrays (different first index) in place.
74687468
This uses `radix sort <https://eprint.iacr.org/2014/121>`_.
74697469
@@ -7472,7 +7472,8 @@ def sort(self, key_indices=None, n_bits=None, batcher=False):
74727472
``a[*][1][2]``. Default is ``(0, ..., 0)`` of correct length.
74737473
:param n_bits: number of bits in keys (default: global bit length)
74747474
:param batcher: whether to use Batcher's odd-even merge sorting
7475-
7475+
:param n_threads: number of threads to use (single thread by default),
7476+
only works with Batcher's algorithm
74767477
"""
74777478
if key_indices is None:
74787479
key_indices = (0,) * (len(self.sizes) - 1)
@@ -7481,7 +7482,7 @@ def sort(self, key_indices=None, n_bits=None, batcher=False):
74817482
'than the dimension')
74827483
if program.options.binary or batcher:
74837484
assert len(self.sizes) == 2
7484-
library.loopy_odd_even_merge_sort(self, key_indices=key_indices)
7485+
library.loopy_odd_even_merge_sort(self, key_indices=key_indices, n_threads=n_threads)
74857486
return
74867487
if isinstance(key_indices, regint):
74877488
key_indices = tuple(key_indices)

0 commit comments

Comments
 (0)