{"id":"compute.buffer--computeBufferResource","name":"computeBufferResource","owner":"yeho","package":"compute.buffer","kind":"thing","signature":"external thing computeBufferResource","description":"A compute buffer resource record carrying id, deviceId, memoryClass, sizeBytes, alignmentBytes, and related state.","context":"Describe compute buffer layouts, ownership, transfers, and validation.","parameters":[],"returns":"void","members":[{"name":"id","kind":"field","type":"text","description":"Stores id as text.","signature":"text id","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"deviceId","kind":"field","type":"text","description":"Stores device id as text.","signature":"text deviceId","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"memoryClass","kind":"field","type":"text","description":"Stores memory class as text.","signature":"text memoryClass","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"sizeBytes","kind":"field","type":"int","description":"Stores size bytes as int.","signature":"int sizeBytes","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":"ownsStorage","kind":"field","type":"bool","description":"Stores owns storage as bool.","signature":"bool ownsStorage","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"isMutable","kind":"field","type":"bool","description":"Stores is mutable as bool.","signature":"bool isMutable","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"live","kind":"field","type":"bool","description":"Stores live as bool.","signature":"bool live","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"mapped","kind":"field","type":"bool","description":"Stores mapped as bool.","signature":"bool mapped","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"generation","kind":"field","type":"int","description":"Stores generation as int.","signature":"int generation","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"state","kind":"field","type":"text","description":"Stores state as text.","signature":"text state","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"externalIdentity","kind":"field","type":"text","description":"Stores external identity as text.","signature":"text externalIdentity","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"computeBufferResource","kind":"constructor","parameters":[{"name":"id","type":"text","description":"Id."},{"name":"deviceId","type":"text","description":"Device id."},{"name":"memoryClass","type":"text","description":"Memory class."},{"name":"byteSize","type":"int","description":"Byte size."},{"name":"alignmentBytes","type":"int","description":"Alignment bytes."},{"name":"ownsStorage","type":"bool","description":"Owns storage."},{"name":"isMutable","type":"bool","description":"Is mutable."},{"name":"live","type":"bool","description":"Live."},{"name":"mapped","type":"bool","description":"Mapped."},{"name":"generation","type":"int","description":"Generation."},{"name":"state","type":"text","description":"State."},{"name":"externalIdentity","type":"text","description":"External identity."}],"returns":"void","signature":"computeBufferResource(text id, text deviceId, text memoryClass, int byteSize, int alignmentBytes, bool ownsStorage, bool isMutable, bool live, bool mapped, int generation, text state, text externalIdentity)","description":"Compute buffer resource.","tags":["thing","constructor","compute.buffer"],"updated":"2026-09-09"},{"name":"ValidationIssue","kind":"method","parameters":[],"returns":"text","signature":"ValidationIssue() returns text","description":"Validation issue.","tags":["thing","method","compute.buffer"],"exampleId":"method-ValidationIssue-13","updated":"2026-09-09"},{"name":"ValidationDecision","kind":"method","parameters":[],"returns":"computeResourceDecision","signature":"ValidationDecision() returns computeResourceDecision","description":"Validation decision.","tags":["thing","method","compute.buffer"],"exampleId":"method-ValidationDecision-14","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-15","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/contracts.yh","line":49,"sha256":"4a526796fb83ba031f9fdebfef36dbadc5df2e95f59824d7acec3563ce79c47b"},"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 computeBufferResource","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.\ncomputeBufferResource sample = computeBufferResource(\"id\", \"device Id\", \"memory Class\", 4, 4, true, true, true, true, 1, \"state\", \"external Identity\")\nConsole.Log(Text.From(sample.id))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferresource\"\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":"8158d81c7f2614b07f9d159d335ac628e123c9e5be5db88775bdc095706964ef","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-ValidationIssue-13","title":"computeBufferResource.ValidationIssue","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.buffer\n\n// Validation issue.\ncomputeBufferResource instance = computeBufferResource(\"id\", \"device Id\", \"memory Class\", 4, 4, true, true, true, true, 1, \"state\", \"external Identity\")\ntext result = instance.ValidationIssue()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferresource\"\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":"15a96099ed6af28ba3ff97021124960a9fb2fb37febf101ceccc36908999fa1e","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-ValidationDecision-14","title":"computeBufferResource.ValidationDecision","description":"A complete caller for this public method. Sample inputs are illustrative; native resources require their owning lifecycle.","code":"using compute.buffer\n\n// Validation decision.\ncomputeBufferResource instance = computeBufferResource(\"id\", \"device Id\", \"memory Class\", 4, 4, true, true, true, true, 1, \"state\", \"external Identity\")\ncomputeResourceDecision result = instance.ValidationDecision()\nConsole.Log(\"Inspect result in your debugger\")\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferresource\"\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":"286efdb4be43f412b09651231976a73ad32c058c134e99b25ca065264f67a6c1","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-15","title":"computeBufferResource.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.\ncomputeBufferResource instance = computeBufferResource(\"id\", \"device Id\", \"memory Class\", 4, 4, true, true, true, true, 1, \"state\", \"external Identity\")\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computebufferresource\"\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":"939f16796d348128c4896dc8b6c7747dfdc44da63c9696de183c2e564f189200","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["id","deviceId","memoryClass","sizeBytes","alignmentBytes","ownsStorage","isMutable","live","mapped","generation","state","externalIdentity","computeBufferResource","ValidationIssue","ValidationDecision","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=compute.buffer--computeBufferResource","json":"https://demonhunterlabs.com/reference/items/compute.buffer--computeBufferResource.json","markdown":"https://demonhunterlabs.com/reference/text/compute.buffer--computeBufferResource.md"}
