@@ -7,6 +7,7 @@ open GraphBLAS.FSharp.Backend.Common
77open Brahma.FSharp
88open GraphBLAS.FSharp .Tests
99open GraphBLAS.FSharp .Tests .Context
10+ open GraphBLAS.FSharp .Backend .Objects .ArraysExtensions
1011
1112module Bitonic =
1213 let logger = Log.create " BitonicSort.Tests"
@@ -32,22 +33,16 @@ module Bitonic =
3233
3334 let rows , cols , vals = Array.unzip3 array
3435
35- use clRows = context.CreateClArray rows
36- use clColumns = context.CreateClArray cols
37- use clValues = context.CreateClArray vals
36+ let clRows = context.CreateClArray rows
37+ let clColumns = context.CreateClArray cols
38+ let clValues = context.CreateClArray vals
3839
3940 let actualRows , actualCols , actualValues =
4041 sort q clRows clColumns clValues
4142
42- let rows = Array.zeroCreate< 'n> clRows.Length
43- let columns = Array.zeroCreate< 'n> clColumns.Length
44- let values = Array.zeroCreate< 'a> clValues.Length
45-
46- q.Post( Msg.CreateToHostMsg( clRows, rows))
47- q.Post( Msg.CreateToHostMsg( clColumns, columns))
48-
49- q.PostAndReply( fun ch -> Msg.CreateToHostMsg( clValues, values, ch))
50- |> ignore
43+ let rows = clRows.ToHostAndFree q
44+ let columns = clColumns.ToHostAndFree q
45+ let values = clValues.ToHostAndFree q
5146
5247 rows, columns, values
5348
@@ -80,7 +75,6 @@ module Bitonic =
8075 testFixtures< float>
8176
8277 testFixtures< float32>
83-
8478 testFixtures< byte>
8579 testFixtures< bool> ]
8680 |> testList " Backend.Common.BitonicSort tests"
0 commit comments