kernel/api: add nalgebra::linalg methods #308
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: M-Labs/artiq-zynq#308
Loading…
Reference in New Issue
No description provided.
Delete Branch ":add_nalgebra_functions"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
(Requires #307)
Adds the
nalgebra::linalg
methods to the runtime.@ -41,0 +57,4 @@
let data_slice = slice::from_raw_parts_mut(data, dim0 * dim1);
let matrix = DMatrix::from_row_slice(dim0, dim1, data_slice);
assert!(matrix[(0, 1)] == matrix[(1, 0)], "Wilkinson Shift is defined for 2D symmetric matrices");
I don't think crashing the firmware in response to incorrect user input is a sensible thing to do.
And isn't this check expensive?
I can move this check to nac3core during code generation. The function can work under the assumption that the received input is of correct type (Other checks like having square matrix for
linalg_try_invert_to
or having a 2x2 matrix forlinalg_wilkinson_shift
are implemented in this manner).OK.
Revised
532aa7560c
to69d5b11ebf