{"action":"created","issue":{"url":"https://api.github.com/repos/jamesbowman/swapforth/issues/22","labels_url":"https://api.github.com/repos/jamesbowman/swapforth/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/jamesbowman/swapforth/issues/22/comments","events_url":"https://api.github.com/repos/jamesbowman/swapforth/issues/22/events","html_url":"https://github.com/jamesbowman/swapforth/pull/22","id":124027094,"number":22,"title":"j4a fixes","user":{"login":"RGD2","id":15679000,"avatar_url":"https://avatars.githubusercontent.com/u/15679000?v=3","gravatar_id":"","url":"https://api.github.com/users/RGD2","html_url":"https://github.com/RGD2","followers_url":"https://api.github.com/users/RGD2/followers","following_url":"https://api.github.com/users/RGD2/following{/other_user}","gists_url":"https://api.github.com/users/RGD2/gists{/gist_id}","starred_url":"https://api.github.com/users/RGD2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RGD2/subscriptions","organizations_url":"https://api.github.com/users/RGD2/orgs","repos_url":"https://api.github.com/users/RGD2/repos","events_url":"https://api.github.com/users/RGD2/events{/privacy}","received_events_url":"https://api.github.com/users/RGD2/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-28T07:06:23Z","updated_at":"2016-01-01T10:19:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jamesbowman/swapforth/pulls/22","html_url":"https://github.com/jamesbowman/swapforth/pull/22","diff_url":"https://github.com/jamesbowman/swapforth/pull/22.diff","patch_url":"https://github.com/jamesbowman/swapforth/pull/22.patch"},"body":"\r\nFixes selective reset, adds a mechanism to run a task just once rather than repeatedly. \r\nSee j1a/j4a_multithread_example.fs for usage."},"comment":{"url":"https://api.github.com/repos/jamesbowman/swapforth/issues/comments/168297210","html_url":"https://github.com/jamesbowman/swapforth/pull/22#issuecomment-168297210","issue_url":"https://api.github.com/repos/jamesbowman/swapforth/issues/22","id":168297210,"user":{"login":"RGD2","id":15679000,"avatar_url":"https://avatars.githubusercontent.com/u/15679000?v=3","gravatar_id":"","url":"https://api.github.com/users/RGD2","html_url":"https://github.com/RGD2","followers_url":"https://api.github.com/users/RGD2/followers","following_url":"https://api.github.com/users/RGD2/following{/other_user}","gists_url":"https://api.github.com/users/RGD2/gists{/gist_id}","starred_url":"https://api.github.com/users/RGD2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RGD2/subscriptions","organizations_url":"https://api.github.com/users/RGD2/orgs","repos_url":"https://api.github.com/users/RGD2/repos","events_url":"https://api.github.com/users/RGD2/events{/privacy}","received_events_url":"https://api.github.com/users/RGD2/received_events","type":"User","site_admin":false},"created_at":"2016-01-01T10:19:46Z","updated_at":"2016-01-01T10:19:46Z","body":"There were a few tidy ups as well. \r\n\r\nI pulled the \"benchmark counter\" code which was never actually used, considering a spare thread^h^h^h^h^h^h *slot* could be used to do that if desired, just by incrementing a variable as a wall clock. (changing the naming to \"slot\" helps distinguish what is meant, since this isn't really a four 'core' processor - there's still only one ALU, memory and so forth, but there are four separate stack \"slots\" for different 'threads' to run in, in order to share execution time on the solitary core).\r\n\r\nThe term that AMD uses in GCN is \"wavefront\", for much the same thing. I can't remember which term Cray used. It turns out that the basic idea to switch threads every cycle, and keep N contexts handy - where the pipeline has N stages - is an old (but good!) idea to allow a pipelined processor to reach and maintain full \"theoretical\" bandwidth... since this way there's never a \"pipeline stall\" condition. The same idea occurred independently to me half a decade or so ago during my computer engineering degree, and it's nice to finally see it used. (It's also known as \"fine grain multithreading\")."}}