We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug
Unhandled exception. System.Exception: Program compilation failed: BuildProgramFailure BUILD LOG: <kernel>:17:55: error: passing '__global float' to parameter of incompatible type 'du0' (aka 'struct du0') tuple1 matchValue = matchValueUnitFunc ((du0) { 0 }, leftValues [gid]) ; ^~~~~~~~~~~~~~~~ at Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThenFail@1433.Invoke(String message) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1433 at Microsoft.FSharp.Core.PrintfModule.gprintf[a,TState,TResidue,TResult,TPrinter](FSharpFunc`2 envf, PrintfFormat`4 format) in D:\workspace\_work\1\s\src\fsharp\FSharp.Core\printf.fs:line 1385 at Brahma.FSharp.ClProgram`2..ctor(ClContext ctx, FSharpExpr`1 srcLambda) at Brahma.FSharp.ClContextExtensions.ClContext.Compile[TRange,a](ClContext this, FSharpExpr`1 srcLambda)
To Reproduce
let left (opAdd: Expr<'a option -> 'b option -> 'c option>) = <@ fun (leftItem: 'a) -> (%opAdd) (Some leftItem) None @> let preparePositionsGeneral (leftRead: Expr<'a -> 'c option>) = <@ fun (ndRange: Range1D) (length: int) (leftValues: ClArray<'a>) -> let gid = ndRange.GlobalID0 if gid < length then let a = (%leftRead) leftValues.[gid] () @> let preparePositions opAdd = preparePositionsGeneral (left opAdd) let ctx = ClContext(ClDevice.GetFirstAppropriateDevice()) ctx.Compile(preparePositions StandardOperations.float32Sum) |> printfn "%A"
Workarounds To use following function instead
let left (opAdd: Expr<'a option -> 'b option -> 'c option>) = <@ fun (leftItem: 'a) -> let tmp = Some leftItem (%opAdd) tmp None @>
Additional context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
To Reproduce
Workarounds
To use following function instead
Additional context
The text was updated successfully, but these errors were encountered: