Copyright | (c) Alexey Kuleshevich 2016 |
---|---|
License | BSD3 |
Maintainer | Alexey Kuleshevich <lehins@yandex.ru> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
- makeImage :: Array RD cs Double => (Int, Int) -> ((Int, Int) -> Pixel cs Double) -> Image RD cs Double
- fromLists :: Array RD cs e => [[Pixel cs e]] -> Image RD cs e
- readImageY :: FilePath -> IO (Image RD Y Double)
- readImageYA :: FilePath -> IO (Image RD YA Double)
- readImageRGB :: FilePath -> IO (Image RD RGB Double)
- readImageRGBA :: FilePath -> IO (Image RD RGBA Double)
- computeS :: (Array arr cs e, Array RS cs e, Exchangable arr RS) => Image arr cs e -> Image RS cs e
- computeP :: (Array arr cs e, Array RP cs e, Exchangable arr RP) => Image arr cs e -> Image RP cs e
- delay :: (ManifestArray arr cs e, Array RD cs e, Exchangable arr RD) => Image arr cs e -> Image RD cs e
- data RD = RD
- data RS = RS
- data RP = RP
Construction
:: Array RD cs Double | |
=> (Int, Int) | ( |
-> ((Int, Int) -> Pixel cs Double) | A function that takes ( |
-> Image RD cs Double |
Create a delayed representation of an image.
fromLists :: Array RD cs e => [[Pixel cs e]] -> Image RD cs e Source
Construct an image from a nested rectangular shaped list of pixels.
IO
readImageRGBA :: FilePath -> IO (Image RD RGBA Double) Source
Read image in RGB colorspace with Alpha
channel.
Computation
computeS :: (Array arr cs e, Array RS cs e, Exchangable arr RS) => Image arr cs e -> Image RS cs e Source
Computes an image sequentially and ensures that all elements are evaluated.
computeP :: (Array arr cs e, Array RP cs e, Exchangable arr RP) => Image arr cs e -> Image RP cs e Source
Computes an image in parallel and ensures that all elements are evaluated.
delay :: (ManifestArray arr cs e, Array RD cs e, Exchangable arr RD) => Image arr cs e -> Image RD cs e Source
Delays an image, so further operations can be fused together.
Representation
Repa D
elayed Array representation, which allows for fusion of computation.
Show RD Source | |
Exchangable RS RD Source | O(1) - Delays manifest array. |
Exchangable RP RD Source | O(1) - Delays manifest array. |
Exchangable RD RS Source | Computes delayed array sequentially. |
Exchangable RD RP Source | Computes delayed array in parallel. |
Elt RD cs e => Array RD cs e Source | |
data Image RD Source | |
type Elt RD cs e = (ColorSpace cs, Num e, Typeable * e, Elt e, Unbox e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source |
Repa U
nboxed Array representation, which is computed sequentially.
Show RS Source | |
Exchangable VU RS Source | O(1) - Changes to Repa representation. |
Exchangable RS VU Source | O(1) - Changes to Vector representation. |
Exchangable RS RP Source | O(1) - Changes computation strategy. |
Exchangable RS RD Source | O(1) - Delays manifest array. |
Exchangable RP RS Source | O(1) - Changes computation strategy. |
Exchangable RD RS Source | Computes delayed array sequentially. |
ManifestArray RS cs e => MutableArray RS cs e Source | |
ManifestArray RS cs e => SequentialArray RS cs e Source | |
Array RS cs e => ManifestArray RS cs e Source | |
Elt RS cs e => Array RS cs e Source | |
data Image RS = RSImage !(Image RD cs e) Source | |
type Elt RS cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source | |
data MImage st RS cs e = MRSImage !(MImage st VU cs e) Source |
Repa U
nboxed Array representation, which is computed in parallel.
Show RP Source | |
Exchangable VU RP Source | O(1) - Changes to Repa representation. |
Exchangable RS RP Source | O(1) - Changes computation strategy. |
Exchangable RP VU Source | O(1) - Changes to Vector representation. |
Exchangable RP RS Source | O(1) - Changes computation strategy. |
Exchangable RP RD Source | O(1) - Delays manifest array. |
Exchangable RD RP Source | Computes delayed array in parallel. |
Array RP cs e => ManifestArray RP cs e Source | |
Elt RP cs e => Array RP cs e Source | |
data Image RP = RPImage !(Image RD cs e) Source | |
type Elt RP cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source |