#include <evo/impl/container.h>
template<class T, class U = typename TypeId::GetFill<T>::Id>
struct evo::DataFill< T, U >
Optimized data fill helpers.
- Operations are specialized and optimized for POD and ByteCopy types where possible
- This is used by Evo containers
- Template Parameters
-
T | Data type to use |
U | Inferred from T |
|
static void | fill (T *dest, ulong size, const T &value) |
| Fill with copies of given item. More...
|
|
static void | fillends (T *dest, ulong size, const T &value, ulong start, ulong end) |
| Fill each end of destination with copies of given item. More...
|
|
◆ Item
Item type (const removed)
◆ fill()
static void fill |
( |
T * |
dest, |
|
|
ulong |
size, |
|
|
const T & |
value |
|
) |
| |
|
inlinestatic |
Fill with copies of given item.
- This is optimized to use item operator=(), memcpy(), or memset() as applicable
- Parameters
-
dest | Destination data pointer to fill - must be valid |
size | Copies to fill with as item count - must be positive |
value | Value to fill with |
◆ fillends()
static void fillends |
( |
T * |
dest, |
|
|
ulong |
size, |
|
|
const T & |
value, |
|
|
ulong |
start, |
|
|
ulong |
end |
|
) |
| |
|
inlinestatic |
Fill each end of destination with copies of given item.
- This is useful for initializing items outside given range (start to end), if any
- The fills items before start (if start>0) and remaining items after (and including) end (if end<size)
- This is optimized to use item operator=(), memcpy(), or memset() as applicable
- Parameters
-
dest | Destination data pointer to fill - must be valid |
size | Destination size as item count - must be positive |
value | Value to fill with |
start | Start index of items not to fill – items before this are filled |
end | End index of items not to fill – items after (and including) this are filled |
The documentation for this struct was generated from the following file: