Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Collapsing all
.pyx
files into a single file.
This is to avoid unintended programming errors caused by sharing the **same** object file across multiple Cython-generated modules. (This is problematic if the object files **expect** to share some global state, which was happening with `MAX_CANDIDATES` and `SIMILAR_ULPS`.) To do this, simply copied the contents of each `.pyx` file in five sections in `src/bezier/_speedup.pyx`, and moved the imports and globals to a shared section at the beginning of the module. Due to name collisions (we lose the nice concept of namespaces, which is sad) 11 functions were renamed: - `reset_workspace` -> `reset_curves_workspace` - `workspace_size` -> `curves_workspace_size` - `reset_workspaces` -> `reset_surface_workspaces` - `workspace_sizes` -> `surface_workspace_sizes` - `_curve_speedup.pyx::subdivide_nodes` -> `subdivide_nodes_curve` - `_surface_speedup.pyx::subdivide_nodes` -> `subdivide_nodes_surface` - `_curve_speedup.pyx::newton_refine` -> `newton_refine_curve` - `_curve_intersection_speedup.pyx::newton_refine` -> `newton_refine_curve_intersect` - `_surface_intersection_speedup.pyx::newton_refine` -> `newton_refine_surface` - `_curve_speedup.pyx::locate_point` -> `locate_point_curve` - `_surface_intersection_speedup.pyx::locate_point` -> `locate_point_surface` As well as one constant: - `WORKSPACE` -> `CURVES_WORKSPACE` Also: - Updated `remove_cython_files.py` to gracefully handle the "no currently generated files" case - Removing old `.pyx` and `.c` files - Collapsing all `_HAS_*_SPEEDUP` variables into a single `_HAS_SPEEDUP` - Updating all usage of `_*_speedup` imports to just come from `_speedup` (with appropriate renames for renamed functions) - Updated build "journals" to reflect the new single module
- Loading branch information
Showing
30 changed files
with
19,371 additions
and
111,037 deletions.
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
Oops, something went wrong.