legate.core.PhysicalStore.create_output_buffer#
- PhysicalStore.create_output_buffer(
- self,
- shape,
- bool bind=True,
Create a buffer for the store to potentially bind to later on. The store must be unbound. The created buffer will have the same type as the store itself.
Passing
bind=False
may be useful when creating multiple temporary buffers and choosing later which one to bind to the store. Buffers created this way can be bound to any unbound store in the task. In other words, a store doesn’t need to create the buffer that it later binds to, the buffer can be created by some other store.The returned buffer is “local” to the task, and its lifetime is bound to that of the task. When the task ends, the buffer is also destroyed.
For this reason, the returned object should only be used for temporary scratch-space inside a task body or for later binding to a store.
- Parameters:
- Returns:
The created buffer.
- Return type: