BitVecSimd

Struct BitVecSimd 

Source
#[repr(C)]
pub struct BitVecSimd<A, const L: usize>
where A: Array + Index<usize>, A::Item: BitBlock<L>,
{ /* private fields */ }
Expand description

Representation of a BitVec

see the module’s document for examples and details.

Implementations§

Source§

impl<A, const L: usize> BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source

pub fn zeros(nbits: usize) -> Self

Create an empty bitvec with nbits initial elements. Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::zeros(10);
assert_eq!(bitvec.len(), 10);
Source

pub fn ones(nbits: usize) -> Self

Create a bitvec containing all 0 .. nbits elements. Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::ones(10);
assert_eq!(bitvec.len(), 10);
Source

pub fn from_bool_iterator<I: Iterator<Item = bool>>(i: I) -> Self

Create a bitvec from an Iterator of bool.

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::from_bool_iterator((0..10).map(|x| x % 2 == 0));
assert_eq!(bitvec.len(), 10);
assert_eq!(<BitVec as Into<Vec<bool>>>::into(bitvec), vec![true, false, true, false, true, false, true, false, true, false]);

let bitvec = BitVec::from_bool_iterator((0..1000).map(|x| x < 50));
assert_eq!(bitvec.len(), 1000);
assert_eq!(bitvec.get(49), Some(true));
assert_eq!(bitvec.get(50), Some(false));
assert_eq!(bitvec.get(999), Some(false));
assert_eq!(<BitVec as Into<Vec<bool>>>::into(bitvec), (0..1000).map(|x| x<50).collect::<Vec<bool>>());
Source

pub fn from_slice(slice: &[usize]) -> Self

Initialize from a set of integers.

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::from_slice(&[0,5,9]);
assert_eq!(<BitVec as Into<Vec<bool>>>::into(bitvec), vec![true, false, false, false, false, true, false, false, false, true]);
Source

pub fn from_slice_copy( slice: &[<A::Item as BitBlock<L>>::Element], nbits: usize, ) -> Self

Initialize from a E slice. Data will be copied from the slice.

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::from_slice_copy(&[3], 3);
assert_eq!(bitvec.get(0), Some(true));
assert_eq!(bitvec.get(1), Some(true));
assert_eq!(bitvec.get(2), Some(false));
assert_eq!(bitvec.get(3), None);
Source

pub unsafe fn from_raw_copy( ptr: *const <A::Item as BitBlock<L>>::Element, buffer_len: usize, nbits: usize, ) -> Self

Initialize from a raw buffer. Data will be copied from the buffer which [ptr] points to. The buffer can be released after initialization.

§Safety

If any of the following conditions are violated, the result is Undefined Behavior:

  • ptr should be valid and point to an [allocated object] with length >= buffer_len

  • ptr.offset(buffer_len - 1), in bytes, cannot overflow an isize.

  • The offset being in bounds cannot rely on “wrapping around” the address space. That is, the infinite-precision sum, in bytes must fit in a usize.

Source

pub fn len(&self) -> usize

Length of this bitvec.

To get the number of elements, use count_ones

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::ones(3);
assert_eq!(bitvec.len(), 3);
Source

pub fn storage_len(&self) -> usize

Length of underlining storage.

Source

pub fn storage_capacity(&self) -> usize

Capacity of underlining storage.

Source

pub fn as_ptr(&self) -> *const A::Item

Returns a raw pointer to the vector’s buffer.

Source

pub fn as_mut_ptr(&mut self) -> *mut A::Item

Returns a raw mutable pointer to the vector’s buffer.

Source

pub fn spilled(&self) -> bool

Returns true if the data has spilled into a separate heap-allocated buffer.

Source

pub fn resize(&mut self, nbits: usize, value: bool)

Resize this bitvec to nbits in-place. If new length is greater than current length, value will be filled.

Example:

use bitvec_simd::BitVec;

let mut bitvec = BitVec::ones(3);
bitvec.resize(5, false);
assert_eq!(bitvec.len(), 5);
bitvec.resize(2, false);
assert_eq!(bitvec.len(), 2);
Source

pub fn shrink_to(&mut self, nbits: usize)

Shink this bitvec to new length in-place. Panics if new length is greater than original.

Example:

use bitvec_simd::BitVec;

let mut bitvec = BitVec::ones(3);
bitvec.shrink_to(2);
assert_eq!(bitvec.len(), 2);
Source

pub fn set(&mut self, index: usize, flag: bool)

Remove or add index to the set. If index > self.len, the bitvec will be expanded to index. Example:

use bitvec_simd::BitVec;

let mut bitvec = BitVec::zeros(10);
assert_eq!(bitvec.len(), 10);
bitvec.set(15, true);  
// now 15 has been added to the set, its total len is 16.
assert_eq!(bitvec.len(), 16);
assert_eq!(bitvec.get(15), Some(true));
assert_eq!(bitvec.get(14), Some(false));
Source

pub unsafe fn set_raw_copy( &mut self, ptr: *mut A::Item, buffer_len: usize, nbits: usize, )

Copy content which ptr points to bitvec storage Highly unsafe

Source

pub unsafe fn set_raw( &mut self, ptr: *mut A::Item, buffer_len: usize, capacity: usize, nbits: usize, )

Directly set storage to ptr Highly unsafe

Source

pub fn set_all_false(&mut self)

Set all items in bitvec to false

Source

pub fn set_all_true(&mut self)

Set all items in bitvec to true

Source

pub fn set_all(&mut self, flag: bool)

Set all items in bitvec to flag

Source

pub fn get(&self, index: usize) -> Option<bool>

Check if index exists in current set.

  • If exists, return Some(true)
  • If index < current.len and element doesn’t exist, return Some(false).
  • If index >= current.len, return None.

Examlpe:

use bitvec_simd::BitVec;

let bitvec : BitVec = (0 .. 15).map(|x| x%3 == 0).into();
assert_eq!(bitvec.get(3), Some(true));
assert_eq!(bitvec.get(5), Some(false));
assert_eq!(bitvec.get(14), Some(false));
assert_eq!(bitvec.get(15), None);
Source

pub fn get_unchecked(&self, index: usize) -> bool

Directly return a bool instead of an Option

  • If exists, return true.
  • If doesn’t exist, return false.
  • If index >= current.len, panic.

Examlpe:

use bitvec_simd::BitVec;

let bitvec : BitVec = (0 .. 15).map(|x| x%3 == 0).into();
assert_eq!(bitvec.get_unchecked(3), true);
assert_eq!(bitvec.get_unchecked(5), false);
assert_eq!(bitvec.get_unchecked(14), false);
Source

pub fn and(self, other: Self) -> Self

Source

pub fn and_cloned(&self, other: &Self) -> Self

Source

pub fn and_inplace(&mut self, other: &Self)

Source

pub fn or(self, other: Self) -> Self

Source

pub fn or_cloned(&self, other: &Self) -> Self

Source

pub fn or_inplace(&mut self, other: &Self)

Source

pub fn xor(self, other: Self) -> Self

Source

pub fn xor_cloned(&self, other: &Self) -> Self

Source

pub fn xor_inplace(&mut self, other: &Self)

Source

pub fn difference(self, other: Self) -> Self

difference operation

A.difference(B) calculates A\B, e.g.

A = [1,2,3], B = [2,4,5]
A\B = [1,3]

also notice that

A.difference(B) | B.difference(A) == A ^ B

Example:

use bitvec_simd::BitVec;

let bitvec: BitVec = (0 .. 5_000).map(|x| x % 2 == 0).into();
let bitvec2 : BitVec = (0 .. 5_000).map(|x| x % 3 == 0).into();
assert_eq!(bitvec.difference_cloned(&bitvec2) | bitvec2.difference_cloned(&bitvec), bitvec.xor_cloned(&bitvec2));
let bitvec3 : BitVec = (0 .. 5_000).map(|x| x % 2 == 0 && x % 3 != 0).into();
assert_eq!(bitvec.difference(bitvec2), bitvec3);
Source

pub fn difference_cloned(&self, other: &Self) -> Self

Source

pub fn inverse(&self) -> Self

inverse every bits in the vector.

If your bitvec have len 1_000 and contains [1,5], after inverse it will contains 0, 2..=4, 6..=999

Source

pub fn count_ones(&self) -> usize

Count the number of elements existing in this bitvec.

Example:

use bitvec_simd::BitVec;

let bitvec: BitVec = (0..10_000).map(|x| x%2==0).into();
assert_eq!(bitvec.count_ones(), 5000);

let bitvec: BitVec = (0..30_000).map(|x| x%3==0).into();
assert_eq!(bitvec.count_ones(), 10_000);
Source

pub fn count_ones_before(&self, index: usize) -> usize

Count the number of elements existing in this bitvec, before the specified index. Panics if index is invalid.

Example:

use bitvec_simd::BitVec;

let bitvec: BitVec = (0..10_000).map(|x| x%2==0).into();
assert_eq!(bitvec.count_ones_before(5000), 2500);

let bitvec: BitVec = (0..30_000).map(|x| x%3==0).into();
assert_eq!(bitvec.count_ones_before(10000), 3334);

let bitvec: BitVec = (0..1).map(|x| true).into();
assert_eq!(bitvec.count_ones_before(0), 0);
assert_eq!(bitvec.count_ones_before(1), 1);

let bitvec: BitVec = (0..10).map(|x| true).into();
for i in 0..10 {
    assert_eq!(bitvec.count_ones_before(i), i);
}

let bitvec: BitVec = (0..10).map(|x| x==0).into();
assert_eq!(bitvec.count_ones_before(0), 0);
for i in 1..10 {
    assert_eq!(bitvec.count_ones_before(i), 1);
}

let bitvec: BitVec = (0..31).map(|x| true).into();
assert_eq!(bitvec.count_ones_before(0), 0);
for i in 1..31 {
    assert_eq!(bitvec.count_ones_before(i), i);
}

let bitvec: BitVec = (0..32).map(|x| true).into();
assert_eq!(bitvec.count_ones_before(0), 0);
for i in 1..32 {
    assert_eq!(bitvec.count_ones_before(i), i);
}
Source

pub fn leading_zeros(&self) -> usize

Count the number of leading zeros in this bitvec.

Example:

use bitvec_simd::BitVec;

let mut bitvec = BitVec::zeros(10);
bitvec.set(3, true);
assert_eq!(bitvec.leading_zeros(), 6);
Source

pub fn any(&self) -> bool

return true if contains at least 1 element

Source

pub fn all(&self) -> bool

return true if contains self.len elements

Source

pub fn none(&self) -> bool

return true if set is empty

Source

pub fn is_empty(&self) -> bool

Return true if set is empty. Totally the same with self.none()

Source

pub fn into_bools(self) -> Vec<bool>

Consume self and generate a Vec<bool> with length == self.len().

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::from_bool_iterator((0..10).map(|i| i % 3 == 0));
let bool_vec = bitvec.into_bools();
assert_eq!(bool_vec, vec![true, false, false, true, false, false, true, false, false, true])
Source

pub fn into_usizes(self) -> Vec<usize>

Consume self and geterate a Vec<usize> which only contains the number exists in this set.

Example:

use bitvec_simd::BitVec;

let bitvec = BitVec::from_bool_iterator((0..10).map(|i| i%3 == 0));
let usize_vec = bitvec.into_usizes();
assert_eq!(usize_vec, vec![0,3,6,9]);

Trait Implementations§

Source§

impl<A, const L: usize> BitAnd<&BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &BitVecSimd<A, L>) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd<&mut BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &mut BitVecSimd<A, L>) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: &mut Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd<BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd<BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAnd for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the & operator.
Source§

fn bitand(self, rhs: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<A, const L: usize> BitAndAssign<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitand_assign(&mut self, rhs: &BitVecSimd<A, L>)

Performs the &= operation. Read more
Source§

impl<A, const L: usize> BitAndAssign<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitand_assign(&mut self, rhs: &mut BitVecSimd<A, L>)

Performs the &= operation. Read more
Source§

impl<A, const L: usize> BitAndAssign for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitand_assign(&mut self, rhs: Self)

Performs the &= operation. Read more
Source§

impl<A, const L: usize> BitOr<&BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &BitVecSimd<A, L>) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr<&mut BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &mut BitVecSimd<A, L>) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: &mut Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr<BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr<BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOr for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the | operator.
Source§

fn bitor(self, rhs: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<A, const L: usize> BitOrAssign<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitor_assign(&mut self, rhs: &BitVecSimd<A, L>)

Performs the |= operation. Read more
Source§

impl<A, const L: usize> BitOrAssign<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitor_assign(&mut self, rhs: &mut BitVecSimd<A, L>)

Performs the |= operation. Read more
Source§

impl<A, const L: usize> BitOrAssign for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitor_assign(&mut self, rhs: Self)

Performs the |= operation. Read more
Source§

impl<A, const L: usize> BitXor<&BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &BitVecSimd<A, L>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor<&mut BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &mut BitVecSimd<A, L>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: &mut Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor<BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor<BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: BitVecSimd<A, L>) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXor for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, rhs: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<A, const L: usize> BitXorAssign<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitxor_assign(&mut self, rhs: &BitVecSimd<A, L>)

Performs the ^= operation. Read more
Source§

impl<A, const L: usize> BitXorAssign<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitxor_assign(&mut self, rhs: &mut BitVecSimd<A, L>)

Performs the ^= operation. Read more
Source§

impl<A, const L: usize> BitXorAssign for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn bitxor_assign(&mut self, rhs: Self)

Performs the ^= operation. Read more
Source§

impl<A, const L: usize> Clone for BitVecSimd<A, L>
where A: Array + Index<usize> + Clone, A::Item: BitBlock<L>,

Source§

fn clone(&self) -> BitVecSimd<A, L>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<A, const L: usize> Debug for BitVecSimd<A, L>
where A: Array + Index<usize> + Debug, A::Item: BitBlock<L>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A, const L: usize> Display for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<A, const L: usize> From<BitVecSimd<A, L>> for Vec<bool>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn from(v: BitVecSimd<A, L>) -> Self

Converts to this type from the input type.
Source§

impl<A, const L: usize> From<BitVecSimd<A, L>> for Vec<usize>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn from(v: BitVecSimd<A, L>) -> Self

Converts to this type from the input type.
Source§

impl<A, I: Iterator<Item = bool>, const L: usize> From<I> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn from(i: I) -> Self

Converts to this type from the input type.
Source§

impl<A, const L: usize> Index<usize> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = bool

The returned type after indexing.
Source§

fn index(&self, index: usize) -> &Self::Output

Performs the indexing (container[index]) operation. Read more
Source§

impl<A, const L: usize> Not for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<A, const L: usize> Not for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<A, const L: usize> Not for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

type Output = BitVecSimd<A, L>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<A, const L: usize> PartialEq<&BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn eq(&self, other: &&Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, const L: usize> PartialEq<&mut BitVecSimd<A, L>> for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn eq(&self, other: &&mut Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, const L: usize> PartialEq<BitVecSimd<A, L>> for &BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn eq(&self, other: &BitVecSimd<A, L>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, const L: usize> PartialEq<BitVecSimd<A, L>> for &mut BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn eq(&self, other: &BitVecSimd<A, L>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A, const L: usize> PartialEq for BitVecSimd<A, L>
where A: Array + Index<usize>, A::Item: BitBlock<L>,

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.

Auto Trait Implementations§

§

impl<A, const L: usize> Freeze for BitVecSimd<A, L>
where <A as Array>::Item: Sized, A: Freeze,

§

impl<A, const L: usize> RefUnwindSafe for BitVecSimd<A, L>

§

impl<A, const L: usize> Send for BitVecSimd<A, L>
where <A as Array>::Item: Sized + Send,

§

impl<A, const L: usize> Sync for BitVecSimd<A, L>
where <A as Array>::Item: Sized, A: Sync,

§

impl<A, const L: usize> Unpin for BitVecSimd<A, L>
where <A as Array>::Item: Sized, A: Unpin,

§

impl<A, const L: usize> UnwindSafe for BitVecSimd<A, L>
where <A as Array>::Item: Sized + RefUnwindSafe, A: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.