OpenMPI 0.1.1

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

memcpy_base_default.h
1 /*
2 * Copyright (c) 2004-2006 The University of Tennessee and The University
3 * of Tennessee Research Foundation. All rights
4 * reserved.
5 * $COPYRIGHT$
6 *
7 * Additional copyrights may follow
8 *
9 * $HEADER$
10 */
11
12 #ifndef OPAL_MCA_MEMCPY_BASE_MEMCPY_BASE_NULL_H
13 #define OPAL_MCA_MEMCPY_BASE_MEMCPY_BASE_NULL_H
14
15 #define opal_memcpy( dst, src, length ) \
16 memcpy( (dst), (src), (length) );
17
18 #define opal_memcpy_tov( dst_iov, src, count ) \
19 do { \
20 int _i; \
21 char* _src = (char*)src; \
22 \
23 for( _i = 0; _i < count; _i++ ) { \
24 opal_memcpy( dst_iov[_i].iov_base, _src, \
25 dst_iov[_i].iov_len ); \
26 _src += dst_iov[_i].iov_len; \
27 } \
28 } while (0)
29
30 #define opal_memcpy_fromv( dst, src_iov, count ) \
31 do { \
32 int _i; \
33 char* _dst = (char*)dst; \
34 \
35 for( _i = 0; _i < count; _i++ ) { \
36 opal_memcpy( _dst, src_iov[_i].iov_base, \
37 src_iov[_i].iov_len ); \
38 _dst += src_iov[_i].iov_len; \
39 } \
40 } while (0)
41
42 #endif