Skip to content

Commit de6ca7a

Browse files
committed
Remove never used default arguments
All defaults removed in this commit are always overridden by the arguments passed in from `accumulate_impl!`. This removes any confusion of where a certain argument would have come from
1 parent e88c427 commit de6ca7a

File tree

3 files changed

+23
-23
lines changed

3 files changed

+23
-23
lines changed

src/accumulate/accumulate_1d_cpu.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ function accumulate_1d!(
22
op, v::AbstractArray, backend::CPU, alg;
33
init,
44
neutral,
5-
inclusive::Bool=true,
5+
inclusive::Bool,
66

77
# CPU settings
8-
max_tasks::Int=Threads.nthreads(),
9-
min_elems::Int=2,
8+
max_tasks::Int,
9+
min_elems::Int,
1010

1111
# GPU settings - not used
12-
block_size::Int=256,
13-
temp::Union{Nothing, AbstractArray}=nothing,
14-
temp_flags::Union{Nothing, AbstractArray}=nothing,
12+
block_size::Int,
13+
temp::Union{Nothing, AbstractArray},
14+
temp_flags::Union{Nothing, AbstractArray},
1515
)
1616
# Trivial case
1717
if length(v) == 0

src/accumulate/accumulate_1d_gpu.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -252,16 +252,16 @@ function accumulate_1d!(
252252
op, v::AbstractArray, backend::GPU, ::DecoupledLookback;
253253
init,
254254
neutral,
255-
inclusive::Bool=true,
255+
inclusive::Bool,
256256

257257
# CPU settings - not used
258-
max_tasks::Int=Threads.nthreads(),
259-
min_elems::Int=1,
258+
max_tasks::Int,
259+
min_elems::Int,
260260

261261
# GPU settings
262-
block_size::Int=256,
263-
temp::Union{Nothing, AbstractArray}=nothing,
264-
temp_flags::Union{Nothing, AbstractArray}=nothing,
262+
block_size::Int,
263+
temp::Union{Nothing, AbstractArray},
264+
temp_flags::Union{Nothing, AbstractArray},
265265
)
266266
# Correctness checks
267267
@argcheck block_size > 0
@@ -311,16 +311,16 @@ function accumulate_1d!(
311311
op, v::AbstractArray, backend::GPU, ::ScanPrefixes;
312312
init,
313313
neutral,
314-
inclusive::Bool=true,
314+
inclusive::Bool,
315315

316316
# CPU settings - not used
317-
max_tasks::Int=Threads.nthreads(),
318-
min_elems::Int=1,
317+
max_tasks::Int,
318+
min_elems::Int,
319319

320320
# GPU settings
321-
block_size::Int=256,
322-
temp::Union{Nothing, AbstractArray}=nothing,
323-
temp_flags::Union{Nothing, AbstractArray}=nothing,
321+
block_size::Int,
322+
temp::Union{Nothing, AbstractArray},
323+
temp_flags::Union{Nothing, AbstractArray},
324324
)
325325
# Correctness checks
326326
@argcheck block_size > 0

src/accumulate/accumulate_nd.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
function accumulate_nd!(
22
op, v::AbstractArray, backend::Backend;
33
init,
4-
neutral=neutral_element(op, eltype(v)),
4+
neutral,
55
dims::Int,
6-
inclusive::Bool=true,
6+
inclusive::Bool,
77

88
# CPU settings
9-
max_tasks::Int=Threads.nthreads(),
10-
min_elems::Int=1,
9+
max_tasks::Int,
10+
min_elems::Int,
1111

1212
# GPU settings
13-
block_size::Int=256,
13+
block_size::Int,
1414
)
1515
# Correctness checks
1616
@argcheck block_size > 0

0 commit comments

Comments
 (0)