MCPcopy Create free account
hub / github.com/ElementsProject/elements / EnableClmul

Function EnableClmul

src/minisketch/src/minisketch.cpp:67–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65
66#ifdef HAVE_CLMUL
67static inline bool EnableClmul()
68{
69#ifdef _MSC_VER
70 int regs[4];
71 __cpuid(regs, 1);
72 return (regs[2] & 0x2);
73#else
74 uint32_t eax, ebx, ecx, edx;
75 return (__get_cpuid(1, &eax, &ebx, &ecx, &edx) && (ecx & 0x2));
76#endif
77}
78#endif
79
80Sketch* Construct(int bits, int impl)

Callers 1

ConstructFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected