Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

store comonad as Delay array #5

Open
cartazio opened this issue May 25, 2014 · 6 comments
Open

store comonad as Delay array #5

cartazio opened this issue May 25, 2014 · 6 comments

Comments

@cartazio
Copy link
Member

this idea intrigues me :)

@dorchard
Copy link

They are good for doing stencils (e.g., solving partial differentials) - and you can have a store comonad (for a delayed array) and an a comonad over an actual array with a comonad morphism to map between the two.

@cartazio
Copy link
Member Author

@dorchard it also seems like the only sane machinery for supporting any form of array fusion that can be easily split to run in parallel (afaik). Or am I missing something in that idea

This won't be in the alpha version, but noting it for myself for the next release in another month or two thereafter

@cartazio
Copy link
Member Author

@dorchard btw, you should lurk on #numerical-haskell on freenode :)

@cartazio
Copy link
Member Author

@dorchard any good reading on the pde use case?

@cartazio
Copy link
Member Author

I thought about this more, and the PDE example only seems to make sense if the mesh/grid is rectangular (or a multidimensional version thereof). Is there a decent way of reformulating it that doesn't turn into a dynamic "graph neighbor" calculation? (Not that theres any problem with that :) )

@dorchard
Copy link

Re parallel/fusion: yes I think the work on Repa provides some nice performance here.
Re the PDE example: I'm thinking mostly the kind of 'laplace' like operations: (I discuss this in http://www.cl.cam.ac.uk/~dao29/drafts/codo-notation-orchard-ifl12.pdf). <- This was in the rectangular case. I suppose something like a triangular mesh (if regular) is not that hard to do (if you have an indexing scheme). Anything 'unstructured' needs more of a dynamic approach (as you say) although providing a 'neighbour' function for the comonad makes sense here and can be iterated to get neighbours of neighbours etc. I discussed this a bit in my thesis (described in terms of coalgebras): (p.160, Section 7.4.1, http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-854.pdf)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants