compute.buffer · function ·
CreateComputeBufferView
Create compute buffer view from the supplied values.
Describe compute buffer layouts, ownership, transfers, and validation.
external CreateComputeBufferView(text id, computeBufferResource source, int byteOffset, int byteLength, bool isMutable, bool uniqueNonOverlapping) returns computeBufferViewContractStatus: source-declared
Parameters
text id- Supply id as text.
computeBufferResource source- Supply source as computeBufferResource.
int byteOffset- Supply byte offset as int.
int byteLength- Supply byte length as int.
bool isMutable- Supply is mutable as bool.
bool uniqueNonOverlapping- Supply unique non overlapping as bool.
Use CreateComputeBufferView
A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.
cpu · source-example · type checked
using compute.buffer
// Describe compute buffer layouts, ownership, transfers, and validation.
text id = "id"
computeBufferResource source = computeBufferResource("id", "device Id", "memory Class", 4, 4, true, true, true, true, 1, "state", "external Identity")
int byteOffset = 1
int byteLength = 1
bool isMutable = true
bool uniqueNonOverlapping = true
computeBufferViewContract result = CreateComputeBufferView(id, source, byteOffset, byteLength, isMutable, uniqueNonOverlapping)
Console.Log("Inspect result in your debugger")
project.mech
manifestVersion = "2"
package = "api.example.compute_buffer__createcomputebufferview"
version = "0.1.0"
languageEdition = "yeho-core-2026.1"
[app]
kind = "headless"
[[dependencies]]
package = "compute.buffer"
version = "0.1.0"
path = "../../../yeho/packages/compute/buffer"
Notes and source
Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup.
yeho/packages/compute/buffer/contracts.yh:224