9 files were added to this release more than 14 days after its initial publication. Inspect the release files before installing.
CUDA-quartic-solver
A general cubic equation solver and quartic equation minimisation solver written for CPU and Nvidia GPUs, for more details and results, see: https://arxiv.org/abs/1903.10041. The library is available for C++/CUDA as well as Python using Pybind11.
Running the solver
Requirements
- CUDA 9.0+ capable GPU and nvcc required to run the GPU solvers
- CMake 3.8+
- Python 3.6, numpy (if using Python)
- Pybind11 v2.5.0+ (installation instructions)
CMake
CMake can be used to build the project, for example:
git clone --recursive https://github.com/qureshizawar/CUDA-quartic-solver
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=Release ../ -D CPP_exe=true -D GPU_build=false
make
When the CPP_exe flag is set to true, CMake will build a c++ executable, then quartic_solver_main can be executed to run the example code.
When the GPU_build flag is set to true, CMake will build the CUDA capable version of the library.
Python
The Python package can be installed by building its .whl file, for example:
git clone --recursive https://github.com/qureshizawar/CUDA-quartic-solver
python setup.py bdist_wheel --GPU_build True
When the GPU_build flag is set to True, the CUDA capable version of the library will be built.
The built .whl can then be used to install the package, for example:
pip install ./dist/QuarticSolver-0.1.1-cp36-cp36m-linux_x86_64.whl
Usage
Please see src/main.cu, src/cpu_main.cpp, and the examples in the /tests folder for detailed usage examples
C++
Given quartic functions of the form Ax^4 + Bx^3 + Cx^2 + Dx + E the minimiser for the quartic functions can calculated on the CPU by calling the following function from cpu_solver.cpp:
QuarticMinimumCPU(N, A, B, C, D, E, min);
Where:
Nis the number of functionsAis an array containing the coefficient A for each of the quartic functionsBis an array containing the coefficient B for each of the quartic functionsCis an array containing the coefficient C for each of the quartic functionsDis an array containing the coefficient D for each of the quartic functionsEis an array containing the coefficient E for each of the quartic functionsminis an array which will contain the corresponding minimums for each of the quartic functions
The calculations can be carried out on a GPU by using QuarticMinimumGPU or QuarticMinimumGPUStreams. Please note signifcant performance improvement is observed when N>10000 for QuarticMinimumGPU vs QuarticMinimumGPUStreams
Python
The Python version of the library can be used as follows:
import numpy as np
import QuarticSolver
minimum = QuarticSolver.QuarticMinimum(A,B,C,D,E,True)
Where A,B,C,D,E are numpy arrays containing the quartic function coefficients and the final arg is a boolean flag which if set to True will use the GPU if possible. minimum is the returned numpy array containing the corresponding minimisers.
TODO
- Add multi-gpu support
Metadata
Release files for QuarticSolver 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Files added late
9 files were uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release files before installing.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| QuarticSolver-0.1.5.tar.gz | 616.8 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| QuarticSolver-0.1.5-cp38-cp38-manylinux2010_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.12+ x86-64 | Details |
| QuarticSolver-0.1.5-cp38-cp38-manylinux2010_i686.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.12+ x86-32 | Details |
| QuarticSolver-0.1.5-cp38-cp38-macosx_10_9_x86_64.whl | CPython 3.8 | CPython 3.8 | macOS 10.9+ x86-64 | Details |
| QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_i686.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.12+ x86-32 | Details |
| QuarticSolver-0.1.5-cp37-cp37m-macosx_10_9_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.9+ x86-64 | Details |
| QuarticSolver-0.1.5-cp36-cp36m-win_amd64.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-64 | Details |
| QuarticSolver-0.1.5-cp36-cp36m-win32.whl | CPython 3.6 | CPython 3.6 pymalloc | Windows x86-32 | Details |
| QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_i686.whl | CPython 3.6 | CPython 3.6 pymalloc | Linux glibc 2.12+ x86-32 | Details |
| QuarticSolver-0.1.5-cp36-cp36m-macosx_10_9_x86_64.whl | CPython 3.6 | CPython 3.6 pymalloc | macOS 10.9+ x86-64 | Details |
| QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.12+ x86-64 | Details |
| QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_i686.whl | CPython 3.5 | CPython 3.5 pymalloc | Linux glibc 2.12+ x86-32 | Details |
| QuarticSolver-0.1.5-cp35-cp35m-macosx_10_9_x86_64.whl | CPython 3.5 | CPython 3.5 pymalloc | macOS 10.9+ x86-64 | Details |
Total release size: 1.7 MB
Release files / QuarticSolver-0.1.5.tar.gz
| Download URL | QuarticSolver-0.1.5.tar.gz |
|---|---|
| Size | 616.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7922eed4baf5a8145bad8cd2d28865fe6db93e30a2abdca873fc27cbd574ee87
|
|
BLAKE2b-256 checksum How to use checksums |
96b79c6ecc7c8e633579d452ffdf6c9dc869a81133cca4f4fe09b2642a0a17c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp38-cp38-manylinux2010_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp38-cp38-manylinux2010_x86_64.whl |
|---|---|
| Size | 115.7 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
a0aa606e7df7906ab2c4a7b1e8c6049ef8c4e1d82902fa2c5eea775359897279
|
|
BLAKE2b-256 checksum How to use checksums |
ac6dcc4bd6141eca61a016f1f9b64eb0a782677afcc8750bc9774f0097f4d244
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp38-cp38-manylinux2010_i686.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp38-cp38-manylinux2010_i686.whl |
|---|---|
| Size | 85.0 kB |
| Tags | CPython 3.8 Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
a53011389971cf4492b325c2be318efd567ff9672146e7ae796053edf1841f80
|
|
BLAKE2b-256 checksum How to use checksums |
c5b644f1573fbe335a10b858e7d2bbbd3ad3b0219c96beb6eb2db4a1ba097a2f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp38-cp38-macosx_10_9_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp38-cp38-macosx_10_9_x86_64.whl |
|---|---|
| Size | 52.6 kB |
| Tags | CPython 3.8 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
3509ed82076905aaaf201bbed4ffb3c08220741c76f89cb4e984b838b0294a24
|
|
BLAKE2b-256 checksum How to use checksums |
140f32aaa898c4880bdc2b38f8fb234587cc2270076d027f75cba54c17f9841e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|
Release files / QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_x86_64.whl |
|---|---|
| Size | 116.1 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
764c5389935b5df05e247fc2d57f3849912b464e93669ddb6506c82f8dd9a58d
|
|
BLAKE2b-256 checksum How to use checksums |
c08f5285f1a6e9e8fc90ea21f83b7d9b6da8b3e91898c030def474fec4a4ea94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_i686.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp37-cp37m-manylinux2010_i686.whl |
|---|---|
| Size | 85.0 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
0b0363d3a04c8b113da303d166cb50ed5bedbadb71dbd8dbf45f58d5f1b40bda
|
|
BLAKE2b-256 checksum How to use checksums |
e54cd77869f799a38a758ee59bb3e667a8ce3c9b89e4666459b28308edf172e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp37-cp37m-macosx_10_9_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 51.9 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
ff1b87e605de2ca62df728005b5381509e3ffa2a7e0da103e34f16e4520ea784
|
|
BLAKE2b-256 checksum How to use checksums |
56169f507102e19410165a529d7d6788edcd0a8ce133a44dbbe2d3f746e37c8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|
Release files / QuarticSolver-0.1.5-cp36-cp36m-win_amd64.whl
| Download URL | QuarticSolver-0.1.5-cp36-cp36m-win_amd64.whl |
|---|---|
| Size | 62.1 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9d8c3077a4576e15dbefa4568d31ef6b3c2f2bb3f56cd6348b4a14045a47104f
|
|
BLAKE2b-256 checksum How to use checksums |
fdaefc219e49b50e989f78a7c214c601029a481ad7658b2375d1d155f2373e1e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.0
|
Release files / QuarticSolver-0.1.5-cp36-cp36m-win32.whl
| Download URL | QuarticSolver-0.1.5-cp36-cp36m-win32.whl |
|---|---|
| Size | 56.9 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Windows x86-32 |
|
SHA-256 checksum How to use checksums |
33ca5d9eef15605ef782b065f2cc10e87fbddf48751a5c9d89f66c8cab458b2a
|
|
BLAKE2b-256 checksum How to use checksums |
7b5f58897be7e8dad32604cd8c83575d0f57f61ced6614e6da399469524647d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/28.8.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.0
|
Release files / QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_x86_64.whl
| Download URL | QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_x86_64.whl |
|---|---|
| Size | 115.9 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
8899f312ee0c7b5319823be11b610ad11a56d014aad385b240d11ce8b2ae02bf
|
|
BLAKE2b-256 checksum How to use checksums |
e7e319d9c57053f473858165e2de9d1592937d9346545caa95eda97332a8ecf9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_i686.whl
| Download URL | QuarticSolver-0.1.5-cp36-cp36m-manylinux2010_i686.whl |
|---|---|
| Size | 85.2 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
7a8c66bc89746a7c92fe78779860985a66bb64e7327bc2514064342c47ee6e43
|
|
BLAKE2b-256 checksum How to use checksums |
99ab73c32f14db9be5c8c84039da53ded083dc85dd0ccb105c981d69c83da85c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp36-cp36m-macosx_10_9_x86_64.whl
| Download URL | QuarticSolver-0.1.5-cp36-cp36m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 51.7 kB |
| Tags | CPython 3.6 CPython 3.6 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c9943d04ff174e65d9190d5db61a4f089ae2d873095885e0f9909085dca85009
|
|
BLAKE2b-256 checksum How to use checksums |
ef30323916b10f3adc758c797741a5ef94b66bdd7f97985fb82819fcf50861a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8
|
Release files / QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_x86_64.whl |
|---|---|
| Size | 115.9 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
4e1516c39ab09fe21f1584f22b46ee2252ebc509d79aa496112508b206c3def6
|
|
BLAKE2b-256 checksum How to use checksums |
59c6c902eb8913c5f68d4d1ea20dbb03937a8fd564b89a23ea7cade0a5606d6e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_i686.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp35-cp35m-manylinux2010_i686.whl |
|---|---|
| Size | 85.3 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc Linux glibc 2.12+ x86-32 |
|
SHA-256 checksum How to use checksums |
4d2c596d42c91f24cb16d9105a63e2dba53e195179f00ead3f6c3ab6feb69c8d
|
|
BLAKE2b-256 checksum How to use checksums |
6b6b8824de88e6dbc9b5fec0f18bd84f6d1150e468f5a9aa7795ee9f96adacd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.6.10
|
Release files / QuarticSolver-0.1.5-cp35-cp35m-macosx_10_9_x86_64.whl
File added late
This file was uploaded more than 14 days after the first file in this release.
While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.
We recommend inspecting the release file before installing.
| Download URL | QuarticSolver-0.1.5-cp35-cp35m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 51.7 kB |
| Tags | CPython 3.5 CPython 3.5 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
571885a67b5de4c62418093ab1b1d8edd7537d919327359916e9326ea653a0d1
|
|
BLAKE2b-256 checksum How to use checksums |
8450606a13b2cb85fef85a75e14ba4046863391e394712453517b5163df31a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2
|