Skip to content

Commit d3a850c

Browse files
committed
Tuple matrix added, not generalized yet
1 parent 792646d commit d3a850c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/GraphBLAS-sharp.Backend/Matrices.fs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,3 +54,17 @@ and COOMatrix<'elem when 'elem: struct> =
5454
q.Post(Msg.CreateFreeMsg<_>(this.Columns))
5555
q.Post(Msg.CreateFreeMsg<_>(this.Rows))
5656
q.PostAndReply(Msg.MsgNotifyMe)
57+
58+
and TupleMatrix<'elem when 'elem: struct> =
59+
{ Context: ClContext
60+
RowIndices: ClArray<int>
61+
ColumnIndices: ClArray<int>
62+
Values: ClArray<'elem> }
63+
64+
interface IDeviceMemObject with
65+
member this.Dispose() =
66+
let q = this.Context.Provider.CommandQueue
67+
q.Post(Msg.CreateFreeMsg<_>(this.RowIndices))
68+
q.Post(Msg.CreateFreeMsg<_>(this.ColumnIndices))
69+
q.Post(Msg.CreateFreeMsg<_>(this.Values))
70+
q.PostAndReply(Msg.MsgNotifyMe)

0 commit comments

Comments
 (0)