Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#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:

Status badges

Description (last modified by gh-kliem)

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 gh-kliem

  • Status changed from new to needs_review

comment:2 Changed 8 months ago by gh-kliem

  • Description modified (diff)

comment:3 Changed 8 months ago by tscrim

  • Reviewers set to Travis Scrimshaw
  • Status changed from needs_review to positive_review

LGTM.

comment:4 Changed 8 months ago by gh-kliem

Thank you.

comment:5 Changed 8 months ago by vbraun

  • 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 mkoeppe

  • Milestone changed from sage-9.3 to sage-9.2
Note: See TracTickets for help on using tickets.