#3659: two-dimensional PArrays in data parallel code
------------------------------+---------------------------------------------
Reporter: ams | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 6.10.4
Severity: normal | Resolution:
Keywords: | Testcase:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
------------------------------+---------------------------------------------
Changes (by chak):
* cc: [email protected] (added)
Comment:
The function `fromList` doesn't currently work on lists of parallel
arrays. It arguably should, though.
From what you are writing, I am not sure whether you want to work
explicitly with `PArray`s or whether you want to work with `[:t:]` types.
In the former case, you can use `nestUSegdPA` to construct a nested array.
In the latter case, you currently probably have to use a combination of
`singletonP` and `(+:+)` to first create singleton nested arrays from all
your subarrays and then concatenate them.
I notice that you are calling the nested array a ''two-dimensional
array''. If your aim is to have subarrays of the same size and to operate
in a regular manner on the nested array (e.g., implementing ''dense''
matrix operations), you will probably find that the performance isn't
great and the code is a bit awkward. The reason is that the current
system is biased towards nested, irregular arrays. We are currently
working on complementing the existing API with explicit support for
regular, multi-dimensional arrays to address this issue.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3659#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs