Skip to content

Commit 626cb72

Browse files
Format code (#153)
Co-authored-by: mofeing <[email protected]>
1 parent 53c1411 commit 626cb72

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/ConcreteRArray.jl

+9-9
Original file line numberDiff line numberDiff line change
@@ -145,21 +145,21 @@ function Base.getindex(a::ConcreteRArray{T}, args::Vararg{Int,N}) where {T,N}
145145
end
146146
end
147147
if !getindex_warned[]
148-
@warn(
149-
"""Performing scalar get-indexing on task $(current_task()).
150-
Invocation resulted in scalar indexing of a ConcreteRArray.
151-
This is typically caused by calling an iterating implementation of a method.
152-
Such implementations *do not* execute on device, but very slowly on the CPU,
153-
and require expensive copies and synchronization each time and therefore should be avoided."""
154-
)
155-
getindex_warned[] = true
148+
@warn(
149+
"""Performing scalar get-indexing on task $(current_task()).
150+
Invocation resulted in scalar indexing of a ConcreteRArray.
151+
This is typically caused by calling an iterating implementation of a method.
152+
Such implementations *do not* execute on device, but very slowly on the CPU,
153+
and require expensive copies and synchronization each time and therefore should be avoided."""
154+
)
155+
getindex_warned[] = true
156156
end
157157
return convert(Array, a)[args...]
158158
end
159159

160160
function mysetindex!(a, v, args::Vararg{Int,N}) where {N}
161161
Base.setindex!(a, v, args...)
162-
nothing
162+
return nothing
163163
end
164164

165165
const setindex_warned = Ref(false)

0 commit comments

Comments
 (0)