Opened 5 years ago

Last modified 4 years ago

#3577 new feature request

Complete support for Data Parallel Haskell

Reported by: rl Owned by: rl
Priority: normal Milestone:
Component: Data Parallel Haskell Version: 6.13
Keywords: Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: Compile-time crash Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

I'm going to open this as a placeholder for all the things the vectoriser can't do yet.

Change History (5)

comment:1 Changed 5 years ago by simonpj

  • Difficulty set to Unknown

See #3555 for one example of incomplete support (closed in favour of this catch-all ticket).

comment:2 Changed 4 years ago by igloo

  • Milestone set to _|_

comment:3 Changed 4 years ago by benl

  • Type of failure set to Compile-time crash

Vectorisation only works for algebraic types.

Example:

pow x 0 = 1
pow x n = x * pow (x - 1)

This doesn't work because we're pattern matching on Int. Rewrite as:

pow x n
   | n == 0    = 1
   | otherwise = x * pow (x - 1)

comment:4 Changed 4 years ago by benl

List range sugar doesn't work

Rewrite this:

facP :: Int -> Int
facP x = productP [: 1 .. x :]

as:

facP :: Int -> Int
facP x = productP (enumFromToP  1 x)

comment:5 Changed 4 years ago by benl

Can't pattern match on values of [::] type.

Rewrite this:

joinEmpty :: [:[:Word8:]:] -> [:[:Word8:]:]
joinEmpty ws
 = case ws of
	[:[::]:]	-> [::]
	_		-> ws

as:

joinEmpty :: [:[:Word8:]:] -> [:[:Word8:]:]
joinEmpty ws 
	| lengthP ws I.== 1 
        && lengthP (ws !: 0) I.== 0
	= [::]
	
	| otherwise
	= ws
Note: See TracTickets for help on using tickets.