{"action":"opened","issue":{"url":"https://api.github.com/repos/HIPERFIT/futhark/issues/107","labels_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/107/labels{/name}","comments_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/107/comments","events_url":"https://api.github.com/repos/HIPERFIT/futhark/issues/107/events","html_url":"https://github.com/HIPERFIT/futhark/issues/107","id":124656068,"number":107,"title":"Do not transpose prior to reduction with commutative operator","user":{"login":"Athas","id":55833,"avatar_url":"https://avatars.githubusercontent.com/u/55833?v=3","gravatar_id":"","url":"https://api.github.com/users/Athas","html_url":"https://github.com/Athas","followers_url":"https://api.github.com/users/Athas/followers","following_url":"https://api.github.com/users/Athas/following{/other_user}","gists_url":"https://api.github.com/users/Athas/gists{/gist_id}","starred_url":"https://api.github.com/users/Athas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Athas/subscriptions","organizations_url":"https://api.github.com/users/Athas/orgs","repos_url":"https://api.github.com/users/Athas/repos","events_url":"https://api.github.com/users/Athas/events{/privacy}","received_events_url":"https://api.github.com/users/Athas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-03T16:04:10Z","updated_at":"2016-01-03T16:04:10Z","closed_at":null,"body":"Currently, we assume that reduction operators are associative, but not necessarily commutative.  We therefore pay a significant runtime cost for moving around the input elements to ensure both original application order whilst retaining coalesced memory accesses.\r\n\r\nThis is not necessary for the (frequent) case where the operator is commutative.  We should let the user annotate reductions that have a commutative operator and exploit this to generate faster code."}}