g2o
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
g2o::ceres::internal::FixedArray< T, N, A >::Storage Class Reference
Inheritance diagram for g2o::ceres::internal::FixedArray< T, N, A >::Storage:
Inheritance graph
[legend]
Collaboration diagram for g2o::ceres::internal::FixedArray< T, N, A >::Storage:
Collaboration graph
[legend]

Public Member Functions

 Storage (size_type n, const allocator_type &a)
 
 ~Storage () noexcept
 
size_type size () const
 
StorageElementbegin () const
 
StorageElementend () const
 
allocator_typealloc ()
 

Private Member Functions

StorageElementInitializeData ()
 

Static Private Member Functions

static bool UsingInlinedStorage (size_type n)
 

Private Attributes

std::tuple< size_type, allocator_typesize_alloc_
 
StorageElementdata_
 

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.

407 : size_alloc_(n, a), data_(InitializeData()) {}
std::tuple< size_type, allocator_type > 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

◆ begin()

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

◆ end()

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

◆ 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())) {
429 InlinedStorage::AnnotateConstruct(size());
430 return InlinedStorage::data();
431 }
432 return reinterpret_cast<StorageElement*>(
433 AllocatorTraits::allocate(alloc(), size()));
434 }
typename std::conditional< std::is_array< value_type >::value, StorageElementWrapper< value_type >, value_type >::type StorageElement

References g2o::ceres::internal::FixedArray< T, N, A >::Storage::alloc(), g2o::ceres::internal::FixedArray< T, N, A >::Storage::size(), and g2o::ceres::internal::FixedArray< T, N, A >::Storage::UsingInlinedStorage().

◆ 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

◆ UsingInlinedStorage()

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

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

◆ 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

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