UnifyFS
UnifyFS copied to clipboard
Provide way to enable memcpy variants for testing
Commit 75543ec removed the commented out function unifycr_memcpy() shown below. @adammoody commented in #51 that it was there to facilitate performance testing of different memcpy variants with different compilers and architectures. If this is still needed we should provide either a build-time or run-time method to enable such variants.
/* simple memcpy which compilers should be able to vectorize
* from: http://software.intel.com/en-us/articles/memcpy-performance/
* icc -restrict -O3 ... */
static inline void *unifycr_memcpy(void *restrict b, const void *restrict a,
size_t n)
{
char *s1 = b;
const char *s2 = a;
for (; 0 < n; --n) {
*s1++ = *s2++;
}
return b;
}