Mojo struct
DoubleBuffer
struct DoubleBuffer[dtype: DType]
Implemented traits
AnyType,
Copyable,
ImplicitlyCopyable,
ImplicitlyDestructible,
Movable
Methods
__init__
__init__(out self)
__init__(out self, current: UnsafePointer[Scalar[dtype], MutExternalOrigin], alternate: UnsafePointer[Scalar[dtype], MutExternalOrigin], size: Int)
__init__(out self, *, copy: Self)
current
current(self, ctx: DeviceContext) -> DeviceBuffer[dtype]
Returns:
DeviceBuffer
alternate
alternate(self, ctx: DeviceContext) -> DeviceBuffer[dtype]
Returns:
DeviceBuffer
swap
swap(mut self)
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!