kernel/api: add nalgebra::linalg methods #308

Merged
sb10q merged 1 commits from :add_nalgebra_functions into master 2024-07-22 16:53:07 +08:00
Contributor

(Requires #307)
Adds the nalgebra::linalg methods to the runtime.

(Requires #307) Adds the `nalgebra::linalg` methods to the runtime.
sb10q reviewed 2024-07-22 11:44:48 +08:00
@ -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");
Owner

I don't think crashing the firmware in response to incorrect user input is a sensible thing to do.

I don't think crashing the firmware in response to incorrect user input is a sensible thing to do.
Owner

And isn't this check expensive?

And isn't this check expensive?
Author
Contributor

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 for linalg_wilkinson_shift are implemented in this manner).

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 for `linalg_wilkinson_shift` are implemented in this manner).
Owner

OK.

OK.
Author
Contributor

Revised

Revised
abdul124 force-pushed add_nalgebra_functions from 532aa7560c to 69d5b11ebf 2024-07-22 11:58:19 +08:00 Compare
sb10q merged commit 69d5b11ebf into master 2024-07-22 16:53:07 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/artiq-zynq#308
No description provided.