astx.buffer

astx.buffer

Source: packages/astx/src/astx/buffer.py

title: ASTx low-level buffer AST nodes.
summary: >-
  Provide internal nodes that host compilers can target for the buffer/view
  substrate without defining a user-facing array API.

Classes

BufferOwnerType(OpaqueHandleType)

title: Internal opaque buffer owner handle type.

BufferViewType(AnyType)

title: Internal canonical low-level buffer view descriptor type.
attributes:
  element_type:
    type: astx.DataType | None

BufferViewDescriptor(astx.base.DataType)

title: Internal low-level buffer view descriptor literal.
attributes:
  metadata:
    type: Any
  type_:
    type: BufferViewType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BufferViewIndex(astx.base.DataType)

title: Internal low-level indexed read through a buffer view.
summary: >-
  Reads one scalar element by computing offset_bytes plus the sum of
  index*stride byte offsets over the canonical buffer view descriptor.
attributes:
  base:
    type: astx.AST
  indices:
    type: list[astx.AST]
  type_:
    type: astx.DataType

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BufferViewStore(astx.base.DataType)

title: Internal low-level indexed store through a buffer view.
summary: >-
  Stores one scalar element by computing the canonical descriptor element
  address. This is not a user-facing array mutation API.
attributes:
  base:
    type: astx.AST
  indices:
    type: list[astx.AST]
  value:
    type: astx.AST
  type_:
    type: astx.Int32

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BufferViewWrite(astx.base.DataType)

title: Internal low-level raw byte write through a buffer view.
summary: >-
  Writes one 8-bit integer at offset_bytes + byte_offset. This is not a
  generic typed element store or user-facing array mutation API.
attributes:
  view:
    type: astx.AST
  value:
    type: astx.AST
  byte_offset:
    type: int
  type_:
    type: astx.Int32

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BufferViewRetain(astx.base.DataType)

title: Internal explicit runtime retain for a buffer view owner.
attributes:
  view:
    type: astx.AST
  type_:
    type: astx.Int32

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct

BufferViewRelease(astx.base.DataType)

title: Internal explicit runtime release for a buffer view owner.
attributes:
  view:
    type: astx.AST
  type_:
    type: astx.Int32

Methods

get_struct(self, simplified: bool=False) -> astx.base.ReprStruct
title: Return the structured representation.
parameters:
  simplified:
    type: bool
returns:
  type: astx.base.ReprStruct