pub struct StreamFlags { /* private fields */ }
Expand description
Bit flags for configuring a CUDA Stream.
Implementations§
Source§impl StreamFlags
impl StreamFlags
Sourcepub const DEFAULT: StreamFlags
pub const DEFAULT: StreamFlags
No flags set.
Sourcepub const NON_BLOCKING: StreamFlags
pub const NON_BLOCKING: StreamFlags
This stream does not synchronize with the NULL stream.
Note that the name is chosen to correspond to CUDA documentation, but is nevertheless misleading. All work within a single stream is ordered and asynchronous regardless of whether this flag is set. All streams in RustaCUDA may execute work concurrently, regardless of the flag. However, for legacy reasons, CUDA has a notion of a NULL stream, which is used as the default when no other stream is provided. Work on other streams may not be executed concurrently with work on the NULL stream unless this flag is set. Since RustaCUDA does not provide access to the NULL stream, this flag has no effect in most circumstances. However, it is recommended to use it anyway, as some other crate in this binary may be using the NULL stream directly.
Sourcepub const fn empty() -> StreamFlags
pub const fn empty() -> StreamFlags
Returns an empty set of flags
Sourcepub const fn all() -> StreamFlags
pub const fn all() -> StreamFlags
Returns the set containing all flags.
Sourcepub fn from_bits(bits: u32) -> Option<StreamFlags>
pub fn from_bits(bits: u32) -> Option<StreamFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
Sourcepub const fn from_bits_truncate(bits: u32) -> StreamFlags
pub const fn from_bits_truncate(bits: u32) -> StreamFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
Sourcepub const unsafe fn from_bits_unchecked(bits: u32) -> StreamFlags
pub const unsafe fn from_bits_unchecked(bits: u32) -> StreamFlags
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Sourcepub const fn intersects(&self, other: StreamFlags) -> bool
pub const fn intersects(&self, other: StreamFlags) -> bool
Returns true
if there are flags common to both self
and other
.
Sourcepub const fn contains(&self, other: StreamFlags) -> bool
pub const fn contains(&self, other: StreamFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
Sourcepub fn insert(&mut self, other: StreamFlags)
pub fn insert(&mut self, other: StreamFlags)
Inserts the specified flags in-place.
Sourcepub fn remove(&mut self, other: StreamFlags)
pub fn remove(&mut self, other: StreamFlags)
Removes the specified flags in-place.
Sourcepub fn toggle(&mut self, other: StreamFlags)
pub fn toggle(&mut self, other: StreamFlags)
Toggles the specified flags in-place.
Sourcepub fn set(&mut self, other: StreamFlags, value: bool)
pub fn set(&mut self, other: StreamFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations§
Source§impl Binary for StreamFlags
impl Binary for StreamFlags
Source§impl BitAnd for StreamFlags
impl BitAnd for StreamFlags
Source§fn bitand(self, other: StreamFlags) -> StreamFlags
fn bitand(self, other: StreamFlags) -> StreamFlags
Returns the intersection between the two sets of flags.
Source§type Output = StreamFlags
type Output = StreamFlags
&
operator.Source§impl BitAndAssign for StreamFlags
impl BitAndAssign for StreamFlags
Source§fn bitand_assign(&mut self, other: StreamFlags)
fn bitand_assign(&mut self, other: StreamFlags)
Disables all flags disabled in the set.
Source§impl BitOr for StreamFlags
impl BitOr for StreamFlags
Source§fn bitor(self, other: StreamFlags) -> StreamFlags
fn bitor(self, other: StreamFlags) -> StreamFlags
Returns the union of the two sets of flags.
Source§type Output = StreamFlags
type Output = StreamFlags
|
operator.Source§impl BitOrAssign for StreamFlags
impl BitOrAssign for StreamFlags
Source§fn bitor_assign(&mut self, other: StreamFlags)
fn bitor_assign(&mut self, other: StreamFlags)
Adds the set of flags.
Source§impl BitXor for StreamFlags
impl BitXor for StreamFlags
Source§fn bitxor(self, other: StreamFlags) -> StreamFlags
fn bitxor(self, other: StreamFlags) -> StreamFlags
Returns the left flags, but with all the right flags toggled.
Source§type Output = StreamFlags
type Output = StreamFlags
^
operator.Source§impl BitXorAssign for StreamFlags
impl BitXorAssign for StreamFlags
Source§fn bitxor_assign(&mut self, other: StreamFlags)
fn bitxor_assign(&mut self, other: StreamFlags)
Toggles the set of flags.
Source§impl Clone for StreamFlags
impl Clone for StreamFlags
Source§fn clone(&self) -> StreamFlags
fn clone(&self) -> StreamFlags
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for StreamFlags
impl Debug for StreamFlags
Source§impl Extend<StreamFlags> for StreamFlags
impl Extend<StreamFlags> for StreamFlags
Source§fn extend<T: IntoIterator<Item = StreamFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = StreamFlags>>(&mut self, iterator: T)
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)Source§impl FromIterator<StreamFlags> for StreamFlags
impl FromIterator<StreamFlags> for StreamFlags
Source§fn from_iter<T: IntoIterator<Item = StreamFlags>>(iterator: T) -> StreamFlags
fn from_iter<T: IntoIterator<Item = StreamFlags>>(iterator: T) -> StreamFlags
Source§impl Hash for StreamFlags
impl Hash for StreamFlags
Source§impl LowerHex for StreamFlags
impl LowerHex for StreamFlags
Source§impl Not for StreamFlags
impl Not for StreamFlags
Source§fn not(self) -> StreamFlags
fn not(self) -> StreamFlags
Returns the complement of this set of flags.
Source§type Output = StreamFlags
type Output = StreamFlags
!
operator.Source§impl Octal for StreamFlags
impl Octal for StreamFlags
Source§impl Ord for StreamFlags
impl Ord for StreamFlags
Source§fn cmp(&self, other: &StreamFlags) -> Ordering
fn cmp(&self, other: &StreamFlags) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for StreamFlags
impl PartialEq for StreamFlags
Source§impl PartialOrd for StreamFlags
impl PartialOrd for StreamFlags
Source§impl Sub for StreamFlags
impl Sub for StreamFlags
Source§fn sub(self, other: StreamFlags) -> StreamFlags
fn sub(self, other: StreamFlags) -> StreamFlags
Returns the set difference of the two sets of flags.
Source§type Output = StreamFlags
type Output = StreamFlags
-
operator.Source§impl SubAssign for StreamFlags
impl SubAssign for StreamFlags
Source§fn sub_assign(&mut self, other: StreamFlags)
fn sub_assign(&mut self, other: StreamFlags)
Disables all flags enabled in the set.