Questions tagged [marray]

8 questions
13
votes
1 answer

How to properly optimize MArray functions for speed?

I'm working on a sorting library for MArrays. Speed is important, so I want to optimize it as much as possible. Currently, I simply INLINE the sorting functions. This speeds up the code more than 10 times, compared to the non-optimized code. However…
Petr
  • 62,528
  • 13
  • 153
  • 317
10
votes
2 answers

How to create unboxed mutable array instance

let's say I've got the following type : data MyType = Constructor0 | Constructor1 | Constructor2 deriving (Eq,Show,Enum) Is there a way to create one of such instances : MArray (STUArray s) MyType (ST s) MArray IOUarray MyType IO For…
Raoul Supercopter
  • 5,076
  • 1
  • 34
  • 37
6
votes
1 answer

Revisiting Polymorphic STUArrays with Constraint Kinds

I want to implement a dynamic programming algorithm polymorphic in the score type; here's a simplified 1D version with no boundary conditions: {-# LANGUAGE ConstraintKinds, FlexibleContexts, RankNTypes, ScopedTypeVariables #-} import…
Zorn
  • 73
  • 6
5
votes
1 answer

Slicing an IOArray (or MArray in general)

Is there a way how efficiently to construct a slice (a sub-array view) out of an IOArray, or MArray in general? That is, taking the same array, just restricting the bounds. The signature could be (MArray a e m, Ix i) => a i e -> i -> i -> m (a i…
Petr
  • 62,528
  • 13
  • 153
  • 317
3
votes
2 answers

MArray specialization to STArray

I am confused about using the STArray in Haskell with polymorphism. Suppose I have the following setup data SomeData a = Something a thawData :: MArray u a m => SomeData a -> m (u Int a) thawData = {- doesn't matter -} doSomething :: SomeData a ->…
Joseph Victor
  • 819
  • 6
  • 16
1
vote
1 answer

Intel C++ compiler can't handle deep templates?

I have a project in C++ using marray library. For now it compiles and runs quite fine with MinGW g++ 4.7 and msvc2010 on Windows 7 x64 and also with g++ 4.7 on Linux Mint x64. I decided to give a try to Intel C++ compiler v. 12.1.4 for Linux. It was…
Dmitry
  • 3,063
  • 2
  • 22
  • 32
1
vote
1 answer

"Could not deduce (MArray (STUArray s) Int (ST s)) from context ()" when applying runST

I'm in the process of learning haskell and came across this problem: Using Glasgow Haskell Compiler, Version 6.10.4, for Haskell 98, stage 2 booted by GHC version 6.10.1 Common beginning of the file {-# LANGUAGE FlexibleContexts #-} module UPSO…
Christian Klauser
  • 4,416
  • 3
  • 31
  • 42
-1
votes
1 answer

Docusign API with my applicaiton for insession signing process

I want to integrate docusign with my application and its work Like the linked given below. how i will do that where user directed sign the my applicaiton generated documents and return back to my application. "http://loancosample.azurewebsites.net"
Abhi
  • 47
  • 5