handmade.network » Forums » Work-in-Progress » [Poll] Announcing the CPU Info library, and a question.
Kelimion
Jeroen van Rijn
229 posts
3 projects

A big ball of Wibbly-Wobbly, Timey-Wimey _stuff_

#10888 [Poll] Announcing the CPU Info library, and a question.
5 months, 1 week ago Edited by Jeroen van Rijn on Feb. 13, 2017, 8:46 p.m.

Hi fellow community members,

I'm working on a single file stb-style library that makes available to the developer a great deal of information that can be gleaned from the cpuid instruction, to be released later this month. Like many of the programming problems we solve, there's a certain amount of tedium involved. That in a nutshell is the impetus for this work.

A description:
Originally written as a labour-saving library to save future-me the drudge work, I hope it may in some way be useful to you as well. No reading of the Intel® and AMD® manuals required to get the information you want out of the processor.

Find out hassle-free:

The vendor and model of the CPU
The human-readable name of the CPU, where available, like "AMD Athlon(tm) X4 860K Quad Core Processor"
ISA extensions supported by this processor, like SSE2, SSE3, AVX, FMA3, XOP and whether virtualisation is supported.
Find out cache level and cache line sizes, where available
(more, TBD)

To that end, I'd appreciate it if you could fill out this poll, so as to help me decide which way to order the vendor enum, or whether support for detecting/interrogating a certain vendor's CPU can be moved behind a #define so as to allow for a smaller footprint that covers the actual CPUs you'll likely encounter in practice.

Thanks in advance.
CaptainKraft
Jeremiah
143 posts
2 projects

Father, husband, C programmer, and Linux apologist. Think before you code.

#10905 [Poll] Announcing the CPU Info library, and a question.
5 months, 1 week ago

I endorse this product.

I'd use that

Build a man a fire, he'll be warm for a day.
Set a man on fire, he'll be warm for the rest of his life.