DP-HLS
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
Utils::Array Namespace Reference

Functions

template<typename T , int N>
void ShiftLeft (T(&arr)[N], T new_data)
 
template<typename T , int N>
void ShiftRight (T(&arr)[N], T new_data)
 
template<typename T , int M, int N, int LEN>
void Copy (T(&src)[M], T(&dst)[N], idx_t len, T default_num)
 Copy length LEN of data from src to dst. If more than len, fill the rest with default_num. We need to use fixed length array rather than a pointer is because HLS is not pointer friendly. More...
 
template<typename T , int N>
void Copy (T(&src)[N], T(&dst)[N])
 
template<typename T >
void Switch (T **arr1, T **arr2)
 
template<typename T , int LEN>
void Linspace (T(&arr)[LEN], T start, T step)
 

Function Documentation

template<typename T , int M, int N, int LEN>
void Utils::Array::Copy ( T(&)  src[M],
T(&)  dst[N],
idx_t  len,
default_num 
)

Copy length LEN of data from src to dst. If more than len, fill the rest with default_num. We need to use fixed length array rather than a pointer is because HLS is not pointer friendly.

Template Parameters
T,:Type of the elements
M,:Length of src
N,:Length of dst
LEN,:Length to copy
Parameters
len,:Length of actual copying
default_num,:default number to fill.
template<typename T , int N>
void Utils::Array::Copy ( T(&)  src[N],
T(&)  dst[N] 
)
template<typename T , int LEN>
void Utils::Array::Linspace ( T(&)  arr[LEN],
start,
step 
)
template<typename T , int N>
void Utils::Array::ShiftLeft ( T(&)  arr[N],
new_data 
)
template<typename T , int N>
void Utils::Array::ShiftRight ( T(&)  arr[N],
new_data 
)
template<typename T >
void Utils::Array::Switch ( T **  arr1,
T **  arr2 
)