Skip to content

Commit

Permalink
Cleanup and fix in schedule construction
Browse files Browse the repository at this point in the history
  • Loading branch information
ivogabe committed Oct 25, 2023
1 parent aef0aba commit 92a4e9f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Data/Array/Accelerate/AST/Schedule/Uniform.hs
Original file line number Diff line number Diff line change
Expand Up @@ -329,21 +329,20 @@ 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)]
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
Expand Down

0 comments on commit 92a4e9f

Please sign in to comment.