{"action":"created","issue":{"url":"https://api.github.com/repos/halide/Halide/issues/701","labels_url":"https://api.github.com/repos/halide/Halide/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/halide/Halide/issues/701/comments","events_url":"https://api.github.com/repos/halide/Halide/issues/701/events","html_url":"https://github.com/halide/Halide/pull/701","id":59894315,"number":701,"title":"Javascript backend.","user":{"login":"zvookin","id":1501716,"avatar_url":"https://avatars.githubusercontent.com/u/1501716?v=3","gravatar_id":"","url":"https://api.github.com/users/zvookin","html_url":"https://github.com/zvookin","followers_url":"https://api.github.com/users/zvookin/followers","following_url":"https://api.github.com/users/zvookin/following{/other_user}","gists_url":"https://api.github.com/users/zvookin/gists{/gist_id}","starred_url":"https://api.github.com/users/zvookin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zvookin/subscriptions","organizations_url":"https://api.github.com/users/zvookin/orgs","repos_url":"https://api.github.com/users/zvookin/repos","events_url":"https://api.github.com/users/zvookin/events{/privacy}","received_events_url":"https://api.github.com/users/zvookin/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-05T02:12:52Z","updated_at":"2015-03-24T16:12:50Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/halide/Halide/pulls/701","html_url":"https://github.com/halide/Halide/pull/701","diff_url":"https://github.com/halide/Halide/pull/701.diff","patch_url":"https://github.com/halide/Halide/pull/701.patch"},"body":"This is a not ready for prime time JavaScript codegen module for Halide. I have realize wired up to call V8 in JIT mode so I can run the tests with execution via JavaScript. It is starting to pass tests, but is still a ways away from being correct. (In particular the math functions are not yet codegen'ed and I expect we'll need more casts to ensure correctness. Vectorization is also incomplete.)\r\n\r\nIn order to be particularly useful, this will likely require WebGL, RiverTrail, or SIMD.js support.\r\n\r\nThe design is to use typed arrays for buffer storage. Where Halide uses a struct, a JavaScript object is used with the same named fields. E.g. buffer_t. The runtime is (incompletely) prepended at the top of the file, with checks to see if the routines are already defined. No strong attempt is made to keep the JS code parsimonious. At present vectorization is done by using short JavaScript arrays, often literals, and destructuring and restructuring them to do operations. This is a placeholder for something better based on SIMD.js or RiverTrail. (Vectorization is implemented even though it is not particularly useful at present because it is required to run the tests.)\r\n\r\nDefinitely do not merge this yet..."},"comment":{"url":"https://api.github.com/repos/halide/Halide/issues/comments/85585458","html_url":"https://github.com/halide/Halide/pull/701#issuecomment-85585458","issue_url":"https://api.github.com/repos/halide/Halide/issues/701","id":85585458,"user":{"login":"zvookin","id":1501716,"avatar_url":"https://avatars.githubusercontent.com/u/1501716?v=3","gravatar_id":"","url":"https://api.github.com/users/zvookin","html_url":"https://github.com/zvookin","followers_url":"https://api.github.com/users/zvookin/followers","following_url":"https://api.github.com/users/zvookin/following{/other_user}","gists_url":"https://api.github.com/users/zvookin/gists{/gist_id}","starred_url":"https://api.github.com/users/zvookin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zvookin/subscriptions","organizations_url":"https://api.github.com/users/zvookin/orgs","repos_url":"https://api.github.com/users/zvookin/repos","events_url":"https://api.github.com/users/zvookin/events{/privacy}","received_events_url":"https://api.github.com/users/zvookin/received_events","type":"User","site_admin":false},"created_at":"2015-03-24T16:12:50Z","updated_at":"2015-03-24T16:12:50Z","body":"For those following this, I just pushed significant changes. A fair number of test cases now pass under both V8 and SpiderMonkey. Still not ready to merge however."}}