pitrou commented on a change in pull request #9657: URL: https://github.com/apache/arrow/pull/9657#discussion_r590127868
########## File path: cpp/src/arrow/util/cpu_info.cc ########## @@ -330,6 +346,29 @@ void CpuInfo::Init() { if (QueryPerformanceFrequency(&performance_frequency)) { max_mhz = static_cast<float>(performance_frequency.QuadPart); } +#elif defined(__APPLE__) + // On macOS, get CPU information from system information base + struct SysCtlCpuFeature { + const char* name; + int64_t flag; + }; + for (auto feature : std::vector<SysCtlCpuFeature>{ + {"hw.optional.sse4_2", SSSE3 | SSE4_1 | SSE4_2 | POPCNT}, + {"hw.optional.avx1_0", AVX}, + {"hw.optional.avx2_0", AVX2}, + {"hw.optional.bmi1", BMI1}, + {"hw.optional.bmi2", BMI2}, + {"hw.optional.avx512f", AVX512F}, + {"hw.optional.avx512cd", AVX512CD}, + {"hw.optional.avx512dq", AVX512DQ}, + {"hw.optional.avx512bw", AVX512BW}, + {"hw.optional.avx512vl", AVX512VL}, Review comment: Also, here are the available values on a M1: https://gist.github.com/pitrou/fa1527038fea2d7a4cf367ecba7a2d2c ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org