Skip to content

Commit a6e6608

Browse files
committed
make gpu_sub2ind inline
1 parent a42ee8a commit a6e6608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/broadcast.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ function mapidx{N}(f, A::AbstractAccArray, args::NTuple{N, Any})
175175
gpu_call(mapidx_kernel, A, (f, A, Cuint(length(A)), args...))
176176
end
177177
# Base functions that are sadly not fit for the the GPU yet (they only work for Int64)
178-
@pure function gpu_ind2sub{N, T}(dims::NTuple{N}, ind::T)
178+
@pure @inline function gpu_ind2sub{N, T}(dims::NTuple{N}, ind::T)
179179
_ind2sub(NTuple{N, T}(dims), ind - T(1))
180180
end
181181
@pure @inline _ind2sub{T}(::Tuple{}, ind::T) = (ind + T(1),)

0 commit comments

Comments
 (0)