Skip to content

Commit 381d813

Browse files
committed
eltype -> scalartype
1 parent 7442d78 commit 381d813

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/tensors/tensoroperations.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ end
377377

378378
function _contract_memcost(dimA, dimB, dimC, C, A, pA, B, pB, pAB)
379379
ipAB = TO.oindABinC(pAB, pA, pB)
380-
return dimA * (!TO.isblascontractable(A, pA) || eltype(A) !== eltype(C)) +
381-
dimB * (!TO.isblascontractable(B, pB) || eltype(B) !== eltype(C)) +
380+
return dimA * (!TO.isblascontractable(A, pA) || scalartype(A) !== scalartype(C)) +
381+
dimB * (!TO.isblascontractable(B, pB) || scalartype(B) !== scalartype(C)) +
382382
dimC * !TO.isblasdestination(C, ipAB)
383383
end
384384

@@ -389,16 +389,16 @@ function TO.contract_memcost(
389389
pAB::Index2Tuple
390390
)
391391
ipAB = TO.oindABinC(pAB, pA, pB)
392-
return dim(A) * (!TO.isblascontractable(A, pA) || eltype(A) !== eltype(C)) +
393-
dim(B) * (!TO.isblascontractable(B, pB) || eltype(B) !== eltype(C)) +
392+
return dim(A) * (!TO.isblascontractable(A, pA) || scalartype(A) !== scalartype(C)) +
393+
dim(B) * (!TO.isblascontractable(B, pB) || scalartype(B) !== scalartype(C)) +
394394
dim(C) * !TO.isblasdestination(C, ipAB)
395395
end
396396

397397
function TO.isblascontractable(A::AbstractTensorMap, pA::Index2Tuple)
398-
return eltype(A) <: LinearAlgebra.BlasFloat && has_shared_permute(A, pA)
398+
return scalartype(A) <: LinearAlgebra.BlasFloat && has_shared_permute(A, pA)
399399
end
400400
function TO.isblasdestination(A::AbstractTensorMap, ipAB::Index2Tuple)
401-
return eltype(A) <: LinearAlgebra.BlasFloat && has_shared_permute(A, ipAB)
401+
return scalartype(A) <: LinearAlgebra.BlasFloat && has_shared_permute(A, ipAB)
402402
end
403403

404404
function blas_contract!(

0 commit comments

Comments
 (0)