Coverage Report

Created: 2021-01-22 16:54

crossbeam-utils/src/cache_padded.rs
Line
Count
Source
1
use core::fmt;
2
use core::ops::{Deref, DerefMut};
3
4
/// Pads and aligns a value to the length of a cache line.
5
///
6
/// In concurrent programming, sometimes it is desirable to make sure commonly accessed pieces of
7
/// data are not placed into the same cache line. Updating an atomic value invalidates the whole
8
/// cache line it belongs to, which makes the next access to the same cache line slower for other
9
/// CPU cores. Use `CachePadded` to ensure updating one piece of data doesn't invalidate other
10
/// cached data.
11
///
12
/// # Size and alignment
13
///
14
/// Cache lines are assumed to be N bytes long, depending on the architecture:
15
///
16
/// * On x86-64, aarch64, and powerpc64, N = 128.
17
/// * On arm, mips, mips64, and riscv64, N = 32.
18
/// * On s390x, N = 256.
19
/// * On all others, N = 64.
20
///
21
/// Note that N is just a reasonable guess and is not guaranteed to match the actual cache line
22
/// length of the machine the program is running on. On modern Intel architectures, spatial
23
/// prefetcher is pulling pairs of 64-byte cache lines at a time, so we pessimistically assume that
24
/// cache lines are 128 bytes long.
25
///
26
/// The size of `CachePadded<T>` is the smallest multiple of N bytes large enough to accommodate
27
/// a value of type `T`.
28
///
29
/// The alignment of `CachePadded<T>` is the maximum of N bytes and the alignment of `T`.
30
///
31
/// # Examples
32
///
33
/// Alignment and padding:
34
///
35
/// ```
36
/// use crossbeam_utils::CachePadded;
37
///
38
/// let array = [CachePadded::new(1i8), CachePadded::new(2i8)];
39
/// let addr1 = &*array[0] as *const i8 as usize;
40
/// let addr2 = &*array[1] as *const i8 as usize;
41
///
42
/// assert!(addr2 - addr1 >= 64);
43
/// assert_eq!(addr1 % 64, 0);
44
/// assert_eq!(addr2 % 64, 0);
45
/// ```
46
///
47
/// When building a concurrent queue with a head and a tail index, it is wise to place them in
48
/// different cache lines so that concurrent threads pushing and popping elements don't invalidate
49
/// each other's cache lines:
50
///
51
/// ```
52
/// use crossbeam_utils::CachePadded;
53
/// use std::sync::atomic::AtomicUsize;
54
///
55
/// struct Queue<T> {
56
///     head: CachePadded<AtomicUsize>,
57
///     tail: CachePadded<AtomicUsize>,
58
///     buffer: *mut T,
59
/// }
60
/// ```
61
2
#[derive(Clone, Copy, 
Default1
, Hash, PartialEq, Eq)]
<crossbeam_utils::cache_padded::CachePadded<cache_padded::runs_custom_clone::Foo> as core::clone::Clone>::clone
Line
Count
Source
61
1
#[derive(Clone, Copy, Default, Hash, PartialEq, Eq)]
<crossbeam_utils::cache_padded::CachePadded<i32> as core::clone::Clone>::clone
Line
Count
Source
61
1
#[derive(Clone, Copy, Default, Hash, PartialEq, Eq)]
62
// Starting from Intel's Sandy Bridge, spatial prefetcher is now pulling pairs of 64-byte cache
63
// lines at a time, so we have to align to 128 bytes rather than 64.
64
//
65
// Sources:
66
// - https://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-optimization-manual.pdf
67
// - https://github.com/facebook/folly/blob/1b5288e6eea6df074758f877c849b6e73bbb9fbb/folly/lang/Align.h#L107
68
//
69
// ARM's big.LITTLE architecture has asymmetric cores and "big" cores have 128-byte cache line size.
70
//
71
// Sources:
72
// - https://www.mono-project.com/news/2016/09/12/arm64-icache/
73
//
74
// powerpc64 has 128-byte cache line size.
75
//
76
// Sources:
77
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_ppc64x.go#L9
78
#[cfg_attr(
79
    any(
80
        target_arch = "x86_64",
81
        target_arch = "aarch64",
82
        target_arch = "powerpc64",
83
    ),
84
    repr(align(128))
85
)]
86
// arm, mips, mips64, and riscv64 have 32-byte cache line size.
87
//
88
// Sources:
89
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_arm.go#L7
90
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips.go#L7
91
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mipsle.go#L7
92
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_mips64x.go#L9
93
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_riscv64.go#L7
94
#[cfg_attr(
95
    any(
96
        target_arch = "arm",
97
        target_arch = "mips",
98
        target_arch = "mips64",
99
        target_arch = "riscv64",
100
    ),
101
    repr(align(32))
102
)]
103
// s390x has 256-byte cache line size.
104
//
105
// Sources:
106
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_s390x.go#L7
107
#[cfg_attr(target_arch = "s390x", repr(align(256)))]
108
// x86 and wasm have 64-byte cache line size.
109
//
110
// Sources:
111
// - https://github.com/golang/go/blob/dda2991c2ea0c5914714469c4defc2562a907230/src/internal/cpu/cpu_x86.go#L9
112
// - https://github.com/golang/go/blob/3dd58676054223962cd915bb0934d1f9f489d4d2/src/internal/cpu/cpu_wasm.go#L7
113
//
114
// All others are assumed to have 64-byte cache line size.
115
#[cfg_attr(
116
    not(any(
117
        target_arch = "x86_64",
118
        target_arch = "aarch64",
119
        target_arch = "powerpc64",
120
        target_arch = "arm",
121
        target_arch = "mips",
122
        target_arch = "mips64",
123
        target_arch = "riscv64",
124
        target_arch = "s390x",
125
    )),
126
    repr(align(64))
127
)]
128
pub struct CachePadded<T> {
129
    value: T,
130
}
131
132
unsafe impl<T: Send> Send for CachePadded<T> {}
133
unsafe impl<T: Sync> Sync for CachePadded<T> {}
134
135
impl<T> CachePadded<T> {
136
    /// Pads and aligns a value to the length of a cache line.
137
    ///
138
    /// # Examples
139
    ///
140
    /// ```
141
    /// use crossbeam_utils::CachePadded;
142
    ///
143
    /// let padded_value = CachePadded::new(1);
144
    /// ```
145
90.8k
    pub const fn new(t: T) -> CachePadded<T> {
146
90.8k
        CachePadded::<T> { value: t }
147
90.8k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData>>::new
Line
Count
Source
145
3
    pub const fn new(t: T) -> CachePadded<T> {
146
3
        CachePadded::<T> { value: t }
147
3
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>>>>::new
Line
Count
Source
145
86
    pub const fn new(t: T) -> CachePadded<T> {
146
86
        CachePadded::<T> { value: t }
147
86
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::epoch::AtomicEpoch>>::new
Line
Count
Source
145
42
    pub const fn new(t: T) -> CachePadded<T> {
146
42
        CachePadded::<T> { value: t }
147
42
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>>>::new
Line
Count
Source
145
16
    pub const fn new(t: T) -> CachePadded<T> {
146
16
        CachePadded::<T> { value: t }
147
16
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<i32>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<alloc::boxed::Box<usize>>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<injector::destructors::Elem>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<injector::destructors::Elem>>>>::new
Line
Count
Source
145
7
    pub const fn new(t: T) -> CachePadded<T> {
146
7
        CachePadded::<T> { value: t }
147
7
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>>>::new
Line
Count
Source
145
16
    pub const fn new(t: T) -> CachePadded<T> {
146
16
        CachePadded::<T> { value: t }
147
16
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<injector::destructors::Elem>>>::new
Line
Count
Source
145
7
    pub const fn new(t: T) -> CachePadded<T> {
146
7
        CachePadded::<T> { value: t }
147
7
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
20.0k
    pub const fn new(t: T) -> CachePadded<T> {
146
20.0k
        CachePadded::<T> { value: t }
147
20.0k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<seg_queue::drops::DropCounter>>>::new
Line
Count
Source
145
200
    pub const fn new(t: T) -> CachePadded<T> {
146
200
        CachePadded::<T> { value: t }
147
200
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<i32>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<()>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
18
    pub const fn new(t: T) -> CachePadded<T> {
146
18
        CachePadded::<T> { value: t }
147
18
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
46
    pub const fn new(t: T) -> CachePadded<T> {
146
46
        CachePadded::<T> { value: t }
147
46
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
4.02k
    pub const fn new(t: T) -> CachePadded<T> {
146
4.02k
        CachePadded::<T> { value: t }
147
4.02k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_utils::sync::sharded_lock::Shard>>::new
Line
Count
Source
145
113
    pub const fn new(t: T) -> CachePadded<T> {
146
113
        CachePadded::<T> { value: t }
147
113
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<i32>>>>::new
Line
Count
Source
145
10
    pub const fn new(t: T) -> CachePadded<T> {
146
10
        CachePadded::<T> { value: t }
147
10
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
4
    pub const fn new(t: T) -> CachePadded<T> {
146
4
        CachePadded::<T> { value: t }
147
4
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
434
    pub const fn new(t: T) -> CachePadded<T> {
146
434
        CachePadded::<T> { value: t }
147
434
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<isize>>>>::new
Line
Count
Source
145
4
    pub const fn new(t: T) -> CachePadded<T> {
146
4
        CachePadded::<T> { value: t }
147
4
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
118
    pub const fn new(t: T) -> CachePadded<T> {
146
118
        CachePadded::<T> { value: t }
147
118
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
70
    pub const fn new(t: T) -> CachePadded<T> {
146
70
        CachePadded::<T> { value: t }
147
70
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
22.2k
    pub const fn new(t: T) -> CachePadded<T> {
146
22.2k
        CachePadded::<T> { value: t }
147
22.2k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
8
    pub const fn new(t: T) -> CachePadded<T> {
146
8
        CachePadded::<T> { value: t }
147
8
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData>>::new
Line
Count
Source
145
20
    pub const fn new(t: T) -> CachePadded<T> {
146
20
        CachePadded::<T> { value: t }
147
20
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
224
    pub const fn new(t: T) -> CachePadded<T> {
146
224
        CachePadded::<T> { value: t }
147
224
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
4
    pub const fn new(t: T) -> CachePadded<T> {
146
4
        CachePadded::<T> { value: t }
147
4
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
4
    pub const fn new(t: T) -> CachePadded<T> {
146
4
        CachePadded::<T> { value: t }
147
4
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<i32>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<alloc::boxed::Box<usize>>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<fifo::destructors::Elem>>>>::new
Line
Count
Source
145
9
    pub const fn new(t: T) -> CachePadded<T> {
146
9
        CachePadded::<T> { value: t }
147
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>>>::new
Line
Count
Source
145
19
    pub const fn new(t: T) -> CachePadded<T> {
146
19
        CachePadded::<T> { value: t }
147
19
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<fifo::destructors::Elem>>>::new
Line
Count
Source
145
9
    pub const fn new(t: T) -> CachePadded<T> {
146
9
        CachePadded::<T> { value: t }
147
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>>>::new
Line
Count
Source
145
19
    pub const fn new(t: T) -> CachePadded<T> {
146
19
        CachePadded::<T> { value: t }
147
19
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<alloc::boxed::Box<usize>>>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>>>::new
Line
Count
Source
145
22
    pub const fn new(t: T) -> CachePadded<T> {
146
22
        CachePadded::<T> { value: t }
147
22
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>>>::new
Line
Count
Source
145
22
    pub const fn new(t: T) -> CachePadded<T> {
146
22
        CachePadded::<T> { value: t }
147
22
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<i32>>>::new
Line
Count
Source
145
10
    pub const fn new(t: T) -> CachePadded<T> {
146
10
        CachePadded::<T> { value: t }
147
10
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>>>::new
Line
Count
Source
145
2.00k
    pub const fn new(t: T) -> CachePadded<T> {
146
2.00k
        CachePadded::<T> { value: t }
147
2.00k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<list::drops::DropCounter>>>::new
Line
Count
Source
145
200
    pub const fn new(t: T) -> CachePadded<T> {
146
200
        CachePadded::<T> { value: t }
147
200
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
20.0k
    pub const fn new(t: T) -> CachePadded<T> {
146
20.0k
        CachePadded::<T> { value: t }
147
20.0k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
16
    pub const fn new(t: T) -> CachePadded<T> {
146
16
        CachePadded::<T> { value: t }
147
16
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
10
    pub const fn new(t: T) -> CachePadded<T> {
146
10
        CachePadded::<T> { value: t }
147
10
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
4
    pub const fn new(t: T) -> CachePadded<T> {
146
4
        CachePadded::<T> { value: t }
147
4
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
10.3k
    pub const fn new(t: T) -> CachePadded<T> {
146
10.3k
        CachePadded::<T> { value: t }
147
10.3k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
26
    pub const fn new(t: T) -> CachePadded<T> {
146
26
        CachePadded::<T> { value: t }
147
26
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
4.03k
    pub const fn new(t: T) -> CachePadded<T> {
146
4.03k
        CachePadded::<T> { value: t }
147
4.03k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
66
    pub const fn new(t: T) -> CachePadded<T> {
146
66
        CachePadded::<T> { value: t }
147
66
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>>>::new
Line
Count
Source
145
6
    pub const fn new(t: T) -> CachePadded<T> {
146
6
        CachePadded::<T> { value: t }
147
6
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>>>::new
Line
Count
Source
145
34
    pub const fn new(t: T) -> CachePadded<T> {
146
34
        CachePadded::<T> { value: t }
147
34
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>>>::new
Line
Count
Source
145
18
    pub const fn new(t: T) -> CachePadded<T> {
146
18
        CachePadded::<T> { value: t }
147
18
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize>>::new
Line
Count
Source
145
6.01k
    pub const fn new(t: T) -> CachePadded<T> {
146
6.01k
        CachePadded::<T> { value: t }
147
6.01k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<alloc::boxed::Box<usize>>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<alloc::boxed::Box<usize>>>>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<lifo::destructors::Elem>>>>::new
Line
Count
Source
145
9
    pub const fn new(t: T) -> CachePadded<T> {
146
9
        CachePadded::<T> { value: t }
147
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>>>::new
Line
Count
Source
145
18
    pub const fn new(t: T) -> CachePadded<T> {
146
18
        CachePadded::<T> { value: t }
147
18
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>>>::new
Line
Count
Source
145
18
    pub const fn new(t: T) -> CachePadded<T> {
146
18
        CachePadded::<T> { value: t }
147
18
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<lifo::destructors::Elem>>>::new
Line
Count
Source
145
9
    pub const fn new(t: T) -> CachePadded<T> {
146
9
        CachePadded::<T> { value: t }
147
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>>>>::new
Line
Count
Source
145
32
    pub const fn new(t: T) -> CachePadded<T> {
146
32
        CachePadded::<T> { value: t }
147
32
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::epoch::AtomicEpoch>>::new
Line
Count
Source
145
16
    pub const fn new(t: T) -> CachePadded<T> {
146
16
        CachePadded::<T> { value: t }
147
16
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::sync::queue::test::push_try_pop_many_mpmc::LR>>>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<i64>>>>::new
Line
Count
Source
145
20
    pub const fn new(t: T) -> CachePadded<T> {
146
20
        CachePadded::<T> { value: t }
147
20
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 6]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<cache_padded::runs_custom_clone::Foo>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<cache_padded::drops::Foo>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<u8>>::new
Line
Count
Source
145
3
    pub const fn new(t: T) -> CachePadded<T> {
146
3
        CachePadded::<T> { value: t }
147
3
    }
<crossbeam_utils::cache_padded::CachePadded<i32>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<u32>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<(u64, u64)>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 1]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 2]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 7]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 8]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 9]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 3]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 4]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<u16>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<u64>>::new
Line
Count
Source
145
2
    pub const fn new(t: T) -> CachePadded<T> {
146
2
        CachePadded::<T> { value: t }
147
2
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 0]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
<crossbeam_utils::cache_padded::CachePadded<[u64; 5]>>::new
Line
Count
Source
145
1
    pub const fn new(t: T) -> CachePadded<T> {
146
1
        CachePadded::<T> { value: t }
147
1
    }
148
149
    /// Returns the inner value.
150
    ///
151
    /// # Examples
152
    ///
153
    /// ```
154
    /// use crossbeam_utils::CachePadded;
155
    ///
156
    /// let padded_value = CachePadded::new(7);
157
    /// let value = padded_value.into_inner();
158
    /// assert_eq!(value, 7);
159
    /// ```
160
    pub fn into_inner(self) -> T {
161
        self.value
162
    }
163
}
164
165
impl<T> Deref for CachePadded<T> {
166
    type Target = T;
167
168
83.5M
    fn deref(&self) -> &T {
169
83.5M
        &self.value
170
83.5M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData> as core::ops::deref::Deref>::deref
Line
Count
Source
168
156
    fn deref(&self) -> &T {
169
156
        &self.value
170
156
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
10.7k
    fn deref(&self) -> &T {
169
10.7k
        &self.value
170
10.7k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::epoch::AtomicEpoch> as core::ops::deref::Deref>::deref
Line
Count
Source
168
891k
    fn deref(&self) -> &T {
169
891k
        &self.value
170
891k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<injector::destructors::Elem>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
8
    fn deref(&self) -> &T {
169
8
        &self.value
170
8
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<alloc::boxed::Box<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
194k
    fn deref(&self) -> &T {
169
194k
        &self.value
170
194k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<injector::destructors::Elem>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
156k
    fn deref(&self) -> &T {
169
156k
        &self.value
170
156k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.16M
    fn deref(&self) -> &T {
169
1.16M
        &self.value
170
1.16M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.06M
    fn deref(&self) -> &T {
169
1.06M
        &self.value
170
1.06M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
71
    fn deref(&self) -> &T {
169
71
        &self.value
170
71
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
13
    fn deref(&self) -> &T {
169
13
        &self.value
170
13
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<injector::destructors::Elem>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
24.6k
    fn deref(&self) -> &T {
169
24.6k
        &self.value
170
24.6k
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
247k
    fn deref(&self) -> &T {
169
247k
        &self.value
170
247k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
27
    fn deref(&self) -> &T {
169
27
        &self.value
170
27
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<seg_queue::drops::DropCounter>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2.74M
    fn deref(&self) -> &T {
169
2.74M
        &self.value
170
2.74M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
781k
    fn deref(&self) -> &T {
169
781k
        &self.value
170
781k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_queue::seg_queue::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
22
    fn deref(&self) -> &T {
169
22
        &self.value
170
22
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
88.6k
    fn deref(&self) -> &T {
169
88.6k
        &self.value
170
88.6k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
90.9k
    fn deref(&self) -> &T {
169
90.9k
        &self.value
170
90.9k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
3.36M
    fn deref(&self) -> &T {
169
3.36M
        &self.value
170
3.36M
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2.38M
    fn deref(&self) -> &T {
169
2.38M
        &self.value
170
2.38M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_utils::sync::sharded_lock::Shard> as core::ops::deref::Deref>::deref
Line
Count
Source
168
31.3k
    fn deref(&self) -> &T {
169
31.3k
        &self.value
170
31.3k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<i32>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
168
    fn deref(&self) -> &T {
169
168
        &self.value
170
168
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
12.6k
    fn deref(&self) -> &T {
169
12.6k
        &self.value
170
12.6k
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
43.4k
    fn deref(&self) -> &T {
169
43.4k
        &self.value
170
43.4k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<isize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
56
    fn deref(&self) -> &T {
169
56
        &self.value
170
56
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
653k
    fn deref(&self) -> &T {
169
653k
        &self.value
170
653k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
241k
    fn deref(&self) -> &T {
169
241k
        &self.value
170
241k
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
3.06M
    fn deref(&self) -> &T {
169
3.06M
        &self.value
170
3.06M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData> as core::ops::deref::Deref>::deref
Line
Count
Source
168
15
    fn deref(&self) -> &T {
169
15
        &self.value
170
15
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
337
    fn deref(&self) -> &T {
169
337
        &self.value
170
337
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
205
    fn deref(&self) -> &T {
169
205
        &self.value
170
205
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_skiplist::base::HotData> as core::ops::deref::Deref>::deref
Line
Count
Source
168
878
    fn deref(&self) -> &T {
169
878
        &self.value
170
878
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
17
    fn deref(&self) -> &T {
169
17
        &self.value
170
17
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.96M
    fn deref(&self) -> &T {
169
1.96M
        &self.value
170
1.96M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
15
    fn deref(&self) -> &T {
169
15
        &self.value
170
15
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
12
    fn deref(&self) -> &T {
169
12
        &self.value
170
12
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1
    fn deref(&self) -> &T {
169
1
        &self.value
170
1
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
6
    fn deref(&self) -> &T {
169
6
        &self.value
170
6
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
18
    fn deref(&self) -> &T {
169
18
        &self.value
170
18
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
9
    fn deref(&self) -> &T {
169
9
        &self.value
170
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
119
    fn deref(&self) -> &T {
169
119
        &self.value
170
119
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<fifo::destructors::Elem>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
179k
    fn deref(&self) -> &T {
169
179k
        &self.value
170
179k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<alloc::boxed::Box<usize>>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
45.9k
    fn deref(&self) -> &T {
169
45.9k
        &self.value
170
45.9k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<fifo::destructors::Elem>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
453
    fn deref(&self) -> &T {
169
453
        &self.value
170
453
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
168k
    fn deref(&self) -> &T {
169
168k
        &self.value
170
168k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<alloc::boxed::Box<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
405k
    fn deref(&self) -> &T {
169
405k
        &self.value
170
405k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.35M
    fn deref(&self) -> &T {
169
1.35M
        &self.value
170
1.35M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
36
    fn deref(&self) -> &T {
169
36
        &self.value
170
36
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
343
    fn deref(&self) -> &T {
169
343
        &self.value
170
343
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
100
    fn deref(&self) -> &T {
169
100
        &self.value
170
100
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<alloc::boxed::Box<dyn core::any::Any + core::marker::Send>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
17.3k
    fn deref(&self) -> &T {
169
17.3k
        &self.value
170
17.3k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<list::drops::DropCounter>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2.72M
    fn deref(&self) -> &T {
169
2.72M
        &self.value
170
2.72M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.08M
    fn deref(&self) -> &T {
169
1.08M
        &self.value
170
1.08M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
902k
    fn deref(&self) -> &T {
169
902k
        &self.value
170
902k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.55M
    fn deref(&self) -> &T {
169
1.55M
        &self.value
170
1.55M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.48M
    fn deref(&self) -> &T {
169
1.48M
        &self.value
170
1.48M
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
4.76M
    fn deref(&self) -> &T {
169
4.76M
        &self.value
170
4.76M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
113k
    fn deref(&self) -> &T {
169
113k
        &self.value
170
113k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
139k
    fn deref(&self) -> &T {
169
139k
        &self.value
170
139k
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2.31M
    fn deref(&self) -> &T {
169
2.31M
        &self.value
170
2.31M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
3.20M
    fn deref(&self) -> &T {
169
3.20M
        &self.value
170
3.20M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
108k
    fn deref(&self) -> &T {
169
108k
        &self.value
170
108k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
693
    fn deref(&self) -> &T {
169
693
        &self.value
170
693
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_channel::flavors::list::Position<()>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
666k
    fn deref(&self) -> &T {
169
666k
        &self.value
170
666k
    }
<crossbeam_utils::cache_padded::CachePadded<core::sync::atomic::AtomicUsize> as core::ops::deref::Deref>::deref
Line
Count
Source
168
712k
    fn deref(&self) -> &T {
169
712k
        &self.value
170
712k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<lifo::destructors::Elem>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
201k
    fn deref(&self) -> &T {
169
201k
        &self.value
170
201k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<i32>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
132
    fn deref(&self) -> &T {
169
132
        &self.value
170
132
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<i32>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
9
    fn deref(&self) -> &T {
169
9
        &self.value
170
9
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<usize>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.26M
    fn deref(&self) -> &T {
169
1.26M
        &self.value
170
1.26M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<alloc::boxed::Box<usize>>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
85.0k
    fn deref(&self) -> &T {
169
85.0k
        &self.value
170
85.0k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<lifo::destructors::Elem>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.28k
    fn deref(&self) -> &T {
169
1.28k
        &self.value
170
1.28k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_deque::deque::Buffer<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
199k
    fn deref(&self) -> &T {
169
199k
        &self.value
170
199k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_deque::deque::Inner<alloc::boxed::Box<usize>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
563k
    fn deref(&self) -> &T {
169
563k
        &self.value
170
563k
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::epoch::AtomicEpoch> as core::ops::deref::Deref>::deref
Line
Count
Source
168
19.6M
    fn deref(&self) -> &T {
169
19.6M
        &self.value
170
19.6M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::internal::SealedBag>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
3.96M
    fn deref(&self) -> &T {
169
3.96M
        &self.value
170
3.96M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<crossbeam_epoch::sync::queue::test::push_try_pop_many_mpmc::LR>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
1.96M
    fn deref(&self) -> &T {
169
1.96M
        &self.value
170
1.96M
    }
<crossbeam_utils::cache_padded::CachePadded<crossbeam_epoch::atomic::Atomic<crossbeam_epoch::sync::queue::Node<i64>>> as core::ops::deref::Deref>::deref
Line
Count
Source
168
14.4M
    fn deref(&self) -> &T {
169
14.4M
        &self.value
170
14.4M
    }
<crossbeam_utils::cache_padded::CachePadded<i32> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2
    fn deref(&self) -> &T {
169
2
        &self.value
170
2
    }
<crossbeam_utils::cache_padded::CachePadded<u64> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2
    fn deref(&self) -> &T {
169
2
        &self.value
170
2
    }
<crossbeam_utils::cache_padded::CachePadded<(u64, u64)> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2
    fn deref(&self) -> &T {
169
2
        &self.value
170
2
    }
<crossbeam_utils::cache_padded::CachePadded<u8> as core::ops::deref::Deref>::deref
Line
Count
Source
168
2
    fn deref(&self) -> &T {
169
2
        &self.value
170
2
    }
171
}
172
173
impl<T> DerefMut for CachePadded<T> {
174
    fn deref_mut(&mut self) -> &mut T {
175
        &mut self.value
176
    }
177
}
178
179
impl<T: fmt::Debug> fmt::Debug for CachePadded<T> {
180
1
    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
181
1
        f.debug_struct("CachePadded")
182
1
            .field("value", &self.value)
183
1
            .finish()
184
1
    }
185
}
186
187
impl<T> From<T> for CachePadded<T> {
188
    fn from(t: T) -> Self {
189
        CachePadded::new(t)
190
    }
191
}