Answered step by step
Verified Expert Solution
Question
1 Approved Answer
C programming Need the chart filled up ASAP this is the program /* * Sum of a*X[N] */ #include #include #include #include #include /* read
C programming
Need the chart filled up ASAP
this is the program
/* * Sum of a*X[N] */ #include#include #include #include #include /* read timer in second */ double read_timer() { struct timeb tm; ftime(&tm); return (double) tm.time + (double) tm.millitm / 1000.0; } /* read timer in ms */ double read_timer_ms() { struct timeb tm; ftime(&tm); return (double) tm.time * 1000.0 + (double) tm.millitm; } #define REAL float #define VECTOR_LENGTH 102400 /* initialize a vector with random floating point numbers */ void init(REAL A[], int N) { int i; for (i = 0; i (default %d) ", N); } else N = atoi(argv[1]); REAL *X = (REAL*)malloc(sizeof(REAL)*N); REAL *Y = (REAL*)malloc(sizeof(REAL)*N); srand48((1 Size #Cycles # Instructions CPI CPU Freq CPU Time (ms) for sum CPU time (ms) (Clock Rate) loop (#cycles/Clock Rate outputted by the (GHz) and convert it to ms) program itself 0 100 1000 10000 100000 1000000 10000000
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started