#30572 closed enhancement (fixed)
Remove indirect typecasts when calling bitset.pxi
Reported by: | gh-kliem | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.2 |
Component: | cython | Keywords: | bitset, typecasting, fused types |
Cc: | Merged in: | ||
Authors: | Jonathan Kliem | Reviewers: | Travis Scrimshaw |
Report Upstream: | N/A | Work issues: | |
Branch: | 2c296ab (Commits, GitHub, GitLab) | Commit: | 2c296ab44fbcd62db51da5ab2325e57efd379148 |
Dependencies: | Stopgaps: |
Description (last modified by )
This ticket makes typecasts to functions in data_structures/bitset.pxi
explicit.
This allows fused types as signatures of those functions. E.g.
cdef inline void bitset_add(bitset_t bits, mp_bitcnt_t n)
-> cdef inline void bitset_add(fused_bitset_t bits, mp_bitcnt_t n)
. Fused functions do not allow calling this function with signature (bitset_t, PyObject)
. ((bitset_t, int)
etc. are ok though.)
This way, we can use most of the code in bitset.pxi
for CombinatorialPolyhedron
, while easily optimizing it for the special situation.
Change History (6)
comment:1 Changed 8 months ago by
- Status changed from new to needs_review
comment:2 Changed 8 months ago by
- Description modified (diff)
comment:3 Changed 8 months ago by
- Reviewers set to Travis Scrimshaw
- Status changed from needs_review to positive_review
comment:4 Changed 8 months ago by
Thank you.
comment:5 Changed 8 months ago by
- Branch changed from u/gh-kliem/remove_some_indirect_typecasts_to_bitset to 2c296ab44fbcd62db51da5ab2325e57efd379148
- Resolution set to fixed
- Status changed from positive_review to closed
comment:6 Changed 8 months ago by
- Milestone changed from sage-9.3 to sage-9.2
Note: See
TracTickets for help on using
tickets.
LGTM.