Skip to content

node πŸ”—

Interface to the struct vaccel_tf_node C object.

Node πŸ”—

Node(name: str, id_: int)

Bases: CType

Wrapper for the struct vaccel_tf_node C object.

Manages the creation and initialization of a C struct vaccel_tf_node and provides access to it through Python properties.

Inherits

CType: Abstract base class for defining C data types.

Parameters:

Name Type Description Default

name πŸ”—

str

The name to be passed to the C struct.

required

id_ πŸ”—

int

The ID to be passed to the C struct.

required
Source code in vaccel/ops/tf/node.py
def __init__(self, name: str, id_: int):
    """Initializes a new `Node` object.

    Args:
        name: The name to be passed to the C struct.
        id_: The ID to be passed to the C struct.
    """
    self._name = name
    self._id = id_
    self._c_obj_ptr = ffi.NULL
    super().__init__()

c_size property πŸ”—

c_size: int

Returns the size of the object in bytes.

id property πŸ”—

id: int

The node identifier.

Returns:

Type Description
int

The node's ID.

name property πŸ”—

name: str

The node name.

Returns:

Type Description
str

The node's name.

value property πŸ”—

value: CData

Returns the value of the underlying C struct.

Returns:

Type Description
CData

The dereferenced 'struct vaccel_tf_node`