Brahma.FSharp 2.0.0-alpha9.5

This is a prerelease version of Brahma.FSharp.
There is a newer version of this package available.
See the version list below for details.
dotnet add package Brahma.FSharp --version 2.0.0-alpha9.5                
NuGet\Install-Package Brahma.FSharp -Version 2.0.0-alpha9.5                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Brahma.FSharp" Version="2.0.0-alpha9.5" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Brahma.FSharp --version 2.0.0-alpha9.5                
#r "nuget: Brahma.FSharp, 2.0.0-alpha9.5"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Brahma.FSharp as a Cake Addin
#addin nuget:?package=Brahma.FSharp&version=2.0.0-alpha9.5&prerelease

// Install Brahma.FSharp as a Cake Tool
#tool nuget:?package=Brahma.FSharp&version=2.0.0-alpha9.5&prerelease                

Brahma.FSharp

FAKE Build NuGet Badge NuGet Badge License

Brahma.FSharp provides a way to utilize GPGPUs in your F# programms. It is based on F# quotations to OpenCL translation.

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 cards but with any device, which support OpenCL (e.g. with AMD ot Intel devices).

More detailes are available here. Examples of usage are available here.


Developing

Make sure the following requirements are installed on your system:

or


Environment Variables

  • CONFIGURATION will set the configuration of the dotnet commands. If not set, it will default to Release.
    • CONFIGURATION=Debug ./build.sh will result in -c additions to commands such as in dotnet build -c Debug
  • GITHUB_TOKEN will be used to upload release notes and Nuget packages to GitHub.
    • Be sure to set this before releasing
  • DISABLE_COVERAGE Will disable running code coverage metrics. AltCover can have severe performance degradation so it's worth disabling when looking to do a quicker feedback loop.
    • DISABLE_COVERAGE=1 ./build.sh

Building

> build.cmd <optional buildtarget> // on windows
$ ./build.sh  <optional buildtarget>// on unix

The bin of your library should look similar to:

$ tree src/MyCoolNewLib/bin/
src/MyCoolNewLib/bin/
└── Debug
    ├── net461
    │   ├── FSharp.Core.dll
    │   ├── MyCoolNewLib.dll
    │   ├── MyCoolNewLib.pdb
    │   ├── MyCoolNewLib.xml
    └── netstandard2.1
        ├── MyCoolNewLib.deps.json
        ├── MyCoolNewLib.dll
        ├── MyCoolNewLib.pdb
        └── MyCoolNewLib.xml


Build Targets

  • Clean - Cleans artifact and temp directories.
  • DotnetRestore - Runs dotnet restore on the solution file.
  • DotnetBuild - Runs dotnet build on the solution file.
  • DotnetTest - Runs dotnet test on the solution file.
  • GenerateCoverageReport - Code coverage is run during DotnetTest and this generates a report via ReportGenerator.
  • WatchTests - Runs dotnet watch with the test projects. Useful for rapid feedback loops.
  • GenerateAssemblyInfo - Generates AssemblyInfo for libraries.
  • DotnetPack - Runs dotnet pack. This includes running Source Link.
  • SourceLinkTest - Runs a Source Link test tool to verify Source Links were properly generated.
  • PublishToNuGet - Publishes the NuGet packages generated in DotnetPack to NuGet via paket push.
  • GitRelease - Creates a commit message with the Release Notes and a git tag via the version in the Release Notes.
  • GitHubRelease - Publishes a GitHub Release with the Release Notes and any NuGet packages.
  • FormatCode - Runs Fantomas on the solution file.
  • BuildDocs - Generates Documentation from docsSrc and the XML Documentation Comments from your libraries in src.
  • WatchDocs - Generates documentation and starts a webserver locally. It will rebuild and hot reload if it detects any changes made to docsSrc files, libraries in src, or the docsTool itself.
  • ReleaseDocs - Will stage, commit, and push docs generated in the BuildDocs target.
  • Release - Task that runs all release type tasks such as PublishToNuGet, GitRelease, ReleaseDocs, and GitHubRelease. Make sure to read Releasing to setup your environment correctly for releases.

Releasing

git add .
git commit -m "Scaffold"
git remote add origin https://github.com/user/MyCoolNewLib.git
git push -u origin master
  • Create your NuGeT API key

    paket config add-token "https://www.nuget.org" 4003d786-cc37-4004-bfdf-c4f3e8ef9b3a
    
    • or set the environment variable NUGET_TOKEN to your key
  • Create a GitHub OAuth Token

    • You can then set the environment variable GITHUB_TOKEN to upload release notes and artifacts to github
    • Otherwise it will fallback to username/password
  • Then update the CHANGELOG.md with an "Unreleased" section containing release notes for this version, in KeepAChangelog format.

NOTE: Its highly recommend to add a link to the Pull Request next to the release note that it affects. The reason for this is when the RELEASE target is run, it will add these new notes into the body of git commit. GitHub will notice the links and will update the Pull Request with what commit referenced it saying "added a commit that referenced this pull request". Since the build script automates the commit message, it will say "Bump Version to x.y.z". The benefit of this is when users goto a Pull Request, it will be clear when and which version those code changes released. Also when reading the CHANGELOG, if someone is curious about how or why those changes were made, they can easily discover the work and discussions.

Here's an example of adding an "Unreleased" section to a CHANGELOG.md with a 0.1.0 section already released.

## [Unreleased]

### Added
- Does cool stuff!

### Fixed
- Fixes that silly oversight

## [0.1.0] - 2017-03-17
First release

### Added
- This release already has lots of features

[Unreleased]: https://github.com/user/MyCoolNewLib.git/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/user/MyCoolNewLib.git/releases/tag/v0.1.0
  • You can then use the Release target, specifying the version number either in the RELEASE_VERSION environment variable, or else as a parameter after the target name. This will:
    • update CHANGELOG.md, moving changes from the Unreleased section into a new 0.2.0 section
      • if there were any prerelease versions of 0.2.0 in the changelog, it will also collect their changes into the final 0.2.0 entry
    • make a commit bumping the version: Bump version to 0.2.0 and adds the new changelog section to the commit's body
    • publish the package to NuGet
    • push a git tag
    • create a GitHub release for that git tag

macOS/Linux Parameter:

./build.sh Release 0.2.0

macOS/Linux Environment Variable:

RELEASE_VERSION=0.2.0 ./build.sh Release
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on Brahma.FSharp:

Package Downloads
Brahman.Substrings

Brahman is a set of snippets, algorithms and solution for end users based on Brahma.FSharp. Brahman.Substrings is a library for substrings matching."

Brahma.FSharp.OpenCL.WorkflowBuilder

Brahma.FSharp does the thing!

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.0-alpha1.5 181 4/17/2024
3.0.0-alpha1.3 70 4/12/2024
3.0.0-alpha1.2 58 4/12/2024
3.0.0-alpha1.1 64 4/9/2024
2.0.5 2,096 2/10/2023
2.0.4 366 1/13/2023
2.0.3 527 1/4/2023
2.0.2 313 12/28/2022
2.0.1 3,181 8/5/2022
2.0.0 485 7/5/2022
2.0.0-alpha9.6 203 6/3/2022
2.0.0-alpha9.5 157 5/7/2022
2.0.0-alpha9.4 155 4/8/2022
2.0.0-alpha9.3 148 3/24/2022
2.0.0-alpha9.2 1,358 11/26/2021
2.0.0-alpha9.1 326 10/16/2021
2.0.0-alpha9 257 10/15/2021
2.0.0-alpha8 261 9/27/2021
2.0.0-alpha7.1 188 7/18/2021
2.0.0-alpha7 326 5/19/2021
2.0.0-alpha6.2 234 5/19/2021
2.0.0-alpha6.1 280 3/22/2021
2.0.0-alpha6 252 3/22/2021
2.0.0-alpha5 416 1/27/2021
2.0.0-alpha4 386 12/27/2020
2.0.0-alpha3 347 11/27/2020
2.0.0-alpha2 374 11/11/2020
1.1.5 1,558 11/10/2017
1.1.4 996 11/2/2017
1.1.3 1,104 7/16/2017
1.1.2 1,085 7/5/2017
1.1.1 1,058 7/5/2017
1.1.0 1,057 6/21/2017
1.1.0-alpha4 826 5/30/2017
1.1.0-alpha3 895 5/9/2017
1.1.0-alpha2 819 5/9/2017
1.1.0-alpha1 949 5/6/2017
1.0.1 1,893 7/15/2016
1.0.0 1,244 7/14/2016
0.3.5 1,936 6/27/2014
0.3.0.1 1,228 6/18/2014
0.2.4 2,193 3/28/2014
0.2.3 1,325 3/14/2014
0.2.2 1,315 3/11/2014
0.2.0 2,784 12/2/2013
0.1.4992 1,345 9/2/2013
0.1.4989 1,300 8/30/2013
0.1.4926 2,306 6/28/2013
0.0.0.3 1,440 6/28/2013
0.0.0.2 1,408 5/31/2013
0.0.0.1 1,365 5/30/2013

## [2.0.0-alpha9.5] - 2022-05-07

[2.0.0-alpha9.5]: https://github.com/YaccConstructor/Brahma.FSharp/compare/v1.1.5...v2.0.0-alpha9.5

### Added
- New abstraction for OpenCL device
- Getting workGroupSize inside kernels

### Fixed
- Pointers to private variables are explicitly private
- Performance of blittable types
- Performance of kernels creation