IRON  1.0
Public Member Functions | Private Member Functions | Static Private Attributes | List of all members
iron.localbuffer.LocalBuffer Class Reference
Inheritance diagram for iron.localbuffer.LocalBuffer:
Inheritance graph
[legend]
Collaboration diagram for iron.localbuffer.LocalBuffer:
Collaboration graph
[legend]

Public Member Functions

def __init__ (self, type[np.ndarray]|None type=None, np.ndarray|None initial_value=None, str|None name=None)
 

Private Member Functions

int __get_index (cls, Tile placement)
 

Static Private Attributes

 __buf_tile_index = defaultdict(int)
 

Detailed Description

A LocalBuffer will generate a BufferOp; it is called a LocalBuffer because it should only
be initialized within a function given to a Worker.
This is used to ensure default names are uniquely given within a design

Constructor & Destructor Documentation

◆ __init__()

def iron.localbuffer.LocalBuffer.__init__ (   self,
type[np.ndarray] | None   type = None,
np.ndarray | None   initial_value = None,
str | None   name = None 
)
Initialize a LocalBuffer. Placement will be set to the current core.

Args:
    type (type[np.ndarray] | None, optional): The tensor type representing the buffer to allocate. Defaults to None.
    initial_value (np.ndarray | None, optional): An initial value of the buffer. The type of this should match the given type. Defaults to None.
    name (str | None, optional): The name of the buffer. If None is given, one will be autogenerated. Defaults to None.

Raises:
    ValueError: Arguments are validated.

Member Function Documentation

◆ __get_index()

int iron.localbuffer.LocalBuffer.__get_index (   cls,
Tile  placement 
)
private

Member Data Documentation

◆ __buf_tile_index

iron.localbuffer.LocalBuffer.__buf_tile_index = defaultdict(int)
staticprivate

The documentation for this class was generated from the following file: