Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use CachePadded from crossbeam submodule #115

Merged
merged 3 commits into from
Apr 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/workflows/cache-padded-updates.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Check for changes in cache_padded.rs
on:
schedule:
- cron: "11 11 * * Mon"
jobs:
check-cache-padded:
runs-on: ubuntu-latest
steps:
- name: Clone Git repository
uses: actions/checkout@v3
with:
submodules: true
- name: Fetch newest stuff from crossbeam submodule
working-directory: crossbeam
run: |
git fetch origin master
- name: Check for changes in cache_padded.rs
working-directory: crossbeam
run: |
git diff origin/master -- crossbeam-utils/src/cache_padded.rs
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "crossbeam"]
path = crossbeam
url = https://github.com/crossbeam-rs/crossbeam.git
6 changes: 2 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,11 @@ exclude = [
default = ["std"]
std = []

[dependencies]
# "std" is enabled by default
crossbeam-utils = { version = "0.8", default-features = false }

[dev-dependencies]
rand = "0.8"
criterion = "0.3"
# TODO: This is only needed for the doctests of cache_padded.rs! Is there a way to avoid this?
crossbeam-utils = { version = "0.8", default-features = false }

[profile.bench]
codegen-units = 1
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ Licensed under either of

at your option.

Note that this crate contains a copy of the file `cache_padded.rs` from
https://github.com/crossbeam-rs/crossbeam.

#### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
Expand Down
1 change: 1 addition & 0 deletions crossbeam
Submodule crossbeam added at 9e8596
1 change: 1 addition & 0 deletions src/cache_padded.rs
4 changes: 3 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ use core::marker::PhantomData;
use core::mem::{ManuallyDrop, MaybeUninit};
use core::sync::atomic::{AtomicUsize, Ordering};

use crossbeam_utils::CachePadded;
#[allow(dead_code)]
mod cache_padded;
use cache_padded::CachePadded;

pub mod chunks;

Expand Down
Loading