Vector with aligned memory allocation.
More...
#include <geogram/basic/memory.h>
template<class T>
class GEO::vector< T >
Vector with aligned memory allocation.
Class vector is a std::vector
that uses a memory-aligned allocator Memory-aligned allocation makes it well suited for SSE/AVX/... vector code generation.
- See also
- Memory::aligned_allocator
Definition at line 635 of file memory.h.
◆ vector() [1/2]
Creates a pre-allocated vector.
Constructs a container with size
elements. Each element is default-constructed.
- Parameters
-
[in] | size | Number of elements to allocate |
Definition at line 655 of file memory.h.
◆ vector() [2/2]
Creates a pre-initialized vector.
Constructs a container with size
elements. Each element is a copy of val
.
- Parameters
-
[in] | size | Number of elements to allocate |
[in] | val | Initial value of the elements |
Definition at line 666 of file memory.h.
◆ data() [1/2]
Gets a pointer to the array of elements.
- Returns
- a pointer to the first element of the vector
Definition at line 774 of file memory.h.
◆ data() [2/2]
Gets a pointer to the array of elements.
- Returns
- a const pointer to the first element of the vector
Definition at line 782 of file memory.h.
◆ operator[]() [1/4]
Gets a vector element.
- Parameters
-
[in] | i | index of the element |
- Returns
- A reference to the element at position
i
in the vector.
Definition at line 687 of file memory.h.
◆ operator[]() [2/4]
Gets a vector element.
- Parameters
-
[in] | i | index of the element |
- Returns
- A const reference to the element at position
i
in the vector.
Definition at line 698 of file memory.h.
◆ operator[]() [3/4]
Gets a vector element.
- Parameters
-
[in] | i | index of the element |
- Returns
- A reference to the element at position
i
in the vector.
Definition at line 708 of file memory.h.
◆ operator[]() [4/4]
Gets a vector element.
- Parameters
-
[in] | i | index of the element |
- Returns
- A const reference to the element at position
i
in the vector.
Definition at line 719 of file memory.h.
◆ size()
Gets the number of elements.
- Returns
- The actual number of elements in the vector
Definition at line 674 of file memory.h.
The documentation for this class was generated from the following file: