g2o
Loading...
Searching...
No Matches
g2o::ceres::internal::FixedArray< T, N, A >::Storage Class Reference
Inheritance diagram for g2o::ceres::internal::FixedArray< T, N, A >::Storage:
Collaboration diagram for g2o::ceres::internal::FixedArray< T, N, A >::Storage:

Public Member Functions

 Storage (size_type n, const allocator_type &a)
 ~Storage () noexcept
size_type size () const
StorageElement * begin () const
StorageElement * end () const
allocator_type & alloc ()

Private Member Functions

StorageElement * InitializeData ()

Static Private Member Functions

static bool UsingInlinedStorage (size_type n)

Private Attributes

std::tuple< size_type, allocator_type > size_alloc_
StorageElement * data_

Detailed Description

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
class g2o::ceres::internal::FixedArray< T, N, A >::Storage

Definition at line 404 of file fixed_array.h.

Constructor & Destructor Documentation

◆ Storage()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
g2o::ceres::internal::FixedArray< T, N, A >::Storage::Storage ( size_type n,
const allocator_type & a )
inline

Definition at line 406 of file fixed_array.h.

References data_, InitializeData(), and size_alloc_.

◆ ~Storage()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
g2o::ceres::internal::FixedArray< T, N, A >::Storage::~Storage ( )
inlinenoexcept

Member Function Documentation

◆ alloc()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
allocator_type & g2o::ceres::internal::FixedArray< T, N, A >::Storage::alloc ( )
inline

Definition at line 420 of file fixed_array.h.

420{ return std::get<1>(size_alloc_); }

References size_alloc_.

Referenced by InitializeData(), and ~Storage().

◆ begin()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
StorageElement * g2o::ceres::internal::FixedArray< T, N, A >::Storage::begin ( ) const
inline

Definition at line 418 of file fixed_array.h.

418{ return data_; }

References data_.

Referenced by end(), and ~Storage().

◆ end()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
StorageElement * g2o::ceres::internal::FixedArray< T, N, A >::Storage::end ( ) const
inline

Definition at line 419 of file fixed_array.h.

419{ return begin() + size(); }

References begin(), and size().

◆ InitializeData()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
StorageElement * g2o::ceres::internal::FixedArray< T, N, A >::Storage::InitializeData ( )
inlineprivate

Definition at line 427 of file fixed_array.h.

427 {
428 if (UsingInlinedStorage(size())) {
430 return InlinedStorage::data();
431 }
432 return reinterpret_cast<StorageElement*>(
434 }

References alloc(), size(), and UsingInlinedStorage().

Referenced by Storage().

◆ size()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
size_type g2o::ceres::internal::FixedArray< T, N, A >::Storage::size ( ) const
inline

Definition at line 417 of file fixed_array.h.

417{ return std::get<0>(size_alloc_); }

References size_alloc_.

Referenced by end(), InitializeData(), and ~Storage().

◆ UsingInlinedStorage()

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
bool g2o::ceres::internal::FixedArray< T, N, A >::Storage::UsingInlinedStorage ( size_type n)
inlinestaticprivate

Definition at line 423 of file fixed_array.h.

423 {
424 return n <= inline_elements;
425 }

References g2o::ceres::internal::FixedArray< T, N, A >::inline_elements.

Referenced by InitializeData(), and ~Storage().

Member Data Documentation

◆ data_

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
StorageElement* g2o::ceres::internal::FixedArray< T, N, A >::Storage::data_
private

Definition at line 439 of file fixed_array.h.

Referenced by begin(), and Storage().

◆ size_alloc_

template<typename T, size_t N = kFixedArrayUseDefault, typename A = FixedArrayDefaultAllocator<T>>
std::tuple<size_type, allocator_type> g2o::ceres::internal::FixedArray< T, N, A >::Storage::size_alloc_
private

Definition at line 438 of file fixed_array.h.

Referenced by alloc(), size(), and Storage().


The documentation for this class was generated from the following file: