Skip to content

Commit 9de7da5

Browse files
committed
Dispose and FromArray correction in ArraysExnentions
1 parent f12e605 commit 9de7da5

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/GraphBLAS-sharp.Backend/Objects/ArraysExtentions.fs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ module ArraysExtensions =
66

77
type ClArray<'a> with
88
member this.Dispose(q: MailboxProcessor<Msg>) =
9-
q.PostAndReply(fun _ -> Msg.CreateFreeMsg this)
9+
q.Post(Msg.CreateFreeMsg this)
10+
q.PostAndReply(Msg.MsgNotifyMe)
1011

1112
member this.ToHost(q: MailboxProcessor<Msg>) =
1213
let dst = Array.zeroCreate this.Length
@@ -25,6 +26,6 @@ module ArraysExtensions =
2526

2627
member this.ToDevice(context: ClContext) = context.CreateClArray this
2728

28-
static member FromArray(array: 'a [], isZero: 'a -> bool) =
29-
array
30-
|> Array.map (fun v -> if isZero v then None else Some v)
29+
let FromArray (array: 'a [], isZero: 'a -> bool) =
30+
array
31+
|> Array.map (fun v -> if isZero v then None else Some v)

0 commit comments

Comments
 (0)