legate.core.context.Context.create_store#

Context.create_store(ty: Any, shape: Optional[Union[Shape, tuple[int, ...]]] = None, storage: Optional[Union[RegionField, Future]] = None, optimize_scalar: bool = False, ndim: Optional[int] = None) Store#

Creates a fresh store.

Parameters:
  • ty (Dtype) – Type of the elements

  • shape (Shape or tuple[int], optional) – Shape of the store. The store becomes unbound if no shape is given.

  • storage (RegionField or Future, optional) – Optional storage to initialize the store with. Used only when the store is constructed from a future holding a scalar value.

  • optimize_scalar (bool) – If True, the runtime will use a Future when the store’s size is 1

  • ndim (int, optional) – Dimension of the store. Must be passed if the store is unbound.

Returns:

A new store

Return type:

Store