Snakepit.ZeroCopy (Snakepit v0.8.7)

View Source

Zero-copy interop helpers for DLPack and Arrow.

Handles create/import lifecycle for zero-copy handles, with copy-based fallbacks when unavailable.

Summary

Types

export_opts()

@type export_opts() :: [
  device: Snakepit.ZeroCopyRef.device(),
  dtype: atom() | String.t(),
  shape: tuple() | list(),
  owner: :elixir | :python
]

Functions

close(ref)

from_arrow(ref, opts \\ [])

from_dlpack(ref, opts \\ [])

to_arrow(term, opts \\ [])

to_dlpack(term, opts \\ [])