Rev | Line | |
---|
[12679] | 1 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h
|
---|
| 2 | ===================================================================
|
---|
| 3 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h (revision 0)
|
---|
| 4 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/shared/MemOps/xMemCpy.h (revision 12355)
|
---|
| 5 | @@ -0,0 +1,19 @@
|
---|
| 6 | +/* \file xMemCpy.h
|
---|
| 7 | + * \brief: header file for templated memory operations
|
---|
| 8 | + */
|
---|
| 9 | +
|
---|
| 10 | +#ifndef _XMEMCPY_H_
|
---|
| 11 | +#define _XMEMCPY_H_
|
---|
| 12 | +
|
---|
| 13 | +#include <cassert>
|
---|
| 14 | +
|
---|
| 15 | +template <class T>
|
---|
| 16 | +T* xMemCpy(T* dest, const T* src, unsigned int size) {
|
---|
| 17 | + assert(dest); assert(src);
|
---|
| 18 | + for (int i=0; i<size;++i)
|
---|
| 19 | + dest[i]=src[i];
|
---|
| 20 | + return dest;
|
---|
| 21 | +};
|
---|
| 22 | +
|
---|
| 23 | +#endif
|
---|
| 24 | +
|
---|
| 25 | Index: /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am
|
---|
| 26 | ===================================================================
|
---|
| 27 | --- /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am (revision 12354)
|
---|
| 28 | +++ /u/astrid-r1b/morlighe/issmuci/trunk-jpl/../trunk-jpl/src/c/Makefile.am (revision 12355)
|
---|
| 29 | @@ -176,6 +176,7 @@
|
---|
| 30 | ./shared/Alloc/alloc.h\
|
---|
| 31 | ./shared/Alloc/alloc.cpp\
|
---|
| 32 | ./shared/Alloc/xNewDelete.h\
|
---|
| 33 | + ./shared/MemOps/xMemCpy.h\
|
---|
| 34 | ./shared/Matrix/matrix.h\
|
---|
| 35 | ./shared/Matrix/MatrixUtils.cpp\
|
---|
| 36 | ./shared/Dofs/dofs.h\
|
---|
Note:
See
TracBrowser
for help on using the repository browser.