From 92a4e9f7c4362e1d2af728c89e6106636c84e08a Mon Sep 17 00:00:00 2001 From: Ivo Gabe de Wolff Date: Wed, 25 Oct 2023 21:56:20 +0200 Subject: [PATCH] Cleanup and fix in schedule construction --- src/Data/Array/Accelerate/AST/Schedule/Uniform.hs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Data/Array/Accelerate/AST/Schedule/Uniform.hs b/src/Data/Array/Accelerate/AST/Schedule/Uniform.hs index f1a187e6d..b2e14ba9a 100644 --- a/src/Data/Array/Accelerate/AST/Schedule/Uniform.hs +++ b/src/Data/Array/Accelerate/AST/Schedule/Uniform.hs @@ -329,8 +329,8 @@ sargVars (a :>: as) = sargVar a : sargVars as sargVars ArgsNil = [] sargOutputVar :: SArg env t -> Maybe (Exists (Idx env)) -sargOutputVar (SArgScalar v) = Nothing -sargOutputVar (SArgBuffer In v) = Nothing +sargOutputVar (SArgScalar _) = Nothing +sargOutputVar (SArgBuffer In _) = Nothing sargOutputVar (SArgBuffer _ v) = Just $ Exists $ varIdx v sargOutputVars :: SArgs env t -> [Exists (Idx env)] @@ -338,12 +338,11 @@ sargOutputVars (a :>: as) = maybe id (:) (sargOutputVar a) $ sargOutputVars as sargOutputVars ArgsNil = [] sargBufferVar :: SArg env t -> Maybe (Exists (Idx env)) -sargBufferVar (SArgScalar v) = Nothing -sargBufferVar (SArgBuffer In v) = Nothing -sargBufferVar (SArgBuffer _ v) = Just $ Exists $ varIdx v +sargBufferVar (SArgScalar _) = Nothing +sargBufferVar (SArgBuffer _ v) = Just $ Exists $ varIdx v sargBufferVars :: SArgs env t -> [Exists (Idx env)] -sargBufferVars (a :>: as) = maybe id (:) (sargOutputVar a) $ sargBufferVars as +sargBufferVars (a :>: as) = maybe id (:) (sargBufferVar a) $ sargBufferVars as sargBufferVars ArgsNil = [] signalResolverImpossible :: GroundsR SignalResolver -> a