All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.komputation.cpu.functions.RowSplit.kt Maven / Gradle / Ivy

Go to download

Komputation is a neural network framework for the JVM written in the Kotlin programming language.

There is a newer version: 0.12.5
Show newest version
package com.komputation.cpu.functions

fun splitRows(numberRows : Int, numberColumns : Int, entries : FloatArray, heights : IntArray, numberBlocks: Int, result : Array) {

    var runningHeight = 0

    for (indexBlock in 0 until numberBlocks) {

        val height = heights[indexBlock]
        val block = result[indexBlock]

        for (indexColumn in 0 until numberColumns) {

            for (indexRow in 0 until height) {

                block[indexColumn * height + indexRow] = entries[indexColumn * numberRows + (runningHeight + indexRow)]

            }

        }

        runningHeight += height

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy