Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgarbar committed Jun 1, 2024
1 parent b6e13fd commit 83ab367
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/GraphBLAS-sharp.Backend/Common/ClArray.fs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ module ClArray =

let gid = ndRange.GlobalID0

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

if isExist then result.Value <- true @>
Expand Down
3 changes: 2 additions & 1 deletion src/GraphBLAS-sharp.Backend/Common/Sort/Bitonic.fs
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ module Bitonic =
int (clContext.ClDevice.LocalMemSize)
/ (sizeof<int> + sizeof<'a>)
)
/ 2

let maxThreadsPerBlock =
min (clContext.ClDevice.MaxWorkGroupSize) (localSize / 2)
Expand Down Expand Up @@ -476,4 +477,4 @@ module Bitonic =

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

queue.RunKernel(kernelGlobal)
queue.RunKernel(kernelGlobal)

0 comments on commit 83ab367

Please sign in to comment.