YaccConstructor / Brahma.FSharp

F# quotation to OpenCL translator and respective runtime to utilize GPGPUs in F# applications.
http://yaccconstructor.github.io/Brahma.FSharp
Eclipse Public License 1.0
74 stars 17 forks source link

Identifiers with ' are not interpreted properly #113

Open dpanfilyonok opened 3 years ago

dpanfilyonok commented 3 years ago

Describe the bug

Unhandled exception. System.Exception: Compilation started
:3:7: error: expected identifier or '('
:3:12: warning: missing terminating ' character
Compilation failed

Error code: BuildProgramFailure
   at Brahma.FSharp.OpenCL.Core.getProgramProcessingError@42[a,b](Device[] _devices, a errCode, Program program)
   at Brahma.FSharp.OpenCL.Core.ComputeProvider.CompileQuery[T](ComputeProvider this, FSharpExpr lambda, IEnumerable`1 translatorOptions, FSharpList`1 additionalSources)
   at Brahma.FSharp.OpenCL.Core.ComputeProvider.Compile[TRange,a](ComputeProvider this, FSharpExpr`1 query, FSharpOption`1 _options, FSharpOption`1 translatorOptions, FSharpOption`1 _outCode, FSharpOption`1 kernelName, FSharpOption`1 _additionalSources)

To Reproduce

let kernel =
    <@
        fun (range: _1D) ->
            let mutable mut = range.GlobalID0
            let break' = false

            mut <- 0
    @>

opencl {
    do! RunCommand kernel (fun kernelPrepare -> kernelPrepare <| _1D(10))
}
|> OpenCLEvaluationContext().RunSync

Additional context Version: 2.0.0-alpha6.1 Framework: netcoreapp3.1