Skip to content

Commit

Permalink
update 30b0f4d8ecfa2365affe241812e78bfb8fdf7e32
Browse files Browse the repository at this point in the history
  • Loading branch information
tomtomjhj committed Dec 4, 2023
1 parent 280479f commit f9f0511
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
9 changes: 3 additions & 6 deletions homework/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,13 @@ edition = "2021"
check-loom = ["loom"]

[dependencies]
arr_macro = "0.2.1"
cfg-if = "1.0.0"
crossbeam-channel = "0.5.8"
crossbeam-epoch = "0.9.15"
crossbeam-utils = "0.8.16"
ctrlc = "3.4.0"
either = "1.9.0"
itertools = "0.11.0"
ctrlc = "3.4.1"
cs431 = { git = "https://github.com/kaist-cp/cs431" }
# cs431 = { path = "../cs431" }
loom = { version = "0.7.0", optional = true }
loom = { version = "0.7.1", optional = true }
rand = "0.8.5"
regex = "1.9.3"
regex = "1.10.2"
10 changes: 6 additions & 4 deletions homework/tests/growable_array.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(cfg_sanitize)]

use core::mem::{self, ManuallyDrop};
use core::ptr;
use core::sync::atomic::Ordering;
Expand Down Expand Up @@ -163,14 +165,14 @@ fn insert_concurrent() {

#[test]
fn stress_concurrent() {
const THREADS: usize = 16;
const STEPS: usize = 4096 * 512;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * if cfg!(sanitize = "thread") { 128 } else { 512 };
map::stress_concurrent::<u32, NonblockingConcurrentMap<_, _, ArrayMap<usize>>>(THREADS, STEPS);
}

#[test]
fn log_concurrent() {
const THREADS: usize = 16;
const STEPS: usize = 4096 * 12;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * if cfg!(sanitize = "thread") { 16 } else { 64 };
map::log_concurrent::<u32, NonblockingConcurrentMap<_, _, ArrayMap<usize>>>(THREADS, STEPS);
}
10 changes: 6 additions & 4 deletions homework/tests/split_ordered_list.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![feature(cfg_sanitize)]

use crossbeam_epoch as epoch;

use cs431_homework::test::adt::map;
Expand Down Expand Up @@ -55,17 +57,17 @@ fn insert_concurrent() {

#[test]
fn stress_concurrent() {
const THREADS: usize = 16;
const STEPS: usize = 4096 * 512;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * if cfg!(sanitize = "thread") { 128 } else { 512 };
map::stress_concurrent::<usize, NonblockingConcurrentMap<_, _, SplitOrderedList<usize>>>(
THREADS, STEPS,
);
}

#[test]
fn log_concurrent() {
const THREADS: usize = 16;
const STEPS: usize = 4096 * 64;
const THREADS: usize = if cfg!(sanitize = "thread") { 4 } else { 16 };
const STEPS: usize = 4096 * if cfg!(sanitize = "thread") { 16 } else { 64 };
map::log_concurrent::<usize, NonblockingConcurrentMap<_, _, SplitOrderedList<usize>>>(
THREADS, STEPS,
);
Expand Down

0 comments on commit f9f0511

Please sign in to comment.