• Joined on 2019-03-28
sb10q commented on pull request M-Labs/nac3#478 2024-07-23 09:01:17 +08:00
add nalgebra::linalg methods

debug_assertions is for debugging the compiler.

sb10q commented on pull request M-Labs/nac3#478 2024-07-23 09:00:34 +08:00
add nalgebra::linalg methods

As I said before, you can raise exceptions from the Rust firmware.

sb10q commented on pull request M-Labs/nac3#478 2024-07-23 08:59:58 +08:00
add nalgebra::linalg methods

Isn't that already implemented via the @ operator?

sb10q pushed to master at M-Labs/artiq-zynq 2024-07-22 18:55:20 +08:00
57fd327ecb rustfmt
sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:21:11 +08:00
add nalgebra::linalg methods

The reference is numpy.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:14:54 +08:00
add nalgebra::linalg methods

Anyway I would just make it a static lib.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:14:12 +08:00
add nalgebra::linalg methods

Can you really pass a DSO to clang and get it linked in?

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:13:01 +08:00
add nalgebra::linalg methods

And generally I would try to follow numpy.linalg and the functions it provides, not implement random stuff from Rust nalgebra.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:11:58 +08:00
add nalgebra::linalg methods

No corresponding numpy/scipy library function?

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:11:30 +08:00
add nalgebra::linalg methods

It is possible to raise a Python exception from ksupport.rs.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:11:09 +08:00
add nalgebra::linalg methods

And please keep the naming scheme consistent. If this is replacing np.linalg.inv, it should be called np_linalg_inv, not try_invert_to.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:10:17 +08:00
add nalgebra::linalg methods

Why can't we just follow the numpy API and raise this exception on failure, instead of returning True/False?

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:08:33 +08:00
add nalgebra::linalg methods

(Not a problem coming from this PR)

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:08:02 +08:00
add nalgebra::linalg methods

Insert blank line to separate from the numpy stuff.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:06:55 +08:00
add nalgebra::linalg methods

Poorly written comment. If nalgebra methods are added or removed, it will go out of sync.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:05:06 +08:00
add nalgebra::linalg methods

Alarm bells should be ringing when you compare this entry to the others.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:04:17 +08:00
add nalgebra::linalg methods

And the crate should not be named "externfns" but "nalgebra_c" (or similar) and should be part of demo, not core/codegen.

sb10q commented on pull request M-Labs/nac3#478 2024-07-22 17:03:29 +08:00
add nalgebra::linalg methods

If the purpose of the DSO is to make the lli tests work, I would just get rid of the latter. The lli tests increase complexity and AFAICT don't really help find bugs.

sb10q pushed to master at M-Labs/artiq-zynq 2024-07-22 16:53:09 +08:00
69d5b11ebf kernel/api: add nalgebra::linalg methods
sb10q merged pull request M-Labs/artiq-zynq#308 2024-07-22 16:53:07 +08:00
kernel/api: add nalgebra::linalg methods