forge
Explore
Log in

Don't you dare go Hollow

Take_tx_type_hits is a test reader

Browse files at this commit

7389995164510e2b63ed184d1854e73a8cdb6b87Ahmet Kaan GümüşParent: 748b008
  • chore
    • take_tx_type_hits is a test reader
Show full message
chore(av1): take_tx_type_hits is a test reader
crates/ec-av1/src/encode.rsmodified+1 -0
@@ -3681,6 +3681,7 @@ pub(crate) static TX_TYPE_HITS: [std::sync::atomic::AtomicUsize; 16] =
3681 3681
3682 /// Reads [`TX_TYPE_HITS`] and zeroes it, so a gate or a test attributes the3682 /// Reads [`TX_TYPE_HITS`] and zeroes it, so a gate or a test attributes the
3683 /// counts to its own encode.3683 /// counts to its own encode.
3684+#[cfg(test)]
3684 pub(crate) fn take_tx_type_hits() -> [usize; 16] {3685 pub(crate) fn take_tx_type_hits() -> [usize; 16] {
3685 std::array::from_fn(|t| TX_TYPE_HITS[t].swap(0, std::sync::atomic::Ordering::Relaxed))3686 std::array::from_fn(|t| TX_TYPE_HITS[t].swap(0, std::sync::atomic::Ordering::Relaxed))
3686 }3687 }