IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).

Mojo function

unsafe_fused_view

def unsafe_fused_view[T: UnsafeFusedView](t: T) -> T.FusedViewType

Rebinds a fused trait argument to its access-enabled projected view.

On _Mogg*FusionTensor conformers this is Self.device_type: the same fields with _device_passable and _access_enabled swapped. The host proxy and projected view are byte-identical today, so the rebind is just a bit cast; the comptime assert below is the guard for the day that property stops holding (e.g., NPU).

Parameters:

  • ​T (UnsafeFusedView): The fused trait argument type. Constrained to UnsafeFusedView.

Args:

  • ​t (T): The fused trait argument to rebind.

Returns:

T.FusedViewType: The access-enabled projected view, byte-identical to t.

Was this page helpful?