changeset 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 6753b210d0ab
children 0713175a5743
files src/LazyTensors/lazy_array.jl
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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