Skip to content

Commit 83ab367

Browse files
committed
Small fixes
1 parent b6e13fd commit 83ab367

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/GraphBLAS-sharp.Backend/Common/ClArray.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ module ClArray =
362362

363363
let gid = ndRange.GlobalID0
364364

365-
if gid < length then
365+
if gid < length && not result.Value then
366366
let isExist = (%predicate) vector.[gid]
367367

368368
if isExist then result.Value <- true @>

src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,7 @@ module Bitonic =
257257
int (clContext.ClDevice.LocalMemSize)
258258
/ (sizeof<int> + sizeof<'a>)
259259
)
260+
/ 2
260261

261262
let maxThreadsPerBlock =
262263
min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2)
@@ -476,4 +477,4 @@ module Bitonic =
476477

477478
kernelGlobal.KernelFunc ndRangeGlobal rows values values.Length (localSize * 2)
478479

479-
queue.RunKernel(kernelGlobal)
480+
queue.RunKernel(kernelGlobal)

0 commit comments

Comments
 (0)