search for: m_ptr

Displaying 3 results from an estimated 3 matches for "m_ptr".

Did you mean: a_ptr
2002 Aug 05
5
[patch] read-devices
...ng accordingly in a few locations. 2. The code and usage of map_ptr() required the file size to be known in advance. This is impossible for devices and FIFOs. To address this, I changed the interface of map_ptr. It now returns void rather than char*, and updates two new members of map_struct: - m_ptr contains the pointer to the new data - m_len contains the length of the new data (at most the length requested, but less if EOF encountered) Also, the map_struct->file_size field is now updated by map_ptr() when it encounters an EOF. I updated all invocations of map_ptr() to use the new inte...
2004 Jun 17
1
[LLVMdev] Small dyn_cast embellishment
...ed in TC++PL, but it occured to me that we can do even better: if (dyn_caster<ConstantExpr> ce = *j) { } where dyn_caster is defined like this: template<class T> class dyn_caster { public: template<class T2> dyn_caster(T2& t) : m_ptr(dyn_cast<T>(t)) {} T& operator*() const { return *m_ptr; } T* operator->() const { return m_ptr; } operator void*() const { return m_ptr; } private: T* m_ptr; }; This allows to type the type name only once, not twice. I'm not sure i...
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
...= 0; j < 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.t...