Skip to content

Commit 733c761

Browse files
committed
small fixes
1 parent 8ea9103 commit 733c761

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

src/algorithms/derivatives/mpo_derivatives.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,9 @@ function (H::PrecomputedDerivative)(x::AbstractTensorMap)
171171

172172

173173
TC = TensorOperations.promote_contract(scalartype(x_fused), scalartype(R_fused))
174-
xR = TensorOperations.tensoralloc_contract(TC, x_fused, ((1,), (2,)), false, R_fused, ((1,), (2, 3)), false, ((1, 2), (3,)), Val(true), H.allocator)
174+
xR = TensorOperations.tensoralloc_contract(
175+
TC, x_fused, ((1,), (2,)), false, R_fused, ((1,), (2, 3)), false, ((1, 2), (3,)), Val(true), H.allocator
176+
)
175177

176178
mul_front!(xR, x_fused, R_fused, One(), Zero(), H.backend, H.allocator)
177179

src/utility/utility.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ end
233233

234234
function mul_front(
235235
A::AbstractTensorMap, B::AbstractTensorMap,
236-
α::Number,
236+
α::Number = One(),
237237
backend::AbstractBackend = DefaultBackend(), allocator = DefaultAllocator()
238238
)
239239
cod = prod(i -> i == 1 ? space(A, 1) : space(B, i), 1:numout(B))
@@ -245,7 +245,7 @@ end
245245

246246
function mul_front!(
247247
C::AbstractTensorMap, A::AbstractTensorMap, B::AbstractTensorMap,
248-
α::Number, β::Number,
248+
α::Number = One(), β::Number = Zero(),
249249
backend::AbstractBackend = DefaultBackend(), allocator = DefaultAllocator()
250250
)
251251
(numin(C) == numin(B) && numout(C) == numout(B) && numin(A) == numout(A) == 1) ||
@@ -281,7 +281,7 @@ end
281281

282282
function mul_tail(
283283
A::AbstractTensorMap, B::AbstractTensorMap,
284-
α::Number,
284+
α::Number = One(),
285285
backend::AbstractBackend = DefaultBackend(), allocator = DefaultAllocator()
286286
)
287287
cod = codomain(A)
@@ -293,7 +293,7 @@ end
293293

294294
function mul_tail!(
295295
C::AbstractTensorMap, A::AbstractTensorMap, B::AbstractTensorMap,
296-
α::Number, β::Number,
296+
α::Number = One(), β::Number = Zero(),
297297
backend::AbstractBackend = DefaultBackend(), allocator = DefaultAllocator()
298298
)
299299
(numin(C) == numin(A) && numout(C) == numout(A) && numin(B) == numout(B) == 1) ||

0 commit comments

Comments
 (0)