diff --git a/accelerate-llvm/src/Data/Array/Accelerate/LLVM/CodeGen/Stencil.hs b/accelerate-llvm/src/Data/Array/Accelerate/LLVM/CodeGen/Stencil.hs index 90b391527..fe6a56b8f 100644 --- a/accelerate-llvm/src/Data/Array/Accelerate/LLVM/CodeGen/Stencil.hs +++ b/accelerate-llvm/src/Data/Array/Accelerate/LLVM/CodeGen/Stencil.hs @@ -70,6 +70,9 @@ stencilAccess sR mbndy arr = -> (Operands sh -> IRExp arch aenv e) -> Operands sh -> IRExp arch aenv stencil + goR (StencilRunit1 _) rf ix + = tup1 <$> rf ix + goR (StencilRunit3 _) rf ix = let (z, i) = unindex ix rf' d = do d' <- A.add numType i (int d) @@ -123,6 +126,13 @@ stencilAccess sR mbndy arr = -- when we recurse on the stencil structure we must manipulate the -- _left-most_ index component -- + goR (StencilRtup1 s1) rf ix = + let shr = stencilShapeR s1 + (i, ix') = uncons shr ix + rf' ds = rf (cons shr i ds) + in + tup1 <$> goR s1 rf' ix' + goR (StencilRtup3 s1 s2 s3) rf ix = let shr = stencilShapeR s1 (i, ix') = uncons shr ix @@ -293,6 +303,9 @@ unindex (OP_Pair sh i) = (sh, i) index :: Operands sh -> Operands Int -> Operands (sh, Int) index sh i = OP_Pair sh i +tup1 :: Operands a -> Operands (Tup1 a) +tup1 a = OP_Pair OP_Unit a + tup3 :: Operands a -> Operands b -> Operands c -> Operands (Tup3 a b c) tup3 a b c = OP_Pair (OP_Pair (OP_Pair OP_Unit a) b) c diff --git a/cabal.project b/cabal.project index 480ab2719..3ce4d1997 100644 --- a/cabal.project +++ b/cabal.project @@ -4,8 +4,8 @@ packages: accelerate-llvm source-repository-package type: git - location: https://github.com/AccelerateHS/accelerate.git - tag: 20cd26291f42b2ea74d4e9750301620f83f98b17 + location: https://github.com/dpvanbalen/accelerate.git + tag: 704cb2548a97143655e713b78c240a479576f96a -- Cabal builds from an sdist, and `accelerate.cabal` references files that -- don't exist on a fresh clone. Cabal 3.8.0.0 will do this automatically. -- XXX: For some reason cabal just stops when the command returns 0? So diff --git a/stack-8.10.yaml b/stack-8.10.yaml index 680fc992d..507617299 100644 --- a/stack-8.10.yaml +++ b/stack-8.10.yaml @@ -10,8 +10,8 @@ packages: - accelerate-llvm-ptx extra-deps: -- github: AccelerateHS/accelerate - commit: 20cd26291f42b2ea74d4e9750301620f83f98b17 +- github: dpvanbalen/accelerate + commit: 704cb2548a97143655e713b78c240a479576f96a - cuda-0.10.2.0 - nvvm-0.10.0.0 diff --git a/stack-8.6.yaml b/stack-8.6.yaml index 7a8c71752..074b64b16 100644 --- a/stack-8.6.yaml +++ b/stack-8.6.yaml @@ -9,8 +9,8 @@ packages: - accelerate-llvm-ptx extra-deps: -- github: AccelerateHS/accelerate - commit: 20cd26291f42b2ea74d4e9750301620f83f98b17 +- github: dpvanbalen/accelerate + commit: 704cb2548a97143655e713b78c240a479576f96a - cuda-0.10.2.0 - formatting-7.1.3 diff --git a/stack-8.8.yaml b/stack-8.8.yaml index 36b4a00b2..de8262a74 100644 --- a/stack-8.8.yaml +++ b/stack-8.8.yaml @@ -9,8 +9,8 @@ packages: - accelerate-llvm-ptx extra-deps: -- github: AccelerateHS/accelerate - commit: 20cd26291f42b2ea74d4e9750301620f83f98b17 +- github: dpvanbalen/accelerate + commit: 704cb2548a97143655e713b78c240a479576f96a - cuda-0.10.2.0 - formatting-7.1.3 diff --git a/stack-9.0.yaml b/stack-9.0.yaml index ee50cc22d..85defc9fe 100644 --- a/stack-9.0.yaml +++ b/stack-9.0.yaml @@ -10,8 +10,8 @@ packages: - accelerate-llvm-ptx extra-deps: -- github: AccelerateHS/accelerate - commit: 20cd26291f42b2ea74d4e9750301620f83f98b17 +- github: dpvanbalen/accelerate + commit: 704cb2548a97143655e713b78c240a479576f96a - github: llvm-hs/llvm-hs commit: 351683ed1c2f6b329e62439d42a158b1d804b846