repa Questions

1

Solved

I am confused about why the REPA function computeP packs its result in a monad. It has the following type signature. computeP :: (Load r1 sh e, Target r2 e, Source r2 e, Monad m) => Array r1 s...
Salop asked 3/1, 2020 at 23:17

2

In my recent work with Gibbs sampling, I've been making great use of the RVar which, in my view, provides a near ideal interface to random number generation. Sadly, I've been unable to make use of ...
Unbridle asked 27/6, 2012 at 16:27

1

Solved

I am trying this REPA library, and i want to process an image in both ways, parallel and sequentially. I can read the image (with other library, DevIL) and process it with computeP (parallel). Her...
Pancreas asked 28/7, 2017 at 21:17

3

Solved

Imagine I want to map a function over an array, but the function has a type not just of a -> b but a -> Int -> b i.e. the function also takes an index. How do I do that?
Ingratiating asked 5/6, 2011 at 10:50

2

In GNU Octave this code - [e, ix] = min(X); will return minimum element and it's location. How do you this in repa for arbitrary binary function? This is what I came up with: min x = z $ foldl...
Fishery asked 26/11, 2012 at 17:51

1

I do not understand why this program using repa: import Data.Array.Repa import Data.Array.Repa.Algorithms.Matrix import Data.Functor.Identity go = runIdentity $ do let mat = fromListUnboxed (ix2...
Subtile asked 13/6, 2016 at 5:40

0

I have coded two implementations of an algorithm to calculate all the eigenvalues and eigenvectors of a symmetric matrix. One implementation uses the REPA library https://github.com/felipeZ/Haske...
Sidran asked 26/3, 2015 at 17:18

1

Solved

Background I am using repa more as a "management" tool. I pass around reactive-bananas AddHandlers in an Array: Array D DIM2 (AddHandler Bool). Currently I am using this kludge: mapMArray :: (Mo...
Chockfull asked 17/9, 2014 at 12:22

0

In Repa, I would like to apply a certain d-dimensional linear transform in parallel across the innermost dimension of my array, i.e., on all "column" vectors. In general, such a transformation can...
Millisent asked 11/6, 2014 at 0:4

2

Solved

Repa and Accelerate API Similarity The Haskell repa library is for automatically parallel array computation on CPUs. The accelerate library is automatic data parallelism on GPUs. The APIs are quit...
Landri asked 21/4, 2014 at 17:13

2

Solved

I'm exploring the Haskell repa library by trying out the multitude of programming examples. I'm aiming to implementation common image processing algorithms using repa. Repa examples There are som...
Solangesolano asked 13/1, 2014 at 18:41

1

The Problem I'm trying to understand how Repa works and I was plaing with a "blur" example code from Repa Examples package. The code uses stencil2 Quasi Quote: [stencil2| 2 4 5 4 2 4 9 12 9 4 ...
Koumis asked 3/11, 2013 at 2:47

1

I have written a simulation of the outer planets of the solar system using the Euler symplectic method and implemented this a) using repa and b) using yarr. yarr seems to perform about x30 quicker...
Coffman asked 7/8, 2013 at 9:37

1

Solved

I recently read the paper on upcoming generalized stream fusion in vector and DPH libraries. It seems to be very interesting development. I am now starting to experiment with DPH (starting with GHC...
Busty asked 9/3, 2013 at 19:5

2

Solved

Documentation says, Sometimes you want to control exactly when in GHC's pipeline the INLINE pragma is switched on. Why should I ever want this? (Except when I also use RULES pragma, in this c...
Flier asked 21/1, 2013 at 20:8

2

Solved

I'm writing a program that generates images, which I would like to bring into a Repa array. I'm currently using the type: data Colour = Colour Double Double Double to represent pixels, and I hav...
Korea asked 14/1, 2013 at 16:34

1

Solved

Two related questions. Is there a reason why there is no mutable (ST monad) implementation of repa arrays? Equivalent to Data.Vector.Mutable but with a shape. Related to this, how is one suppose...
Ultraviolet asked 4/1, 2013 at 10:9

1

Solved

Suppose I want to price a call option using a finite difference method and repa then the following does the job: import Data.Array.Repa as Repa r, sigma, k, t, xMax, deltaX, deltaT :: Double m, n...
Sextain asked 29/12, 2012 at 13:31

1

Solved

I want to achieve something similar to the bounded arrays in the standard array package but using repa arrays. What is the nice and clean way to achieve this? This is what I tried, but there must...
Zygapophysis asked 19/10, 2012 at 12:5

1

Solved

I'm loading an RGB image from disk with JuicyPixels-repa. Unfortunately the Array representation of the image is Array F DIM3 Word8 where the inner dimension is the RGB pixels. That's a bit incompa...
Nimbus asked 8/11, 2012 at 22:15

1

Solved

I have a piece of Haskell code that looks like this: fst . f $ (Z :. i `div` 2) Z and :. are taken from Repa library and are defined like this: data Z = Z deriving (Show, Read, Eq, Ord) infixl ...
Cumae asked 30/10, 2012 at 13:18

2

Is it possible to compute an array which depends on the past value(s) (i.e., lesser indexes), in Repa? Initial part(s) of the array (e.g., a[0]) is given. (Note that I am using C-like notation to i...
Snowy asked 27/6, 2012 at 14:36

2

Solved

To be more specific, I have the following innocuous-looking little Repa 3 program: {-# LANGUAGE QuasiQuotes #-} import Prelude hiding (map, zipWith) import System.Environment (getArgs) import Dat...

2

Solved

I'm using GHC 7.4.1 to try to compile a program that uses Repa. But partway through compilation, I'm running out of memory. With ghc -v, I can see that it's getting stuck in the SpecConstr phase. ...
Rosinweed asked 13/4, 2012 at 18:2

2

Solved

There is a basic monad question in here, unrelated to Repa, plus several Repa-specific questions. I am working on a library using Repa3. I am having trouble getting efficient parallel code. If I m...
Karenkarena asked 15/3, 2012 at 2:56

© 2022 - 2024 — McMap. All rights reserved.