Return whether a given dispatch level is static. This depends on macros defined in the build options.
| 72 | /// |
| 73 | /// This depends on macros defined in the build options. |
| 74 | constexpr 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. |
no outgoing calls
no test coverage detected