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

Method IsSupported

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

Source from the content-addressed store, hash-verified

333 FunctionType func = {};
334
335 bool IsSupported(DispatchLevel level) const {
336 static const auto cpu_info = arrow::internal::CpuInfo::GetInstance();
337
338 switch (level) {
339 case DispatchLevel::NONE:
340 return true;
341 case DispatchLevel::SSE4_2:
342 return cpu_info->IsSupported(CpuInfo::SSE4_2);
343 case DispatchLevel::AVX2:
344 return cpu_info->IsSupported(CpuInfo::AVX2);
345 case DispatchLevel::AVX512:
346 return cpu_info->IsSupported(CpuInfo::AVX512);
347 case DispatchLevel::NEON:
348 return cpu_info->IsSupported(CpuInfo::ASIMD);
349 case DispatchLevel::SVE128:
350 return cpu_info->IsSupported(CpuInfo::SVE128);
351 case DispatchLevel::SVE256:
352 return cpu_info->IsSupported(CpuInfo::SVE256);
353 case DispatchLevel::SVE512:
354 return cpu_info->IsSupported(CpuInfo::SVE512);
355 default:
356 return false;
357 }
358 }
359};
360
361/// Specialization for the fully-static case: best target is resolved at compile time,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected