{"id":"compute.buffer--computeMemoryClassContract","name":"computeMemoryClassContract","owner":"yeho","package":"compute.buffer","kind":"thing","signature":"external thing computeMemoryClassContract","description":"A compute memory class contract record carrying name, canHostAccess, canDeviceAccess, coherent, mappable, 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":"canHostAccess","kind":"field","type":"bool","description":"Stores can host access as bool.","signature":"bool canHostAccess","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"canDeviceAccess","kind":"field","type":"bool","description":"Stores can device access as bool.","signature":"bool canDeviceAccess","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"coherent","kind":"field","type":"bool","description":"Stores coherent as bool.","signature":"bool coherent","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"mappable","kind":"field","type":"bool","description":"Stores mappable as bool.","signature":"bool mappable","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"externallyOwned","kind":"field","type":"bool","description":"Stores externally owned as bool.","signature":"bool externallyOwned","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"currentFakeDeviceSupported","kind":"field","type":"bool","description":"Stores current fake device supported as bool.","signature":"bool currentFakeDeviceSupported","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"visibilityRule","kind":"field","type":"text","description":"Stores visibility rule as text.","signature":"text visibilityRule","tags":["thing","field","compute.buffer"],"updated":"2026-09-09"},{"name":"computeMemoryClassContract","kind":"constructor","parameters":[{"name":"name","type":"text","description":"Name."},{"name":"hostVisible","type":"bool","description":"Host visible."},{"name":"deviceVisible","type":"bool","description":"Device visible."},{"name":"coherent","type":"bool","description":"Coherent."},{"name":"mappable","type":"bool","description":"Mappable."},{"name":"externallyOwned","type":"bool","description":"Externally owned."},{"name":"currentFakeDeviceSupported","type":"bool","description":"Current fake device supported."},{"name":"visibilityRule","type":"text","description":"Visibility rule."}],"returns":"void","signature":"computeMemoryClassContract(text name, bool hostVisible, bool deviceVisible, bool coherent, bool mappable, bool externallyOwned, bool currentFakeDeviceSupported, text visibilityRule)","description":"Compute memory class contract.","tags":["thing","constructor","compute.buffer"],"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-9","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":1,"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 computeMemoryClassContract","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.\ncomputeMemoryClassContract sample = computeMemoryClassContract(\"Nova\", true, true, true, true, true, true, \"visibility Rule\")\nConsole.Log(Text.From(sample.name))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computememoryclasscontract\"\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":"09c60aede735961b6a3d9f8214f5fa9364c714aab0e2b0dc44b8ac5d2dfdf98e","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null},{"id":"method-Describe-9","title":"computeMemoryClassContract.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.\ncomputeMemoryClassContract instance = computeMemoryClassContract(\"Nova\", true, true, true, true, true, true, \"visibility Rule\")\ntext result = instance.Describe()\nConsole.Log(Text.From(result))\n","manifest":"manifestVersion = \"2\"\npackage = \"api.example.compute_buffer__computememoryclasscontract\"\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":"c05dbc25b44dcf69d5133b3bcad562373279bd958238d0af9037729f8c339858","checked":"2026-09-09","diagnostic":"","observedOutput":null,"checkedBackend":null}],"searchTerms":["name","canHostAccess","canDeviceAccess","coherent","mappable","externallyOwned","currentFakeDeviceSupported","visibilityRule","computeMemoryClassContract","Describe"],"url":"https://demonhunterlabs.com/academy/api?item=compute.buffer--computeMemoryClassContract","json":"https://demonhunterlabs.com/reference/items/compute.buffer--computeMemoryClassContract.json","markdown":"https://demonhunterlabs.com/reference/text/compute.buffer--computeMemoryClassContract.md"}
