Commit cbff4cdb authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

wip

parent 4e839218
Pipeline #3793 passed with stage
in 1 second
......@@ -8,11 +8,12 @@
#include <stdio.h>
#include <time.h>
#include <omp.h>
#include <stdint.h>
#define NPTS 1000000000
#define NPTS 100000000000
void main() {
int i;
uint64_t i;
double a,b,c,pi,dt,mflops;
struct timespec tstart,tend;
clock_gettime(CLOCK_REALTIME,&tstart);
......@@ -27,6 +28,6 @@ void main() {
clock_gettime(CLOCK_REALTIME,&tend);
dt = (tend.tv_sec+tend.tv_nsec/1e9)-(tstart.tv_sec+tstart.tv_nsec/1e9);
mflops = NPTS*5.0/(dt*1e6);
printf("NPTS = %d, pi = %f, threads = %d\n",NPTS,pi,omp_get_max_threads());
printf("NPTS = %ld, pi = %f, threads = %d\n",NPTS,pi,omp_get_max_threads());
printf("time = %f, estimated MFlops = %f\n",dt,mflops);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment