-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Quaddtype #98
Merged
Merged
Adding Quaddtype #98
Changes from 30 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
ccfc64a
initial commit, adding Float128 dtype
SwayamInSync d9005a9
sleef based quadprecision
SwayamInSync 4702764
fixing numpy absolute include path
SwayamInSync 6ec99a5
fixing numpy absolute include path
SwayamInSync a8b2599
adding quad precision support with sleef
SwayamInSync d6bdb99
fixing sleef linking issues in meson
SwayamInSync 8ff6e0c
adding NPY_SAME_KIND_CASTING
SwayamInSync 3559232
fixing NPY_SAME_CAST
SwayamInSync a481648
fixing quad precsion printing issue
SwayamInSync a33ea7f
fixing quad precsion printing issue
SwayamInSync 220e0ae
removing hardcoded paths from meson build
SwayamInSync 4dfe490
adding CI changes
SwayamInSync 64d1e9e
adding quaddtype branch in CI
SwayamInSync ae9d8b8
fixing sleefquad dep in CI
SwayamInSync 28c205b
fixing cmake sleefquad dep in CI
SwayamInSync 7dd8611
fixing sleef compiling issue with FPIC
SwayamInSync d0da3e5
adding Build position-independent
SwayamInSync 9077bec
adding Build position-independent
SwayamInSync 982fba2
adding Build position-independent
SwayamInSync 5a3ae94
adding Build position-independent
SwayamInSync 18b537a
fixing tests
SwayamInSync f53c130
fixing test namings
SwayamInSync 77e9967
debugging sleef installation issues
SwayamInSync 375a621
debugging sleef installation issues
SwayamInSync 820588d
fixing sleef linking issues
SwayamInSync 53396db
fixing sleef linking issues
SwayamInSync e91104e
fixing sleef linking issues
SwayamInSync 9639628
fixing sleef linking issues
SwayamInSync bef1cc2
Update CI branch
SwayamInSync 4f242fd
fixing pandas meson==0.13.1 dependency issue as --no-build-isolation
SwayamInSync 58fbc6f
merging CI fixes
SwayamInSync 96ee075
adding ufuncs
SwayamInSync 7f7ebc3
added ufuncs, castings and scalar ops
SwayamInSync ffaa617
more castings and ufuncs
SwayamInSync 299568b
updated meson.build
SwayamInSync d13f863
adding more scalar tests
SwayamInSync 78a6931
defining scalar ops in struct sequence
SwayamInSync 6fbe989
resolving fixing unaligned loop and casting issues
SwayamInSync 6e124e3
resolving error catching and removing initial data init for dtype
SwayamInSync 63dc446
added destructor function for tp_dealloc
SwayamInSync d2e1ded
changing quad->quad cast to NPY_NO_CASTING from NPY_SAME_CASTING
SwayamInSync 96270bc
added dtype promoter functions
SwayamInSync fb04515
fixed memory issues and more ufuncs
SwayamInSync c76cf36
fixed destructor for bad memory access
SwayamInSync File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,3 +133,4 @@ compile_commands.json | |
|
||
.ruff-cache/ | ||
.asv | ||
.vscode/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +0,0 @@ | ||
# quaddtype | ||
|
||
Quad (128-bit) float dtype for numpy | ||
|
||
## Installation | ||
|
||
To install, make sure you have `numpy` nightly installed. Then build without | ||
isolation so that the `quaddtype` can link against the experimental dtype API | ||
headers, which aren't in the latest releases of `numpy`: | ||
|
||
```bash | ||
pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy | ||
pip install . --no-build-isolation | ||
``` | ||
|
||
Developed with Python 3.11, but 3.9 and 3.10 will probably also work. | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,51 @@ | ||
project( | ||
'quaddtype', | ||
'c', | ||
) | ||
project('quaddtype', 'c', 'cpp', default_options : ['cpp_std=c++17', 'b_pie=true']) | ||
|
||
py_mod = import('python') | ||
py = py_mod.find_installation() | ||
|
||
c = meson.get_compiler('c') | ||
|
||
sleef_dep = c.find_library('sleef') | ||
sleefquad_dep = c.find_library('sleefquad') | ||
|
||
incdir_numpy = run_command(py, | ||
[ | ||
'-c', | ||
'import numpy; print(numpy.get_include())' | ||
'import numpy; import os; print(os.path.relpath(numpy.get_include()))' | ||
], | ||
check: true | ||
).stdout().strip() | ||
|
||
includes = include_directories( | ||
[ | ||
incdir_numpy, | ||
'quaddtype/src' | ||
] | ||
[ | ||
incdir_numpy, | ||
'quaddtype/src', | ||
] | ||
) | ||
|
||
srcs = [ | ||
'quaddtype/src/umath.c', | ||
'quaddtype/src/casts.c', | ||
'quaddtype/src/dtype.c', | ||
'quaddtype/src/quaddtype_main.c', | ||
'quaddtype/src/casts.h', | ||
'quaddtype/src/casts.cpp', | ||
'quaddtype/src/scalar.h', | ||
'quaddtype/src/scalar.c', | ||
'quaddtype/src/dtype.h', | ||
'quaddtype/src/dtype.c', | ||
'quaddtype/src/quaddtype_main.c' | ||
] | ||
|
||
py.install_sources( | ||
[ | ||
'quaddtype/__init__.py', | ||
'quaddtype/quadscalar.py' | ||
], | ||
subdir: 'quaddtype', | ||
pure: false | ||
[ | ||
'quaddtype/__init__.py', | ||
], | ||
subdir: 'quaddtype', | ||
pure: false | ||
) | ||
|
||
py.extension_module( | ||
'_quaddtype_main', | ||
srcs, | ||
c_args: ['-g', '-O0'], | ||
install: true, | ||
subdir: 'quaddtype', | ||
include_directories: includes | ||
) | ||
py.extension_module('_quaddtype_main', | ||
srcs, | ||
c_args: ['-g', '-O0', '-lsleef', '-lsleefquad'], | ||
dependencies: [sleef_dep, sleefquad_dep], | ||
install: true, | ||
subdir: 'quaddtype', | ||
include_directories: includes | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1 @@ | ||
# Scalar quantity must be defined _before_ the dtype, so don't isort it. | ||
# During initialization of _quaddtype_main, QuadScalar is imported from this | ||
# (partially initialized) | ||
# module, and therefore has to be defined first. | ||
from .quadscalar import QuadScalar # isort: skip | ||
from ._quaddtype_main import QuadDType | ||
|
||
__all__ = ["QuadScalar", "QuadDType"] | ||
from ._quaddtype_main import QuadPrecDType, QuadPrecision |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's update the contents here rather than just delete the README. No need to go into detail, just a sentence or two explaining what it is. It might also help to explain you need to install SLEEF and how to build against SLEEF (e.g. with environment variables or by installing it system-wide).