Skip to content

Commit cda3948

Browse files
Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 18668c7 commit cda3948

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/nditeration.jl

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ end
8888
Assume that the condition `cond` is true. This is a hint to the compiler, possibly enabling
8989
it to optimize more aggressively.
9090
"""
91-
@inline assume(cond::Bool) = Base.llvmcall(("""
91+
@inline assume(cond::Bool) = Base.llvmcall(
92+
(
93+
"""
9294
declare void @llvm.assume(i1)
9395
9496
define void @entry(i8) #0 {
@@ -97,9 +99,11 @@ it to optimize more aggressively.
9799
ret void
98100
}
99101
100-
attributes #0 = { alwaysinline }""", "entry"),
101-
Nothing, Tuple{Bool}, cond)
102-
102+
attributes #0 = { alwaysinline }""", "entry",
103+
),
104+
Nothing, Tuple{Bool}, cond
105+
)
106+
return ntuple(Val(ndims(CI))) do I
103107
@inline function assume_nonzero(CI::CartesianIndices)
104108
ntuple(Val(ndims(CI))) do I
105109
Base.@_inline_meta

0 commit comments

Comments
 (0)