Add sink that keeps results observable
This commit is contained in:
10
timings/src/main/java/com/ankurm/vectorapi/Sink.java
Normal file
10
timings/src/main/java/com/ankurm/vectorapi/Sink.java
Normal file
@@ -0,0 +1,10 @@
|
||||
package com.ankurm.vectorapi;
|
||||
|
||||
/** Keeps computed values observable so the JIT cannot delete the computation. */
|
||||
public final class Sink {
|
||||
public static volatile float sink;
|
||||
|
||||
public static void consume(float v) { sink = v; }
|
||||
|
||||
private Sink() {}
|
||||
}
|
||||
Reference in New Issue
Block a user