Brahma.FSharp.Examples
Examples of Brahma.FSharp usage.
Brahma.FSharp
Brahma.FSharp is a library for F# quotations to OpenCL translation.
PM> Install-Package Brahma.FSharp
Features of Brahma.FSharp:
- We are aimed to translate native F# code to OpenCL with minimization of different wrappers and custom types.
- We use OpenCL for communication with GPU. So, you can work not only with NVIDIA hardware but with any device, which supports OpenCL (e.g. with AMD devices).
- We support tuples and structures.
- We can use strongly typed kernels from OpenCL code in F#.
Example
This example demonstrates using a function defined in this library. Following function computes the result of the addition of matrix 'mat2' to the matrix 'mat1'
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: |
|
See more examples here
Samples & documentation
Tutorial contains a further explanation of this sample library.
-
API Reference contains automatically generated documentation for all types, modules and functions in the library. This includes additional brief samples on using most of the functions.
Contributing and copyright
The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.
The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.