I've been wanting to play around with functional code, and thought what fun it would be to do some interactive real-time ray-tracing of some randomly composed functions. Does anyone know of any compiler or converter that can take code from a functional language (or any language, with high order functions) and convert it into something that can be used in CUDA or OpenCL?
There are several embedded languages in Haskell that target CUDA and/or OpenCL.
The most high level is accelerate, a subset of Haskell for array processing, embedded in Haskell. It works with CUDA.
Conal Elliott has a shader language embedded in Haskell, for graphics programming
There are several embedded languages in Haskell that target CUDA and/or OpenCL.
The most high level is accelerate, a subset of Haskell for array processing, embedded in Haskell. It works with CUDA.
Conal Elliott has a shader language embedded in Haskell, for graphics programming
There are some attempts, such as Obsidian (Haskell) and SaC (Single Assignment C).
More about this and some other attempts are described in this paper: Functional Programming for High-Performance Computing on Heterogeneous Architectures
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With