From ec88d6be9eeaa7d202fb006fad5fa28e6e0ecb70 Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Wed, 27 Mar 2024 08:19:22 +0300 Subject: [PATCH] Remove unnecessary reification --- .../kotlin/space/kscience/kmath/structures/LazyStructureND.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt b/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt index 1d23162f5..6acf5c1c8 100644 --- a/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt +++ b/kmath-coroutines/src/jvmMain/kotlin/space/kscience/kmath/structures/LazyStructureND.kt @@ -48,13 +48,13 @@ public suspend fun StructureND.await(index: IntArray): T = * PENDING would benefit from KEEP-176 */ @OptIn(PerformancePitfall::class) -public inline fun StructureND.mapAsyncIndexed( +public inline fun StructureND.mapAsyncIndexed( scope: CoroutineScope, crossinline function: suspend (T, index: IntArray) -> R, ): LazyStructureND = LazyStructureND(scope, shape) { index -> function(get(index), index) } @OptIn(PerformancePitfall::class) -public inline fun StructureND.mapAsync( +public inline fun StructureND.mapAsync( scope: CoroutineScope, crossinline function: suspend (T) -> R, ): LazyStructureND = LazyStructureND(scope, shape) { index -> function(get(index)) }