Skip to content

Commit 5272321

Browse files
committed
[PTX] Oops I forgot the parentheses
1 parent 3192299 commit 5272321

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

src/stats/ptx.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ function cmp_ptx_type(a::AbstractString, b::AbstractString)
232232
# `isless` for pretty sorting a list of PTX types.
233233
# We only consider fundamental PTX types, which simplifies things a lot.
234234
# See https://docs.nvidia.com/cuda/parallel-thread-execution/index.html?highlight=global#fundamental-types
235-
isempty(a) || isempty(b) && return a < b
235+
(isempty(a) || isempty(b)) && return a < b
236236

237237
# Hardcoded ordering, for simplicity
238238
type_order = ('p' #= pred =#, 'b', 'u', 's', 'f')

test/stats.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ import CodeDiffs.Stats as CDS
4646
@test !CDS.cmp_ptx_type("u128", "u64") && CDS.cmp_ptx_type("u64", "u128")
4747
@test !CDS.cmp_ptx_type("u8", "u8")
4848
@test !CDS.cmp_ptx_type("", "")
49+
@test !CDS.cmp_ptx_type("u8", "") && CDS.cmp_ptx_type("", "u8")
4950
end
5051

5152

0 commit comments

Comments
 (0)