From 52e32b2c9f0e5ac7cfb31fd2306e6536340955e1 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Tue, 17 Nov 2015 18:23:48 +0100 Subject: Support for 64-bit registes --- pcilib/pagecpy.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 pcilib/pagecpy.h (limited to 'pcilib/pagecpy.h') diff --git a/pcilib/pagecpy.h b/pcilib/pagecpy.h new file mode 100644 index 0000000..ef8636b --- /dev/null +++ b/pcilib/pagecpy.h @@ -0,0 +1,29 @@ +#ifndef _PCILIB_PAGECPY_H +#define _PCILIB_PAGECPY_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * This function should be used to move large blocks of non-cached memory between + * aligned memory locations. The function will determine the CPU model and alginment + * and call appropriate implementation. If nothing suitable found, standard memcpy + * will be used. It is OK to call on small or unligned data, the standard memcpy + * will be executed in this case. The memory regions should not intersect. + * Only AVX implementation so far. + * @param[out] dst - destination memory region + * @param[in] src - source memory region + * @param[in] size - size of memory region in bytes. + * @return - `dst` or NULL on error + */ +void pcilib_pagecpy(void *dst, void *src, size_t size); + +#ifdef __cplusplus +} +#endif + +#endif /* _PCILIB_PAGECPY_H */ -- cgit v1.2.3