HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T > Struct Template Reference

#include <inlined_containers_fwd.h>

Static Public Attributes

static constexpr size_t kPreferredInlinedVectorSizeof = 64
 
static constexpr size_t kElementSizeCutoff = 256
 
static constexpr size_t InlinedVectorHeaderSize = sizeof(absl::InlinedVector<T, 1>) - sizeof(T)
 
static constexpr size_t PreferredInlineBytes = kPreferredInlinedVectorSizeof - InlinedVectorHeaderSize
 
static constexpr size_t NumElementsThatFit = PreferredInlineBytes / sizeof(T)
 
static constexpr size_t value
 

Detailed Description

template<typename T>
struct onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >

Inspired by LLVM SmallVector with ONNX Runtime adjustments for abseil. https://github.com/llvm/llvm-project/blob/a85b37d0ca819776c6034c2dbda2b21e54e3393a/llvm/include/llvm/ADT/SmallVector.h#L1128-L1179

Helper class for calculating the default number of inline elements for InlinedVector<T>. This produces the following on MSVC x64 int8_t -> 41

Definition at line 71 of file inlined_containers_fwd.h.

Member Data Documentation

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::InlinedVectorHeaderSize = sizeof(absl::InlinedVector<T, 1>) - sizeof(T)
static

Definition at line 113 of file inlined_containers_fwd.h.

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::kElementSizeCutoff = 256
static

Definition at line 82 of file inlined_containers_fwd.h.

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::kPreferredInlinedVectorSizeof = 64
static

Definition at line 79 of file inlined_containers_fwd.h.

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::NumElementsThatFit = PreferredInlineBytes / sizeof(T)
static

Definition at line 115 of file inlined_containers_fwd.h.

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::PreferredInlineBytes = kPreferredInlinedVectorSizeof - InlinedVectorHeaderSize
static

Definition at line 114 of file inlined_containers_fwd.h.

template<typename T >
constexpr size_t onnxruntime::CalculateInlinedVectorDefaultInlinedElements< T >::value
static
Initial value:

Definition at line 116 of file inlined_containers_fwd.h.


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