{"id":"compute.buffer--CreateComputeBufferLayout","name":"CreateComputeBufferLayout","owner":"yeho","package":"compute.buffer","kind":"function","signature":"external CreateComputeBufferLayout(text name, text dtype, int elementBytes, int alignmentBytes, int strideBytes, text ownership, text notes) returns computeBufferLayout","description":"Create compute buffer layout from the supplied values.","context":"Describe compute buffer layouts, ownership, transfers, and validation.","parameters":[{"name":"name","type":"text","description":"Supply name as text."},{"name":"dtype","type":"text","description":"Supply dtype as text."},{"name":"elementBytes","type":"int","description":"Supply element bytes as int."},{"name":"alignmentBytes","type":"int","description":"Supply alignment bytes as int."},{"name":"strideBytes","type":"int","description":"Supply stride bytes as int."},{"name":"ownership","type":"text","description":"Supply ownership as text."},{"name":"notes","type":"text","description":"Supply notes as text."}],"returns":"computeBufferLayout","members":[],"tags":["buffer","compute","compute.buffer","cpu","function","source-example","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/compute/buffer/buffer.yh","line":64,"sha256":"16a6aed3a11a796843cd162a1ccc118898f76191ebe330e1a7f9d8fb67eea5ac"},"status":"source-declared","notes":["Package presence and a declaration do not establish support on every host. Host services need their platform and lifecycle setup."],"examples":[{"id":"usage","title":"Use CreateComputeBufferLayout","description":"A complete small caller. Values are illustrative; check the returned result and package requirements before connecting live resources.","code":"using compute.buffer\n\n// Describe compute buffer layouts, ownership, transfers, and validation.\ntext name = \"Nova\"\ntext dtype = \"int\"\nint elementBytes = 4\nint alignmentBytes = 4\nint strideBytes = 4\ntext ownership = \"host-buffer\"\ntext notes = \"notes\"\ncomputeBufferLayout result = CreateComputeBufferLayout(name, dtype, elementBytes, alignmentBytes, strideBytes, ownership, notes)\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__createcomputebufferlayout\"\nversion = \"0.1.0\"\nlanguageEdition = \"yeho-core-2026.1\"\n\n[app]\nkind = \"headless\"\n\n[[dependencies]]\npackage = \"compute.buffer\"\nversion = \"0.1.0\"\npath = \"../../../yeho/packages/compute/buffer\"\n","tags":["cpu","source-example"],"verification":"type checked","run":"cpu-oracle","sha256":"3b01b77aa71e5ef624a610f7406dde108d02e7fa9cee27c0074513eeed46c0c6","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":[],"url":"https://demonhunterlabs.com/academy/api?item=compute.buffer--CreateComputeBufferLayout","json":"https://demonhunterlabs.com/reference/items/compute.buffer--CreateComputeBufferLayout.json","markdown":"https://demonhunterlabs.com/reference/text/compute.buffer--CreateComputeBufferLayout.md"}
