30 #ifndef SACADO_STATICARRAYTRAITS_HPP
31 #define SACADO_STATICARRAYTRAITS_HPP
47 static void copy(
const T* src,
T* dest,
int sz) {
48 for (
int i=0;
i<sz; ++
i)
54 static void zero(
T* dest,
int sz) {
55 for (
int i=0;
i<sz; ++
i)
69 static void copy(
const T* src,
T* dest,
int sz) {
71 #if defined( __CUDACC__) || defined(__HIPCC__ )
72 for (
int i=0;
i<sz; ++
i)
75 std::memcpy(dest,src,sz*
sizeof(
T));
81 static void zero(
T* dest,
int sz) {
83 #if defined(__CUDACC__ ) || defined(__HIPCC__ )
84 for (
int i=0;
i<sz; ++
i)
87 std::memset(dest,0,sz*
sizeof(
T));
95 #endif // SACAD0_STATICARRAYTRAITS_HPP
static SACADO_INLINE_FUNCTION void copy(const T *src, T *dest, int sz)
Copy array from src to dest of length sz.
static SACADO_INLINE_FUNCTION void copy(const T *src, T *dest, int sz)
Copy array from src to dest of length sz.
static SACADO_INLINE_FUNCTION void zero(T *dest, int sz)
Zero out array dest of length sz.
static SACADO_INLINE_FUNCTION void zero(T *dest, int sz)
Zero out array dest of length sz.
#define SACADO_INLINE_FUNCTION
Static array allocation class that works for any type.