Skip to content

buffer.copy

buffer dialect

Copy an exact non-overlapping byte range between buffer roots. Source and target ranges must not overlap; programs may not depend on an overlap-safe target implementation. A zero byte length performs no byte access.

Operation contract

Property Value
Semantic phase executable
Memory effects read source, write target

Signature

Kind Name Type Cardinality Description
Operand source buffer required Buffer root read by the copy.
Operand source_offset offset required Source byte offset.
Operand target buffer required Buffer root written by the copy.
Operand target_offset offset required Target byte offset.
Operand byte_length offset required Number of bytes to copy.

Examples

buffer.copy %source[%source_offset], %target[%target_offset], %byte_length