diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2015-11-17 18:23:48 +0100 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2015-11-17 18:23:48 +0100 |
commit | 52e32b2c9f0e5ac7cfb31fd2306e6536340955e1 (patch) | |
tree | 720e376325d14f6713df434e031c503ba8f33c1e /pcilib/pagecpy.h | |
parent | 2455a677448e0e0c17d7193bf405b734b758811b (diff) | |
download | pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.gz pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.bz2 pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.tar.xz pcitool-52e32b2c9f0e5ac7cfb31fd2306e6536340955e1.zip |
Support for 64-bit registes
Diffstat (limited to 'pcilib/pagecpy.h')
-rw-r--r-- | pcilib/pagecpy.h | 29 |
1 files changed, 29 insertions, 0 deletions
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 <stdio.h> +#include <stdint.h> + +#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 */ |