-
Notifications
You must be signed in to change notification settings - Fork 255
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Well-defined lazy initialization for get_intra_edges
Always write to the top-left so the initialized area is contiguous. Introduce new types to make a safe rebinding pattern ergonomic: let mut edges: IntraEdgeBuffer<T> = Aligned::uninit_array(); let edges: IntraEdge<T> = get_intra_edges(&mut edges, ...); predict_intra(&edges, ...); IntraEdgeBuffer holds the aligned array for initialization. IntraEdge holds references to the initialized slices and ensures the layout required by the intra-prediction assembly. Support passing pre-initialized data for tests and benchmarks. Since MaybeUninit::write_slice() is only available in nightly rustc, use std::mem::transmute() with copy_from_slice() in get_intra_edges().
- Loading branch information
Showing
10 changed files
with
150 additions
and
89 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
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
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
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.