Viktor prototype with inline

This commit is contained in:
Alexander Nozik 2019-12-08 19:52:47 +03:00
parent cbac4fca33
commit e42058e571

View File

@ -69,9 +69,14 @@ class ViktorNDField(override val shape: IntArray) : NDField<Double, RealField, V
return (a.f64Buffer + b.f64Buffer).asStructure()
}
// override inline fun ViktorNDStructure.plus(b: ViktorNDStructure): ViktorNDStructure {
// return (f64Buffer + b.f64Buffer).asStructure()
// }
override inline fun ViktorNDStructure.plus(b: ViktorNDStructure): ViktorNDStructure {
return (f64Buffer + b.f64Buffer).asStructure()
}
override inline fun ViktorNDStructure.minus(b: ViktorNDStructure): ViktorNDStructure {
return (f64Buffer - b.f64Buffer).asStructure()
}
override fun multiply(a: ViktorNDStructure, k: Number): ViktorNDStructure {
return (a.f64Buffer * k.toDouble()).asStructure()