/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/pagecpy.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-11-17 17:23:48 UTC
  • Revision ID: csa@suren.me-20151117172348-fmpmt36m3bfajvzc
Support for 64-bit registes

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef _PCILIB_PAGECPY_H
 
2
#define _PCILIB_PAGECPY_H
 
3
 
 
4
#include <stdio.h>
 
5
#include <stdint.h>
 
6
 
 
7
#ifdef __cplusplus
 
8
extern "C" {
 
9
#endif
 
10
 
 
11
/**
 
12
 * This function should be used to move large blocks of non-cached memory between
 
13
 * aligned memory locations. The function will determine the CPU model and alginment
 
14
 * and call appropriate implementation. If nothing suitable found, standard memcpy
 
15
 * will be used. It is OK to call on small or unligned data, the standard memcpy
 
16
 * will be executed in this case. The memory regions should not intersect.
 
17
 * Only AVX implementation so far.
 
18
 * @param[out] dst - destination memory region
 
19
 * @param[in] src - source memory region
 
20
 * @param[in] size - size of memory region in bytes.
 
21
 * @return - `dst` or NULL on error
 
22
 */
 
23
void pcilib_pagecpy(void *dst, void *src, size_t size);
 
24
 
 
25
#ifdef __cplusplus
 
26
}
 
27
#endif
 
28
 
 
29
#endif /* _PCILIB_PAGECPY_H */