Commit Graph

37 Commits

Author SHA1 Message Date
Andreas Borgen Longva
eb228faa2b
Improved stack! implementation, tests (#1375)
* Add macro for concatenating matrices

* Replace DimUnify with DimEq::representative

* Add some simple cat macro output generation tests

* Fix formatting in cat macro code

* Add random prefix to cat macro output

* Add simple quote_spanned for cat macro

* Use `generic_view_mut` in cat macro

* Fix clippy lints in cat macro

* Clean up documentation for cat macro

* Remove identity literal from cat macro

* Allow references in input to cat macro

* Rename cat macro to stack

* Add more stack macro tests

* Add comment to explain reason for prefix in stack! macro

* Refactor matrix!, stack! macros into separate modules

* Take all blocks by reference in stack! macro

* Make empty stack![] invocation well-defined

* Fix stack! macro incorrect reference to data

* More extensive tests for stack! macro

* Move nalgebra-macros tests to nalgebra tests

By testing matrix!, stack! macros etc. in nalgebra, we ensure that
these macros are used in the same way that users will be using them.

* Fix stack! code generation tests

* Add back nalgebra as dev-dependency of nalgebra-macros

* Fix accidental wrong matrix! macro references in docs

* Rewrite stack! documentation for clarity

* Formatting

* Skip formatting of macro, rustfmt messes it up

* Rewrite stack! impl for improved clarity, Span behavior

This improves error messages upon dimension mismatch, among other
things. I've also tried to make the implementation easier to understand,
adding some comments to help the reader understand the individual steps.

* Use SameNumberOfRows/Columns instead of DimEq in stack! macro

This gives more accurate compiler errors if matrix dimensions
are mismatched.

* Check that stack! panics at runtime for basic dimension mismatch

* Add suggested edge cases from initial PR to tests

* stack! impl: use fixed prefix everywhere

This ensures that the expected generated code in tests
is the actual generated code when used in the wild.

* nalgebra-macros: Remove clippy pedantic, fix clippy complaints

pedantic seems to be mostly intent on wasting the programmer's time

* Add stack! sanity tests for built-ins and Complex

* Fix formatting in test

* Improve readability of format_ident! calls in stack! impl

* fix trybuild tests

* chore: run tests with a specific rust version

* More trybuild fixes

---------

Co-authored-by: Birk Tjelmeland <git@birktj.no>
Co-authored-by: Sébastien Crozet <sebcrozet@dimforge.com>
2024-06-23 11:29:28 +02:00
Benjamin Saunders
7866bcee5c Remove CUDA support relying on abandoned toolchain 2024-01-11 23:09:17 -08:00
Sébastien Crozet
3a8c1bf81e Use rayon as the feature name instead of par-iter 2023-01-14 15:59:11 +01:00
geo-ant
85a58ca939 update CI workflow 2023-01-14 12:08:47 +01:00
geo-ant
324e686fe6 update workflow for new feature name 2023-01-14 12:08:40 +01:00
geo-ant
701d260fa6 rayon parallel feature w/o nightly features on old compilers 2023-01-14 12:08:40 +01:00
geo-ant
85e7551c81 feature gate functionality 2023-01-14 12:08:40 +01:00
Sébastien Crozet
924795be45 CI: use the newer version of Jimver/cuda-toolkit 2023-01-13 10:12:47 +01:00
Sébastien Crozet
7cacb2bf4a Fix CI for Cuda 2023-01-13 10:06:49 +01:00
Ryan B. Harvey
a4fdea927d Add simple cargo doc step to CI 2022-12-12 04:21:23 +00:00
Peng Guanwen
bc566d91bf Add test for rkyv 2022-10-13 12:22:45 +00:00
Sébastien Crozet
30c0450075 CI: set the CUDA_ARCH env var when targetting nvptx 2022-03-11 18:06:40 +01:00
Sébastien Crozet
1c4c3de92e CI: pin the version of Cuda 2022-03-11 17:43:01 +01:00
Ben Kimock
698e130c3b Remove abomonation support
Abomonation has numerous soundness problems which have been
well-documented in its issue tracker for over 2 years. Some of them
could be fixed, but some are fundamental to its design. If a user wants
super-fast ser/de, they should use rkyv.
2022-02-05 17:15:08 -05:00
Fabian Löschner
49eb1bd778 CI: Run nalgebra-sparse builds with different feature sets, serde tests 2022-01-11 10:35:07 +01:00
Sébastien Crozet
1576a1517a
Merge pull request #1017 from losanc/matrixmarket-io
added reading matrix market data to sparse coomatrix
2021-12-21 01:51:08 -08:00
Sébastien Crozet
229c137756 CI: update the nightly version used for the cuda build 2021-12-09 12:03:00 +01:00
Andreas Longva
9ddd09017d Update add IO feature to CI config for nalgebra-sparse 2021-12-01 12:18:50 +01:00
Sébastien Crozet
122bedf072 CI: use the nightly-2021-10-17 toolchain when targetting nvptx 2021-11-24 12:39:17 +01:00
Sébastien Crozet
5d9562f7d8 nalgebra-glm: add a cuda feature 2021-11-23 13:57:30 +01:00
Sébastien Crozet
287cb9b149 CI: install the nvptx64-nvidia-cuda target 2021-11-23 13:48:58 +01:00
Sébastien Crozet
f32df45ef1 CI: checkout the repo for the cuda target 2021-11-23 13:42:13 +01:00
Sébastien Crozet
23d3ed7ee4 CI: add a build targetting nvptx cuda 2021-11-23 13:36:54 +01:00
Sébastien Crozet
3eef934999 Fix CI syntax error 2021-11-23 13:16:28 +01:00
Sébastien Crozet
6eda7e4e65 CI: install the CUDA toolkit 2021-11-23 13:15:17 +01:00
Sébastien Crozet
a463143608 Add nalgebra-glm to the no-std CI build 2021-11-21 20:57:02 +01:00
Andreas Longva
08a77dd05e Test nalgebra-macros on CI 2021-05-03 13:52:34 +02:00
Vinzent Steinberg
7f0a22bd22 Fix CI for nalgebra-glm
Some features were specified that do not exist for the crate. With the
new Cargo resolver, this is an error, so these features were removed.
2021-04-10 01:58:20 -03:00
Crozet Sébastien
2602f48452 Fix compilation when only the serde-serialize feature of nalgebra is enabled. 2021-04-01 11:40:27 +02:00
Crozet Sébastien
ff27daf044 Enable rand for tests. 2021-03-02 12:37:00 +01:00
Crozet Sébastien
c32172b6b9 Make the rand dependency optional. 2021-03-02 12:25:12 +01:00
Crozet Sébastien
abf03a78a0 github actions: fix yaml 2021-03-01 12:57:12 +01:00
Crozet Sébastien
a9558a3a8b github actions: split tests into separate jobs. 2021-03-01 12:54:50 +01:00
Crozet Sébastien
9d8c347605 Switch back to github actions runner. 2021-03-01 12:16:10 +01:00
Crozet Sébastien
c4d0e82717 Github actions: uses self-hosted runner. 2021-03-01 11:23:06 +01:00
Crozet Sébastien
5bc8e65f36 Enable github actions on the dev branch too. 2021-03-01 10:43:08 +01:00
Crozet Sébastien
53cc1c1766 Add a github actions workflow. 2021-03-01 10:39:20 +01:00