{"action":"created","issue":{"url":"https://api.github.com/repos/cogciprocate/ocl/issues/48","repository_url":"https://api.github.com/repos/cogciprocate/ocl","labels_url":"https://api.github.com/repos/cogciprocate/ocl/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/cogciprocate/ocl/issues/48/comments","events_url":"https://api.github.com/repos/cogciprocate/ocl/issues/48/events","html_url":"https://github.com/cogciprocate/ocl/issues/48","id":177705342,"number":48,"title":"Null terminators present in Strings","user":{"login":"remexre","id":4196789,"avatar_url":"https://avatars.githubusercontent.com/u/4196789?v=3","gravatar_id":"","url":"https://api.github.com/users/remexre","html_url":"https://github.com/remexre","followers_url":"https://api.github.com/users/remexre/followers","following_url":"https://api.github.com/users/remexre/following{/other_user}","gists_url":"https://api.github.com/users/remexre/gists{/gist_id}","starred_url":"https://api.github.com/users/remexre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remexre/subscriptions","organizations_url":"https://api.github.com/users/remexre/orgs","repos_url":"https://api.github.com/users/remexre/repos","events_url":"https://api.github.com/users/remexre/events{/privacy}","received_events_url":"https://api.github.com/users/remexre/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2016-09-19T05:15:57Z","updated_at":"2016-09-19T06:17:56Z","closed_at":null,"body":"```rust\r\nextern crate ocl;\r\n\r\nuse ocl::*;\r\n\r\nfn main() {\r\n    for platform in Platform::list() {\r\n        println!(\"platform: {:?}\", platform.name());\r\n        for device in Device::list_all(&platform) {\r\n            println!(\"device: {:?}\", device.name());\r\n        }\r\n    }\r\n}\r\n```\r\n\r\ngot\r\n\r\n```sh\r\n$ cargo run\r\n     Running `target/debug/test`\r\nplatform: \"Intel(R) OpenCL\\u{0}\"\r\ndevice: \"Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz\\u{0}\"\r\n```\r\n\r\nexpected\r\n\r\n```sh\r\n$ cargo run\r\n     Running `target/debug/test`\r\nplatform: \"Intel(R) OpenCL\"\r\ndevice: \"Intel(R) Core(TM) i7-5500U CPU @ 2.40GHz\"\r\n```\r\n\r\nIn nine or ten hours I can test this with Nvidia's ICD too, right now I only have my laptop.\r\n\r\n**EDIT**: So at a minimum, the following methods return null terminated strings with Intel's ICD:\r\n\r\n * Platform::name()\r\n * Platform::profile()\r\n * Platform::version()\r\n * Platform::vendor()\r\n * Platform::extensions()\r\n * Device::name()\r\n * Device::vendor()\r\n\r\nThe following methods do not:\r\n\r\n * Platform::into()\r\n * Device::into()\r\n * Device::to_string()\r\n\r\n(test program [here](https://gist.github.com/remexre/d7716a86edd84811f8cc4a801173be15))"},"comment":{"url":"https://api.github.com/repos/cogciprocate/ocl/issues/comments/247917686","html_url":"https://github.com/cogciprocate/ocl/issues/48#issuecomment-247917686","issue_url":"https://api.github.com/repos/cogciprocate/ocl/issues/48","id":247917686,"user":{"login":"remexre","id":4196789,"avatar_url":"https://avatars.githubusercontent.com/u/4196789?v=3","gravatar_id":"","url":"https://api.github.com/users/remexre","html_url":"https://github.com/remexre","followers_url":"https://api.github.com/users/remexre/followers","following_url":"https://api.github.com/users/remexre/following{/other_user}","gists_url":"https://api.github.com/users/remexre/gists{/gist_id}","starred_url":"https://api.github.com/users/remexre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/remexre/subscriptions","organizations_url":"https://api.github.com/users/remexre/orgs","repos_url":"https://api.github.com/users/remexre/repos","events_url":"https://api.github.com/users/remexre/events{/privacy}","received_events_url":"https://api.github.com/users/remexre/received_events","type":"User","site_admin":false},"created_at":"2016-09-19T06:17:56Z","updated_at":"2016-09-19T06:17:56Z","body":"Yeah, not seeing a \"nice\" way to do this... I'll send a PR after sunup or on Tuesday."}}
{"actor":{"display_login":"remexre"}}