futhark-0.22.2: An optimising compiler for a functional, array-oriented language.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Futhark.Optimise.Fusion.TryFusion

Description

Facilities for fusing two SOACs.

When the fusion algorithm decides that it's worth fusing two SOAC statements, this is the module that tries to see if that's possible. May involve massaging either producer or consumer in various ways.

Synopsis

Documentation

data FusedSOAC Source #

A fused SOAC contains a bit of extra information.

Constructors

FusedSOAC 

Fields

Instances

Instances details
Show FusedSOAC Source # 
Instance details

Defined in Futhark.Optimise.Fusion.TryFusion

attemptFusion Source #

Arguments

:: (HasScope SOACS m, MonadFreshNames m) 
=> Names

Outputs of the producer that should still be output by the fusion result (corresponding to "diagonal fusion").

-> [VName]

The outputs of the SOAC.

-> SOAC 
-> FusedSOAC 
-> m (Maybe FusedSOAC) 

Attempt fusing the producer into the consumer.