Skip to main content
Log in

Mojo struct

Fill

struct Fill

Represents memory fill patterns for GPU memory operations.

This struct defines different fill patterns that can be used when allocating or initializing GPU memory. The patterns control how memory is initialized, which can be important for debugging and performance optimization.

Aliases

  • NONE = Fill(0): No fill pattern - memory is left uninitialized.
  • ZERO = Fill(1): Fill memory with zeros.
  • NAN = Fill(2): Fill memory with NaN values. Useful for debugging floating point computations.

Implemented traits

AnyType, Copyable, ExplicitlyCopyable, Movable, UnknownDestructibility

Methods

__eq__

__eq__(self, other: Self) -> Bool

Tests if two Fill instances have the same fill pattern.

Args:

  • other (Self): The Fill instance to compare against.

Returns:

True if the fill patterns are equal, False otherwise.

__ne__

__ne__(self, other: Self) -> Bool

Tests if two Fill instances have different fill patterns.

Args:

  • other (Self): The Fill instance to compare against.

Returns:

True if the fill patterns are different, False otherwise.

__is__

__is__(self, other: Self) -> Bool

Tests if two Fill instances are identical.

Args:

  • other (Self): The Fill instance to compare against.

Returns:

True if the fill patterns are identical, False otherwise.

__isnot__

__isnot__(self, other: Self) -> Bool

Tests if two Fill instances are not identical.

Args:

  • other (Self): The Fill instance to compare against.

Returns:

True if the fill patterns are not identical, False otherwise.

__str__

__str__(self) -> String

Returns a string representation of the fill pattern.

Converts the fill pattern into a human-readable string for debugging and display purposes.

Returns:

A string describing the fill pattern.