diff src/LazyTensors/lazy_array.jl @ 1293:c5cf32fab163 refactor/grids

Add call site @inline in LazyFunctionArray to avoid allocations in eval_on on 3D grids
author Jonatan Werpers <jonatan@werpers.com>
date Tue, 07 Mar 2023 10:12:33 +0100
parents 6fd97b5ed3e5
children d7bc11053951
line wrap: on
line diff
--- a/src/LazyTensors/lazy_array.jl	Tue Mar 07 10:11:49 2023 +0100
+++ b/src/LazyTensors/lazy_array.jl	Tue Mar 07 10:12:33 2023 +0100
@@ -36,7 +36,7 @@
 
 function Base.getindex(lfa::LazyFunctionArray{F,T,D}, I::Vararg{Int,D}) where {F,T,D}
     @boundscheck checkbounds(lfa, I...)
-    return @inbounds lfa.f(I...)
+    return @inbounds @inline lfa.f(I...)
 end