mirror of
https://github.com/google/cpu_features.git
synced 2025-04-28 07:23:37 +02:00
Transpose badge table for better display
This commit is contained in:
parent
63cc2980df
commit
f2e02cd86e
16
README.md
16
README.md
@ -7,12 +7,16 @@ instructions) at runtime.
|
|||||||
|
|
||||||
[comment]: <> (The following lines are generated by "scripts/generate_badges.d" that you can run online https://run.dlang.io/)
|
[comment]: <> (The following lines are generated by "scripts/generate_badges.d" that you can run online https://run.dlang.io/)
|
||||||
|
|
||||||
| Os | amd64 | AArch64 | ARM | MIPS | POWER | RISCV | LOONGARCH | s390x |
|
| | Linux | FreeBSD | MacOS | Windows |
|
||||||
| :-- | --: | --: | --: | --: | --: | --: | --: | --: |
|
| :-- | --: | --: | --: | --: |
|
||||||
| Linux | [![][i1a0]][l1a0]<br/>[![][i1a1]][l1a1] | [![][i1b0]][l1b0]<br/>[![][i1b1]][l1b1] | [![][i1c0]][l1c0]<br/>![][d1] | [![][i1d0]][l1d0]<br/>![][d1] | [![][i1e0]][l1e0]<br/>![][d1] | [![][i1f0]][l1f0]<br/>![][d1] | ![][d0]<br/>![][d1] | [![][i1h0]][l1h0]<br/>![][d1] |
|
| amd64 | [![][i1a0]][l1a0]<br/>[![][i1a1]][l1a1] | [![][i2a0]][l2a0]<br/>![][d1] | [![][i3a0]][l3a0]<br/>![][d1] | [![][i4a0]][l4a0]<br/>![][d1] |
|
||||||
| FreeBSD | [![][i2a0]][l2a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
| AArch64 | [![][i1b0]][l1b0]<br/>[![][i1b1]][l1b1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
| MacOS | [![][i3a0]][l3a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
| ARM | [![][i1c0]][l1c0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
| Windows | [![][i4a0]][l4a0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
| MIPS | [![][i1d0]][l1d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
|
| POWER | [![][i1e0]][l1e0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
|
| RISCV | [![][i1f0]][l1f0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
|
| LOONGARCH | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
|
| s390x | [![][i1h0]][l1h0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] | ![][d0]<br/>![][d1] |
|
||||||
|
|
||||||
[d0]: https://img.shields.io/badge/n%2Fa-lightgrey?&logo=cmake
|
[d0]: https://img.shields.io/badge/n%2Fa-lightgrey?&logo=cmake
|
||||||
[d1]: https://img.shields.io/badge/n%2Fa-lightgrey?&logo=data:image/svg%2bxml;base64,PHN2ZyByb2xlPSJpbWciIHZpZXdCb3g9IjAgMCAyNCAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNiAuMTZsNS43ODYgNS43ODZMNiAxMS43MzIuMjE0IDUuOTQ2IDYgLjE2MX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uc3BhcmVudCIgZmlsbD0id2hpdGUiLz48L3N2Zz4=
|
||||||
|
@ -127,14 +127,14 @@ const:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tableHeader(in Cpu[] cpus)
|
auto tableHeader(in Os[] oses)
|
||||||
{
|
{
|
||||||
return chain(only("Os"), cpus.map!(to!string)).array;
|
return chain(only(""), oses.map!(to!string)).array;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tableAlignment(in Cpu[] cpus)
|
auto tableAlignment(in Os[] oses)
|
||||||
{
|
{
|
||||||
return chain(only(":--"), cpus.map!(v => "--:")).array;
|
return chain(only(":--"), oses.map!(v => "--:")).array;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tableCell(Range)(in Os os, in Cpu cpu, Range badges)
|
auto tableCell(Range)(in Os os, in Cpu cpu, Range badges)
|
||||||
@ -144,19 +144,19 @@ auto tableCell(Range)(in Os os, in Cpu cpu, Range badges)
|
|||||||
.joiner("<br/>").to!string;
|
.joiner("<br/>").to!string;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tableRow(Range)(in Os os, in Cpu[] cpus, Range badges)
|
auto tableRow(Range)(in Cpu cpu, in Os[] oses, Range badges)
|
||||||
{
|
{
|
||||||
return chain(only(os.to!string), cpus.map!(cpu => tableCell(os, cpu, badges))).array;
|
return chain(only(cpu.to!string), oses.map!(os => tableCell(os, cpu, badges))).array;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto tableRows(Range)(in Os[] oses, in Cpu[] cpus, Range badges)
|
auto tableRows(Range)(in Os[] oses, in Cpu[] cpus, Range badges)
|
||||||
{
|
{
|
||||||
return oses.map!(os => tableRow(os, cpus, badges)).array;
|
return cpus.map!(cpu => tableRow(cpu, oses, badges)).array;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto table(Range)(in Os[] oses, in Cpu[] cpus, Range badges)
|
auto table(Range)(in Os[] oses, in Cpu[] cpus, Range badges)
|
||||||
{
|
{
|
||||||
return chain(only(tableHeader(cpus)), only(tableAlignment(cpus)),
|
return chain(only(tableHeader(oses)), only(tableAlignment(oses)),
|
||||||
tableRows(oses, cpus, badges));
|
tableRows(oses, cpus, badges));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user