Skip to main content

Mojo struct

StreamPriorityRange

@register_passable(trivial) struct StreamPriorityRange

Represents the range of valid stream priorities for a GPU device.

Stream priorities control the scheduling of GPU operations, with higher priority streams being executed preferentially over lower priority streams.

Fields

  • least (Int): The lowest (numerically smallest) priority value.
  • greatest (Int): The highest (numerically largest) priority value.

Implemented traits

AnyType, Copyable, ImplicitlyCopyable, Movable, Stringable, UnknownDestructibility, Writable

Aliases

__copyinit__is_trivial

alias __copyinit__is_trivial = True

__del__is_trivial

alias __del__is_trivial = True

__moveinit__is_trivial

alias __moveinit__is_trivial = True

Methods

__str__

__str__(self) -> String

Returns a string representation of the stream priority range.

Returns:

String: A string in the format "StreamPriorityRange(least=X, greatest=Y)".

write_to

write_to(self, mut writer: T)

Writes the stream priority range to the given writer.

Args:

  • writer (T): The writer to output the stream priority range to.

Was this page helpful?