Skip to content

Commit

Permalink
add desxcriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
imrn99 committed Dec 3, 2024
1 parent fed3027 commit cb24350
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 0 deletions.
29 changes: 29 additions & 0 deletions benches/src/shift.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
//! Simple vertex relaxation routine.
//!
//! # Usage
//!
//! ```
//! cargo build --release --bin=shift
//! ./target/release/shift <GRID_SIZE> <N_ROUNDS>
//! ```
//!
//! With:
//! - `GRID_SIZE` the dimension of the generated (square) grid along one axis
//! - `N_ROUNDS` the number of iterations of the relaxa6tion algorithm
//!
//! # Description
//!
//! ## Routine
//!
//! The algorithm fetches all vertices that are not on the border of the map, fetch all identifiers of each
//! respective vertices' neighbors. Then, for all vertices:
//!
//! - compute the average between neighbors
//1 - overwrite current vertex value with computed average
//!
//! ## Benchmark
//!
//! This binary is meant to be use to evaluate scalability of geometry-only kernels. It is parallelized using
//! rayon, and the number of thread used for execution can be controlled using `taskset`. By controlling this,
//! and the grid size, we can evaluate both strong and weak scaling characteristics.
use rayon::prelude::*;

use honeycomb::core::stm::atomically;
Expand Down
33 changes: 33 additions & 0 deletions benches/src/shift_no_conflict.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,36 @@
//! Simple vertex relaxation routine.
//!
//! # Usage
//!
//! ```
//! cargo build --release --bin=shift
//! ./target/release/shift <GRID_SIZE> <N_ROUNDS>
//! ```
//!
//! With:
//! - `GRID_SIZE` the dimension of the generated (square) grid along one axis
//! - `N_ROUNDS` the number of iterations of the relaxa6tion algorithm
//!
//! # Description
//!
//! ## Routine
//!
//! The algorithm fetches all vertices that are not on the border of the map, fetch all identifiers of each
//! respective vertices' neighbors. The set of vertices is then split into independent subset, to create
//! groups with no RW access conflicts. Then, for all vertices of each set:
//!
//! - compute the average between neighbors
//1 - overwrite current vertex value with computed average
//!
//! ## Benchmark
//!
//! This binary is meant to be use to evaluate scalability of geometry-only kernels. It is parallelized using
//! rayon, and the number of thread used for execution can be controlled using `taskset`. By controlling this,
//! and the grid size, we can evaluate both strong and weak scaling characteristics.
//!
//! Using this, along with the regular `shift` binary highlights the cost of access conflict and transaction
//! cancellations.
use rayon::prelude::*;

use honeycomb::core::stm::atomically;
Expand Down

0 comments on commit cb24350

Please sign in to comment.