xerus
a general purpose tensor library
|
Header file for the low level array support function. More...
Go to the source code of this file.
Namespaces | |
xerus | |
The main namespace of xerus. | |
xerus::misc | |
Collection of classes and functions that provide elementary functionality that is not special to xerus as a tensor library. | |
Functions | |
template<typename T > | |
void | xerus::misc::add (T *const __restrict _x, const T *const __restrict _y, const size_t _n) noexcept |
Adds _n entries of _y to the ones of _x. I.e. x += y. More... | |
template<typename T > | |
void | xerus::misc::add_scaled (T *const __restrict _x, const T _alpha, const T *const __restrict _y, const size_t _n) noexcept |
Adds _n entries of _y, scaled by _alpha to the ones of _x. I.e. x += alpha*y. More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | xerus::misc::copy (T *const __restrict _dest, const T *const __restrict _src, const size_t _n) noexcept |
Copys _n entries from _y to _x, where _y and _x must be disjunkt memory regions. More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | xerus::misc::copy_inplace (T *const _x, const T *const _y, const size_t _n) noexcept |
Copys _n entries from _y to _x, allowing the accessed memry regions of _y and _x to overlap. More... | |
template<typename T > | |
void | xerus::misc::copy_scaled (T *const __restrict _x, const T _alpha, const T *const _y, const size_t _n) noexcept |
Copys _n entries from _y to _x, simulationously scaling each entry by the factor _alpha. I.e x = alpha*y. More... | |
template<class T > | |
std::unique_ptr< T[]> | xerus::misc::make_unique_array (T *_ptr) |
template<typename T > | |
void | xerus::misc::scale (T *const __restrict _x, const T _alpha, const size_t _n) noexcept |
Scales _n entries of _x by the factor _alpha. I.e. x = alpha*x. More... | |
template<typename T , typename std::enable_if< std::is_trivial< T >::value, int >::type = 0> | |
void | xerus::misc::set_zero (T *const __restrict _x, const size_t _n) noexcept |
Sets all entries equal to zero. More... | |
Header file for the low level array support function.
Definition in file basicArraySupport.h.