![]() |
SenK
SenK is a C++ library for high-performance linear solvers.
|
Contains utility functions. More...
Functions | |
template<typename T > | |
T * | SafeMalloc (int size) |
Allocate memory. More... | |
template<typename T > | |
T * | SafeCalloc (int size) |
Allocate memory and clear it. More... | |
template<typename T > | |
T * | SafeRealloc (T *old, int size) |
Reallocate memory. More... | |
template<typename T > | |
void | SafeFree (T **ptr) |
Free allocated memory. More... | |
template<typename T > | |
void | Copy (T *in, T *out, int size) |
Copy in to out. More... | |
template<typename T > | |
void | Set (T val, T *out, int size) |
Set values of out to val. More... | |
template<typename T1 , typename T2 > | |
void | Convert (T1 *in, T2 *out, int size) |
Convert type of arrays. More... | |
Contains utility functions.
void senk::utils::Convert | ( | T1 * | in, |
T2 * | out, | ||
int | size | ||
) |
Convert type of arrays.
T1 | The type of the original array. |
T2 | The type of the converted array. |
in | The input array. |
out | The output array. |
size | The size of the array. |
Definition at line 104 of file senk_utils.hpp.
void senk::utils::Copy | ( | T * | in, |
T * | out, | ||
int | size | ||
) |
Copy in to out.
T | The type of in and out. |
in | The input array. |
out | The output array. |
size | The size of the arrays. |
Definition at line 73 of file senk_utils.hpp.
T * senk::utils::SafeCalloc | ( | int | size | ) |
Allocate memory and clear it.
An | unit type |
size | The size of memory to be allocated. |
Definition at line 35 of file senk_utils.hpp.
void senk::utils::SafeFree | ( | T ** | ptr | ) |
Free allocated memory.
T | An unit type |
ptr | The pointer to the memory to be freed. |
Definition at line 60 of file senk_utils.hpp.
T * senk::utils::SafeMalloc | ( | int | size | ) |
Allocate memory.
An | unit type |
size | The size of memory to be allocated. |
Definition at line 23 of file senk_utils.hpp.
T * senk::utils::SafeRealloc | ( | T * | old, |
int | size | ||
) |
Reallocate memory.
An | unit type |
old | The pointer to the memory to be reallocated. |
size | The size of memory to be allocated. |
Definition at line 48 of file senk_utils.hpp.
void senk::utils::Set | ( | T | val, |
T * | out, | ||
int | size | ||
) |
Set values of out to val.
T | The type of the value. |
val | The input value. |
out | The output array. |
size | The size of the array. |
Definition at line 88 of file senk_utils.hpp.