Skip to main content

Cython interface to GNU Parallel sorting routines

Project description

parallel-sort

Test build PyPI version

This module provides a simple Cython interface to parallel sorting algorithms available in C++. It provides functions for in-place and out-of-place sorts, as well as indirect sorting (aka. "argsort").

By default it requires a C++17-capable compiler, and will use the parallel execution policy introduced in that standard. Alternatively, the GNU Parallel Mode sorting routines can be used for older compilers without C++17 support.

Usage

import parallel_sort
import numpy as np

x = np.random.random(size=10000)

x_sorted = parallel_sort.sort(x)

assert np.all(np.diff(x) >= 0) # x is now sorted

Installing

Requirements: numpy, OpenMP, C++17-capable g++, Cython (only for installation from source).

Installing from wheel via pip should "just work":

pip install parallel_sort

Alternatively, the module can be built for older compilers that do not support C++17, but do supply the GNU Parallel Mode library. To build without C++17, clone the repository and change the -std=c++17 compiler argument in setup.py as required. Then run:

pip install -e .

to compile and install the module.

Installation has been tested on linux (Ubuntu, CentOS) and Mac (via Homebrew).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parallel-sort-0.1.0.tar.gz (150.5 kB view details)

Uploaded Source

Built Distributions

parallel_sort-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

parallel_sort-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (991.4 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

parallel_sort-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

parallel_sort-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (936.4 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

parallel_sort-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (937.5 kB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

File details

Details for the file parallel-sort-0.1.0.tar.gz.

File metadata

  • Download URL: parallel-sort-0.1.0.tar.gz
  • Upload date:
  • Size: 150.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.14

File hashes

Hashes for parallel-sort-0.1.0.tar.gz
Algorithm Hash digest
SHA256 97ce21a11c1245ba6a2aabe26579a0dd94826ad92fe87d785f2922681e2938d7
MD5 ab2d58589b362822ece264d5a77b1236
BLAKE2b-256 da2426af21811250c61989048e8c8706a9937fc52ee37804c843731f7e70f5a0

See more details on using hashes here.

File details

Details for the file parallel_sort-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for parallel_sort-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 65288577613043c4b5fc407ebdd27b9d98946ef1fc7c9dd6603605fb7b3de0bd
MD5 75b1d06c58dd0b0fea5a2813141cb982
BLAKE2b-256 b4a05f17d956d0e5dae31c9cab979974b9a1f3b95a6a7e2d7f9eabc43ab6cae8

See more details on using hashes here.

File details

Details for the file parallel_sort-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for parallel_sort-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5b31bc16e6617149f92979cfd3aa3fad04d33f9123b4ef68494f7c6a5b489549
MD5 7afdc93420b264d984bd852ccb0701af
BLAKE2b-256 634bc5535916892972a4dd74ae5b173dd53303faebb7f566ad585bf0a2be7aeb

See more details on using hashes here.

File details

Details for the file parallel_sort-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for parallel_sort-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 a6aa36b0921e3efb4b3302fa56dd82f33bce57b6ba87963b015cd63bdcaf348e
MD5 442ba5eb1f4d7f55cbf42241f364d05e
BLAKE2b-256 3582cada2abd394843fe4baa33a5681dbe42eb4bf6bc7cb3fec9ccef537d0ed7

See more details on using hashes here.

File details

Details for the file parallel_sort-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for parallel_sort-0.1.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f7b35fdfe587798447e0a0760bbe0d3d8b7d88c7d27f93fcdb9711e04b3c09c5
MD5 0463096696a63f88362114bee51ac093
BLAKE2b-256 a667d608b77bad237177706f1480e47176ae6afda1f15d88e79365e890af4042

See more details on using hashes here.

File details

Details for the file parallel_sort-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for parallel_sort-0.1.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b7f341bba8375db68e549b40460f8a1e0bbca3eef53877934ba42585fff485bb
MD5 3f9d11e177bbf0d513bfe8c059d61f1d
BLAKE2b-256 5cd83484392e65e9c55f217c6aa3136a47e24e2dad61ed67e1c87fdd8604979c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page