kou commented on PR #46034: URL: https://github.com/apache/arrow/pull/46034#issuecomment-2820148110
> > I think that we can wrap a third-party library and implement missing features by ourselves (or mix multiple third-party libraries). > > That's what we did originally for `CpuInfo` and it means we can't easily backport improvements from upstream. So I'd rather vendor the third-party library as is and implement other functionality in other headers. You mean https://github.com/apache/arrow/pull/785 that imports `CpuInfo` from parquet-cpp, right? My idea is "wrap" not "import". For example, if we use https://github.com/google/cpu_features and https://github.com/anrieff/libcpuid , our `CpuInfo` will look like the following: ```cpp #include <cpuinfo_x86.h> #include <libcpuid.h> struct CpuInfo::Impl { Impl() { if (cpu_features::GetX86Info().features.avx) { hardware_flags |= CpuInfo::AVX; } struct cpu_raw_data_t raw; struct cpu_id_t data; cpuid_get_raw_data(&raw); cpu_identify(&raw, &data) num_cores = data.num_cores; } }; ``` -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
