Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed indexing bug in Permute

  • Loading branch information...
commit f7f994b7602c9b269b2d5177846f31e21436b286 1 parent c2e9812
Ben authored

Showing 1 changed file with 2 additions and 2 deletions. Show diff stats Hide diff stats

  1. +2 2 Data/Array/Accelerate/Repa/Evaluations.hs
4 Data/Array/Accelerate/Repa/Evaluations.hs
@@ -463,12 +463,12 @@ evalPreOpenAcc (Permute f dftAcc p acc) letLevel
463 463 $$ text "| otherwise =" <+> permuteArgsDoc)
464 464
465 465 permuteArgsDoc =
466   - text "let" <+> (text "srcIdx = fromIndex (extent srcArr) idx"
  466 + text "let" <+> (text "(Z:.srcIdx) = fromIndex (extent srcArr) idx"
467 467 $$ text "newArr = fromFunction"
468 468 <+> (text "(extent dftArr)"
469 469 $$ text "(\\sh -> case sh == (perm srcIdx) of"
470 470 $$ nest 1 (text "True -> (dftArr ! (perm srcIdx)) `comb`"
471   - <+> text "(srcArr ! srcIdx)"
  471 + <+> text "(srcArr ! (Z:.srcIdx))"
472 472 $$ text "False -> index dftArr sh)")))
473 473 $$ text "in permute (idx+1) comb newArr perm srcArr"
474 474

0 comments on commit f7f994b

Please sign in to comment.
Something went wrong with that request. Please try again.