MCPcopy Create free account
hub / github.com/apache/arrow / DispatchIsStatic

Function DispatchIsStatic

cpp/src/arrow/util/dispatch_internal.h:74–93  ·  view source on GitHub ↗

Return whether a given dispatch level is static. This depends on macros defined in the build options.

Source from the content-addressed store, hash-verified

72///
73/// This depends on macros defined in the build options.
74constexpr bool DispatchIsStatic(DispatchLevel level) {
75 switch (level) {
76#ifdef ARROW_HAVE_SSE4_2
77 case DispatchLevel::SSE4_2:
78#endif
79#ifdef ARROW_HAVE_AVX2
80 case DispatchLevel::AVX2:
81#endif
82#ifdef ARROW_HAVE_AVX512
83 case DispatchLevel::AVX512:
84#endif
85#ifdef ARROW_HAVE_NEON
86 case DispatchLevel::NEON:
87#endif
88 case DispatchLevel::NONE:
89 return true;
90 default:
91 return false;
92 }
93}
94
95/// Return whether all function in the array can be statically dispatched.
96// TODO: remove the #else branch when we no longer have partial C++20 support with CRAN.

Callers 2

DispatchFullyStaticFunction · 0.85
DispatchHasStaticFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected