Skip to content

Commit a96202b

Browse files
committed
Exclude device-side sorting code from coverage
1 parent dc00efa commit a96202b

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

src/CUDAKernels.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ end
135135

136136
## indexing
137137

138+
## COV_EXCL_START
138139
@device_override @inline function KA.__index_Local_Linear(ctx)
139140
return threadIdx().x
140141
end
@@ -191,6 +192,8 @@ end
191192
CUDA._cuprint(args...)
192193
end
193194

195+
## COV_EXCL_STOP
196+
194197
## other
195198

196199
Adapt.adapt_storage(to::KA.ConstAdaptor, a::CuDeviceArray) = Base.Experimental.Const(a)

src/sorting.jl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ using ..CUDA: i32
3838
end
3939

4040

41+
## COV_EXCL_START
4142
# Batch partitioning
4243
"""
4344
Performs in-place cumsum using shared memory. Intended for use with indexes
@@ -118,6 +119,8 @@ function partition_batches_kernel(values::AbstractArray{T}, pivot, lo, hi, parit
118119
return
119120
end
120121

122+
## COV_EXCL_STOP
123+
121124

122125
# Batch consolidation
123126

@@ -140,6 +143,7 @@ function find_partition(array, pivot, lo, hi, parity, lt::F1, by::F2) where {F1,
140143
return low - 1
141144
end
142145

146+
## COV_EXCL_START
143147
"""
144148
This assumes the region of `vals` of length `L` starting after `lo`
145149
has been batch partitioned with respect to `pivot`. Further, it assumes that
@@ -454,6 +458,7 @@ function qsort_kernel(vals::AbstractArray{T,N}, lo, hi, parity, sync::Val{S}, sy
454458

455459
return
456460
end
461+
## COV_EXCL_STOP
457462

458463
function sort_args(args, partial_k::Nothing)
459464
return args
@@ -524,6 +529,7 @@ using ..CUDA
524529
using ..CUDA: i32
525530

526531

532+
## COV_EXCL_START
527533
# General functions
528534

529535
@inline two(::Type{Int}) = 2
@@ -882,7 +888,7 @@ function comparator_small_kernel(vals, length_vals::I, k::I, j_0::I, j_f::I,
882888
finalize_shmem!(slice, swap, index, in_range)
883889
return
884890
end
885-
891+
## COV_EXCL_STOP
886892

887893
# Host side code
888894
function bitonic_shmem(c::AbstractArray{T}, threads) where {T}

0 commit comments

Comments
 (0)