
Back in 2010 I did some work to leverage freeze/thaw fusion in
computer vision pipelines for a project at work. The aim was to speed
up compositional style so that "foo . bar . baz" would be bracketed by
a single thaw/freeze rather than a bracket around each function. The
code lives on in my HOpenCV fork at
https://github.com/acowley/HOpenCV, with the ugly fusing rewrites
all here https://github.com/acowley/HOpenCV/blob/master/src/OpenCV/Core/CVOp.hs.
I briefly spoke about the way this works at the NYHUG a while back.
The relevant part of the video starts about 27 minutes in
https://vimeo.com/77164337.
Anthony
On Fri, Jul 31, 2015 at 11:56 PM, William Yager
Has anyone done any research into fusing operations that involve thawing some data, mutating it, and then freezing it again?
Data.Vector does something similar; it turns vectors into streams, operates on the streams, and then turns them back into vectors. It can fuse these operations by removing intermediate However, I've done a bit of preliminary work on a fusion system that works on operations of the form
runST $ do x' <- thaw x foo x' freeze x'
and yields promising results in some cases. This could be useful for data structures that aren't stream-able, but suffer from lots of unnecessary freezing and unfreezing.
This seems like the sort of thing that someone would have already done, so I wanted to check if anyone knew of any previous work on this.
Cheers, Will
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe