mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
init
This commit is contained in:
parent
1b517105db
commit
e7465eb4a3
@ -93,7 +93,8 @@ inline bool cpuid(UInt32 op, UInt32 * res) noexcept /// NOLINT
|
||||
OP(CLFLUSHOPT) \
|
||||
OP(CLWB) \
|
||||
OP(XSAVE) \
|
||||
OP(OSXSAVE)
|
||||
OP(OSXSAVE) \
|
||||
OP(AMX)
|
||||
|
||||
union CpuInfo
|
||||
{
|
||||
@ -313,6 +314,15 @@ bool haveRDRAND() noexcept
|
||||
return CpuInfo(0x0).registers.eax >= 0x7 && ((CpuInfo(0x1).registers.ecx >> 30) & 1u);
|
||||
}
|
||||
|
||||
bool haveAMX() noexcept
|
||||
{
|
||||
#if defined(__x86_64__) || defined(__i386__)
|
||||
return (CpuInfo(0x1).registers.ecx >> 22) & 1u;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
struct CpuFlagsCache
|
||||
{
|
||||
#define DEF_NAME(X) static inline bool have_##X = have##X();
|
||||
|
Loading…
Reference in New Issue
Block a user