changeset 1295:87576b0ca0e3 performance/lazy_tensors

Add callsite inline for better type inference
author Vidar Stiernström <vidar.stiernstrom@it.uu.se>
date Wed, 05 Oct 2022 13:15:32 +0200
parents 5b3d4a8ec3ab
children 97dfca9ec054
files src/LazyTensors/lazy_tensor_operations.jl
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/LazyTensors/lazy_tensor_operations.jl	Mon Jul 04 22:55:32 2022 +0200
+++ b/src/LazyTensors/lazy_tensor_operations.jl	Wed Oct 05 13:15:32 2022 +0200
@@ -91,11 +91,11 @@
 domain_size(tm::TensorComposition) = domain_size(tm.t2)
 
 function apply(c::TensorComposition{T,R,K,D}, v::AbstractArray{<:Any,D}, I::Vararg{Any,R}) where {T,R,K,D}
-    apply(c.t1, c.t2*v, I...)
+    apply(c.t1, @inline c.t2*v, I...)
 end
 
 function apply_transpose(c::TensorComposition{T,R,K,D}, v::AbstractArray{<:Any,R}, I::Vararg{Any,D}) where {T,R,K,D}
-    apply_transpose(c.t2, c.t1'*v, I...)
+    apply_transpose(c.t2, @inline c.t1'*v, I...)
 end
 
 """