Sha256: d996f76893492072172103d29718ad2c4b5b95c3b99f2f2a1ad58abdd724c507

Contents?: true

Size: 748 Bytes

Versions: 1

Compression:

Stored size: 748 Bytes

Contents

  // Initialize the timer
  float bones_timer2 = 0;
  struct timeval bones_start_time2;
  struct timeval bones_end_time2;
  for (int bones_iter=0; bones_iter<ITERS; bones_iter++) {
  
  // Flush the CPU cache (for measurement purposes only)
  const int bones_flush_size = 4*1024*1024; // (16MB)
  int bones_flush_i;
  int bones_flush_j;
  char *bones_flush_c = (char *)malloc(bones_flush_size);
  for (bones_flush_i=0; bones_flush_i<10; bones_flush_i++) {
    for (bones_flush_j=0; bones_flush_j<bones_flush_size; bones_flush_j++) {
      bones_flush_c[bones_flush_j] = bones_flush_i*bones_flush_j;
    }
  }
  free(bones_flush_c);
    
  // Start the timer for the measurement of the kernel execution time
  gettimeofday(&bones_start_time2, NULL);

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bones-compiler-1.1.0 skeletons/CPU-C/common/timer_2_start.c