haskell - An array of triplets in repa checked at compile time -
first of all, i'm total newbie in repa , still consider myself beginner in haskell in general.
i need effective array of triplets of doubles. naïve approach [(double, double, double)]
that's not effective. thought use repa supposed effective. however, don't know how should define array of triplets.
i array u dim2 double
, store elements of triplets in second dimension (i.e. first index index of triplet , second index element of triplet). there nothing forces second dimension of size 3.
i need array u dim1 vec3d
that's not possible vec3d
not instance of data.vector.unboxed.base.unbox
.
i may reading documentation wrong, think array u dim1 (double,double,double)
want (why don't try it?). before tell me inefficient:
as far can tell, there no way of introducing
array u sh u
without constraintsshape sh
andunbox u
. therefore,array u sh u
efficient , unboxed.in unbox notice instance
(unbox a, unbox b, unbox c) => unbox (a, b, c)
,unbox (double, double, double)
derivable.
Comments
Post a Comment