Skip to content

Commit

Permalink
Moved benchmarks to '.viktor' subpackage
Browse files Browse the repository at this point in the history
  • Loading branch information
superbobry committed Jun 27, 2016
1 parent 6fe13a2 commit 331c8ea
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 33 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.random.RandomDataGenerator;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.util.Precision;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

import java.util.concurrent.TimeUnit;

@BenchmarkMode(Mode.Throughput)
@OutputTimeUnit(TimeUnit.SECONDS)
@OutputTimeUnit(TimeUnit.MILLISECONDS)
@State(Scope.Benchmark)
@Warmup(iterations = 10)
@Measurement(iterations = 10)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.util.Precision;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.apache.commons.math3.random.RandomDataGenerator;
import org.apache.commons.math3.stat.StatUtils;
import org.apache.commons.math3.util.FastMath;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.openjdk.jmh.annotations.*;
import org.openjdk.jmh.infra.Blackhole;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.jetbrains.bio.viktor.NativeSpeedups;
import org.jetbrains.bio.viktor.StridedVectorKt;
import org.openjdk.jmh.annotations.*;

import java.util.Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.jetbrains.bio.viktor.BalancedSumKt;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.jetbrains.bio.viktor.StridedVectorKt;
import org.openjdk.jmh.annotations.*;

import java.util.Random;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package org.jetbrains.bio.jni;
package org.jetbrains.bio.viktor;

import org.jetbrains.bio.viktor.BalancedSumKt;
import org.jetbrains.bio.viktor.NativeSpeedups;
import org.jetbrains.bio.viktor.StridedVectorKt;
import org.openjdk.jmh.annotations.*;

import java.util.Random;
Expand Down
14 changes: 6 additions & 8 deletions src/main/kotlin/org/jetbrains/bio/viktor/NativeSpeedups.kt
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,12 @@ object NativeSpeedups {

external fun unsafeLogSumExp(src: DoubleArray, srcOffset: Int, length: Int): Double

external fun unsafeLogAddExp(
src1: DoubleArray, srcOffset1: Int,
src2: DoubleArray, srcOffset2: Int,
dst: DoubleArray, dstOffset: Int, length: Int)

external fun unsafeLogRescale(
src: DoubleArray, srcOffset: Int,
dst: DoubleArray, dstOffset: Int, length: Int)
external fun unsafeLogAddExp(src1: DoubleArray, srcOffset1: Int,
src2: DoubleArray, srcOffset2: Int,
dst: DoubleArray, dstOffset: Int, length: Int)

external fun unsafeLogRescale(src: DoubleArray, srcOffset: Int,
dst: DoubleArray, dstOffset: Int, length: Int)

external fun unsafeDot(src1: DoubleArray, srcOffset1: Int,
src2: DoubleArray, srcOffset2: Int, length: Int): Double
Expand Down

0 comments on commit 331c8ea

Please sign in to comment.