跳到主要内容

Buffer

_class _Buffer(buffer : Buffer)

Represents a buffer that is used to save data on host CPU and Houmo device.

Constructor for the Buffer class.

Methods

__init__Constructor for the Buffer class.
cloneCreates a copy of the current Buffer object.
copy_from_hostCopies data from host memory to the buffer on Houmo device.
copy_to_hostCopies data from the buffer on Houmo device to host memory.
device_idRetrieves the logical device ID of the Houmo device associated with the current Buffer object.
get_sub_bufferRetrieves a sub-buffer that shares the same memory as the original buffer.
memsetInitializes the specified region of the device buffer to a constant byte value.
sizeRetrieves the size of the current Buffer object in bytes.