{"id":"compute.buffer--computeBufferLayout","name":"computeBufferLayout","owner":"yeho","package":"compute.buffer","kind":"thing","signature":"external thing computeBufferLayout","description":"A compute buffer layout record carrying name, dtype, elementBytes, alignmentBytes, strideBytes, and related state.","context":"Describe compute buffer layouts, ownership, transfers, and validation.","parameters":[],"returns":"void","members":[{"name":"name","kind":"field","type":"text","description":"Stores name as text.","signature":"text name","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"dtype","kind":"field","type":"text","description":"Stores dtype as text.","signature":"text dtype","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"elementBytes","kind":"field","type":"int","description":"Stores element bytes as int.","signature":"int elementBytes","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"alignmentBytes","kind":"field","type":"int","description":"Stores alignment bytes as int.","signature":"int alignmentBytes","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"strideBytes","kind":"field","type":"int","description":"Stores stride bytes as int.","signature":"int strideBytes","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"ownership","kind":"field","type":"text","description":"Stores ownership as text.","signature":"text ownership","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"notes","kind":"field","type":"text","description":"Stores notes as text.","signature":"text notes","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"computeBufferLayout","kind":"constructor","parameters":[{"name":"name","type":"text","description":"Name."},{"name":"dtype","type":"text","description":"Dtype."},{"name":"elementBytes","type":"int","description":"Element bytes."},{"name":"alignmentBytes","type":"int","description":"Alignment bytes."},{"name":"strideBytes","type":"int","description":"Stride bytes."},{"name":"ownership","type":"text","description":"Ownership."},{"name":"notes","type":"text","description":"Notes."}],"returns":"void","signature":"computeBufferLayout(text name, text dtype, int elementBytes, int alignmentBytes, int strideBytes, text ownership, text notes)","description":"Compute buffer layout.","tags":["thing","constructor","compute.buffer"],"updated":"2026-09-09"},{"name":"IsPacked","kind":"method","parameters":[],"returns":"bool","signature":"IsPacked() returns bool","description":"Is packed.","tags":["thing","method","compute.buffer"],"exampleId":"method-IsPacked-8","updated":"2026-09-09"},{"name":"IsAligned","kind":"method","parameters":[],"returns":"bool","signature":"IsAligned() returns bool","description":"Is aligned.","tags":["thing","method","compute.buffer"],"exampleId":"method-IsAligned-9","updated":"2026-09-09"},{"name":"Describe","kind":"method","parameters":[],"returns":"text","signature":"Describe() returns text","description":"Describe.","tags":["thing","method","compute.buffer"],"exampleId":"method-Describe-10","updated":"2026-09-09"}],"tags":["buffer","compute","compute.buffer","cpu","method","source-example","thing","yeho"],"updated":"2026-09-09","source":{"repository":"yeho","path":"packages/compute/buffer/buffer.yh","line":2,"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 computeBufferLayout","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.\ncomputeBufferLayout sample = computeBufferLayout(\"Nova\", \"int\", 4, 4, 4, \"host-buffer\", \"notes\")\nConsole.Log(Text.From(sample.name))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferlayout\"\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":"5282951a9a7c21a5be5ff7a9b68d06fbae4c312a53661c570dc2db5291cee855","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-IsPacked-8","title":"computeBufferLayout.IsPacked","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.buffer\n\n// Is packed.\ncomputeBufferLayout instance = computeBufferLayout(\"Nova\", \"int\", 4, 4, 4, \"host-buffer\", \"notes\")\nbool result = instance.IsPacked()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferlayout\"\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","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"ffbb3e8c84a0e04fd4e55ac229094bfe1140d148d92ee1405f76e615da919f1b","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-IsAligned-9","title":"computeBufferLayout.IsAligned","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.buffer\n\n// Is aligned.\ncomputeBufferLayout instance = computeBufferLayout(\"Nova\", \"int\", 4, 4, 4, \"host-buffer\", \"notes\")\nbool result = instance.IsAligned()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferlayout\"\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","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"d1182ae17435b1247199055aa3bc98af712b219948279fe864439df362f1b078","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-10","title":"computeBufferLayout.Describe","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.buffer\n\n// Describe.\ncomputeBufferLayout instance = computeBufferLayout(\"Nova\", \"int\", 4, 4, 4, \"host-buffer\", \"notes\")\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferlayout\"\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","method","source-example"],"run":"cpu-oracle","verification":"type checked","sha256":"c2510497c137d1eec61df73a1131ea8e1598644694264328956273a86c571ac8","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["name","dtype","elementBytes","alignmentBytes","strideBytes","ownership","notes","computeBufferLayout","IsPacked","IsAligned","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=compute.buffer--computeBufferLayout","json":"https://demonhunterlabs.com/reference/items/compute.buffer--computeBufferLayout.json","markdown":"https://demonhunterlabs.com/reference/text/compute.buffer--computeBufferLayout.md"}
