|
tesseract++ 0.0.1
N-dimensional tensor library for embedded systems
|
STL-free memory utilities. More...


Go to the source code of this file.
Namespaces | |
| namespace | detail |
Functions | |
| void | detail::memset (void *ptr, int value, my_size_t size) noexcept |
| Fill a block of memory with a byte value. | |
| void | detail::memcpy (void *dst, const void *src, my_size_t size) noexcept |
| Copy a block of memory. | |
| template<typename T > | |
| void | fill_n_optimized (T *ptr, my_size_t count, const T &value) |
| Fill a contiguous buffer with a given value. | |
| template<typename T > | |
| void | copy_n_optimized (const T *src, T *dst, my_size_t count) |
| Copy elements from a source buffer to a destination buffer. | |
STL-free memory utilities.
|
inline |
Copy elements from a source buffer to a destination buffer.
For POD types, delegates to detail::memcpy for optimal codegen. Falls back to an element-wise loop otherwise.
| T | Element type. |
| src | Pointer to the source buffer. |
| dst | Pointer to the destination buffer. |
| count | Number of elements to copy. |

|
inline |
Fill a contiguous buffer with a given value.
For POD types initialized to zero, delegates to detail::memset for optimal codegen. Falls back to a scalar loop otherwise.
| T | Element type. |
| ptr | Pointer to the start of the buffer. |
| count | Number of elements to fill. |
| value | Value to assign to each element. |
