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

water.init.MemoryBandwidth Maven / Gradle / Ivy

There is a newer version: 3.8.2.9
Show newest version
package water.init;

import water.util.ArrayUtils;
import water.util.Log;
import water.util.Timer;

public class MemoryBandwidth {
  public static void main(String[] args) {
    int num_threads = Runtime.getRuntime().availableProcessors();
    double membw = run(num_threads);
    Log.info("Memory bandwidth (" + num_threads + " cores) : " + membw + " GB/s.");
  }

  /**
   * Compute memory bandwidth in bytes / second
   */
  public static double run(int num_threads) {

    final double membw[] = new double[num_threads];
    Thread[] threads = new Thread[num_threads];
    for (int t=0;t=0; --l) {
      for (int i=0; i




© 2015 - 2025 Weber Informatics LLC | Privacy Policy