Displaying 1 result from an estimated 1 matches for "n_ptr".
Did you mean:
a_ptr
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
...n; j++) {
ry[i] += rA[j * m + i] * rx[j];
}
}
UNPROTECT(1);
gettimeofday(&time2, NULL);
*execTime = (time2.tv_sec - time1.tv_sec) + (time2.tv_usec -
time1.tv_usec)/1000000.0;
UNPROTECT(1);
return execTime_sxp;
}
void matvecMultiply2(double *A, double *x, double *y, int *m_ptr, int
*n_ptr, double *execTime) {
timeval time1, time2;
gettimeofday(&time1, NULL);
int m = *m_ptr;
int n = *n_ptr;
for (int i = 0; i < m; i++) {
y[i] = 0.0;
for (int j = 0; j < n; j++) {
y[i] += A[j * m + i] * x[j];
}
}
gettimeofday(&time2, NULL);
*execTime = (time2.tv_sec - time...