-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from iscar-ucm/dev
Faster and parallel
- Loading branch information
Showing
18 changed files
with
727 additions
and
693 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
on: push | ||
name: Clippy check | ||
jobs: | ||
clippy_check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- run: rustup component add clippy | ||
- uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-features |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"name": "(Windows) Launch", | ||
"type": "cppvsdbg", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/target/debug/foo.exe", | ||
"args": [], | ||
"stopAtEntry": false, | ||
"cwd": "${workspaceRoot}", | ||
"environment": [], | ||
"externalConsole": true | ||
}, | ||
{ | ||
"name": "(OSX) Launch", | ||
"type": "lldb", | ||
"request": "launch", | ||
"program": "${workspaceRoot}/target/debug/xdevs", | ||
"args": ["HO", "400", "400"], | ||
"cwd": "${workspaceRoot}", | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"[rust]": { | ||
"editor.defaultFormatter": "rust-lang.rust-analyzer", | ||
"editor.formatOnSave": true | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "xdevs" | ||
version = "0.1.1" | ||
version = "0.2.0" | ||
authors = ["Román Cárdenas <[email protected]>"] | ||
edition = "2021" | ||
description = "An open source DEVS M&S framework." | ||
|
@@ -13,3 +13,22 @@ categories = ["simulation"] | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] | ||
rayon = { version = "1.6", optional = true } | ||
|
||
[features] | ||
par_any = ["rayon"] | ||
par_start = ["par_any"] | ||
par_collection = ["par_any"] | ||
par_eoc = ["par_any"] | ||
par_xic = ["par_any"] | ||
par_transition = ["par_any"] | ||
par_stop = ["par_any"] | ||
par_xxc = ["par_eoc", "par_xic"] | ||
par_sim_no_xxc = ["par_collection", "par_transition"] | ||
par_sim = ["par_sim_no_xxc", "par_xxc"] | ||
par_all_no_xxc = ["par_start", "par_sim_no_xxc", "par_stop"] | ||
par_all = ["par_all_no_xxc", "par_xxc"] | ||
|
||
[profile.release] | ||
lto = true | ||
panic = "unwind" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,39 @@ | ||
# xdevs-rs | ||
Version of the xDEVS simulator for Rust projects | ||
# xDEVS.rs | ||
|
||
Version of the xDEVS simulator for Rust projects. | ||
It allows you to build and simulate computational models following the DEVS formalism. | ||
Its API is easy to use for DEVS practitioners. | ||
Currently, their main features are speed and parallelism. | ||
|
||
## Blazingly fast 🚀 | ||
|
||
The Rust version of xDEVS is one of the fastests APIs currently available. | ||
We will shortly publish some preliminary results to illustrate this. | ||
|
||
## Fully configurable parallelism 🧶 | ||
|
||
We rely on the [`rayon`](https://github.com/rayon-rs/rayon) crate to provide parallelism for your simulations. | ||
By default, all the simulation process is done sequentially. However, you can activate different features to | ||
select where you want to take advantage of parallelism: | ||
|
||
- `par_start`: it runs in parallel the start methods of your model before starting to simulate. | ||
- `par_collection`: it executes the lambdas of your models in parallel. | ||
- `par_eoc`: it propagates the EOCs in parallel (we do not recommend this feature, it is likely to be removed). | ||
- `par_xic`: it propagates the EICs and ICs in parallel (we do not recommend this feature, it is likely to be removed). | ||
- `par_transition`: it executes the deltas of your models in parallel (we **DO** recommend this feature). | ||
- `par_stop`: it runs in parallel the stop methods of your model after the simulation. | ||
|
||
### Useful combined features | ||
|
||
We provide additional features to select handy combinations of features: | ||
|
||
- `par_xxc`: alias for `par_eoc` and `par_xic` (we do not recommend this feature, it is likely to be removed). | ||
- `par_sim_no_xcc`: alias for `par_collection` and `par_transition`. | ||
- `par_sim`: alias for `par_xxc` and `par_sim_no_xcc` (we do not recommend this feature, it is likely to be removed). | ||
- `par_all_no_xcc`: alias for `par_start`, `par_sim_no_xcc`, and `par_stop` (**this is our favourite**). | ||
- `par_all`: alias for `par_xxc` and `par_all_no_xcc` (we do not recommend this feature, it is likely to be removed). | ||
|
||
## Work in progress 👷♀️👷👷♂️ | ||
|
||
We are still working on this crate, and hope to add a plethora of cool features in the near future. Stay tuned! | ||
If you want to contribute, feel free to open an issue on GitHub, we will reply ASAP. |
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.