Skip to content
Snippets Groups Projects
Commit cbff4cdb authored by Neil Gershenfeld's avatar Neil Gershenfeld
Browse files

wip

parent 4e839218
No related branches found
No related tags found
No related merge requests found
Pipeline #3793 passed
......@@ -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);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment