@@ -32,7 +32,7 @@ let checkResult
3232
3333let correctnessGenericTest < 'a when 'a : struct >
3434 ( isEqual : 'a -> 'a -> bool )
35- ( ofList : VectorFormat -> int -> ( int * 'a ) list -> ClVector < 'a >)
35+ ( ofList : MailboxProcessor < _ > -> VectorFormat -> ClContext.AllocationFlag -> int -> ( int * 'a ) list -> ClVector < 'a >)
3636 ( toCoo : MailboxProcessor < _ > -> ClVector < 'a > -> ClVector < 'a >)
3737 ( case : OperationCase < VectorFormat >)
3838 ( elements : ( int * 'a ) [])
@@ -54,7 +54,8 @@ let correctnessGenericTest<'a when 'a: struct>
5454
5555 let actualSize = ( Array.max indices) + abs sizeDelta + 1
5656
57- let clActual = ofList case.Format actualSize elements
57+ let clActual =
58+ ofList q case.Format ClContext.CPUInterop actualSize elements
5859
5960 let clCooActual = toCoo q clActual
6061
@@ -78,15 +79,15 @@ let testFixtures (case: OperationCase<VectorFormat>) =
7879 let getCorrectnessTestName datatype =
7980 sprintf " Correctness on %s , %A " datatype case.Format
8081
81- let boolOfList = Vector.ofList context
82+ let boolOfList = Vector.ofList context wgSize
8283
8384 let toCoo = Vector.toSparse context wgSize
8485
8586 case
8687 |> correctnessGenericTest< bool> (=) boolOfList toCoo
8788 |> testPropertyWithConfig config ( getCorrectnessTestName " bool" )
8889
89- let intOfList = Vector.ofList context
90+ let intOfList = Vector.ofList context wgSize
9091
9192 let toCoo = Vector.toSparse context wgSize
9293
@@ -95,15 +96,15 @@ let testFixtures (case: OperationCase<VectorFormat>) =
9596 |> testPropertyWithConfig config ( getCorrectnessTestName " int" )
9697
9798
98- let byteOfList = Vector.ofList context
99+ let byteOfList = Vector.ofList context wgSize
99100
100101 let toCoo = Vector.toSparse context wgSize
101102
102103 case
103104 |> correctnessGenericTest< byte> (=) byteOfList toCoo
104105 |> testPropertyWithConfig config ( getCorrectnessTestName " byte" )
105106
106- let floatOfList = Vector.ofList context
107+ let floatOfList = Vector.ofList context wgSize
107108
108109 let toCoo = Vector.toSparse context wgSize
109110
0 commit comments