From daa077718299839d80256ef1705cb48f31d36c9f Mon Sep 17 00:00:00 2001 From: Roland Grinis Date: Wed, 24 Mar 2021 18:43:03 +0000 Subject: [PATCH] removed unused code --- .../kscience/kmath/tensors/core/checks.kt | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt index ec7a123a9..c644a295c 100644 --- a/kmath-core/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt +++ b/kmath-core/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt @@ -34,26 +34,6 @@ internal inline fun , } -internal inline fun , - TorchTensorAlgebraType : TensorAlgebra> - TorchTensorAlgebraType.checkDot(a: TensorType, b: TensorType): Unit { - val sa = a.shape - val sb = b.shape - val na = sa.size - val nb = sb.size - var status: Boolean - if (nb == 1) { - status = sa.last() == sb[0] - } else { - status = sa.last() == sb[nb - 2] - if ((na > 2) and (nb > 2)) { - status = status and - (sa.take(nb - 2).toIntArray() contentEquals sb.take(nb - 2).toIntArray()) - } - } - check(status) { "Incompatible shapes ${sa.toList()} and ${sb.toList()} provided for dot product" } -} - internal inline fun , TorchTensorAlgebraType : TensorAlgebra> TorchTensorAlgebraType.checkTranspose(dim: Int, i: Int, j: Int): Unit =