Skip to content

Commit e3fa176

Browse files
committed
Add section comment for readability #78
1 parent e25b20f commit e3fa176

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

openblas-build/src/build.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ impl FromStr for Target {
122122

123123
fn from_str(s: &str) -> Result<Self, Self::Err> {
124124
let target = match s.to_ascii_lowercase().as_str() {
125+
// X86/X86_64 Intel
125126
"p2" => Self::P2,
126127
"katamai" => Self::KATMAI,
127128
"coppermine" => Self::COPPERMINE,
@@ -137,6 +138,8 @@ impl FromStr for Target {
137138
"haswell" => Self::HASWELL,
138139
"skylakex" => Self::SKYLAKEX,
139140
"atom" => Self::ATOM,
141+
142+
// X86/X86_64 AMD
140143
"athlon" => Self::ATHLON,
141144
"opteron" => Self::OPTERON,
142145
"opteron_sse3" => Self::OPTERON_SSE3,
@@ -149,9 +152,13 @@ impl FromStr for Target {
149152
"steamroller" => Self::STEAMROLLER,
150153
"excavator" => Self::EXCAVATOR,
151154
"zen" => Self::ZEN,
155+
156+
// X86/X86_64 generic
152157
"sse_generic" => Self::SSE_GENERIC,
153158
"viac3" => Self::VIAC3,
154159
"nano" => Self::NANO,
160+
161+
// Power
155162
"power4" => Self::POWER4,
156163
"power5" => Self::POWER5,
157164
"power6" => Self::POWER6,
@@ -164,23 +171,35 @@ impl FromStr for Target {
164171
"ppc440" => Self::PPC440,
165172
"ppc440fp2" => Self::PPC440FP2,
166173
"cell" => Self::CELL,
174+
175+
// MIPS
167176
"p5600" => Self::P5600,
168177
"mips1004k" => Self::MIPS1004K,
169178
"mips24k" => Self::MIPS24K,
179+
180+
// MIPS64
170181
"sicortex" => Self::SICORTEX,
171182
"loongson3a" => Self::LOONGSON3A,
172183
"loongson3b" => Self::LOONGSON3B,
173184
"i6400" => Self::I6400,
174185
"p6600" => Self::P6600,
175186
"i6500" => Self::I6500,
187+
188+
// IA64
176189
"itanium2" => Self::ITANIUM2,
190+
191+
// Sparc
177192
"sparc" => Self::SPARC,
178193
"sparcv7" => Self::SPARCV7,
194+
195+
// ARM
179196
"cortexa15" => Self::CORTEXA15,
180197
"cortexa9" => Self::CORTEXA9,
181198
"armv7" => Self::ARMV7,
182199
"armv6" => Self::ARMV6,
183200
"armv5" => Self::ARMV5,
201+
202+
// ARM64
184203
"armv8" => Self::ARMV8,
185204
"cortexa53" => Self::CORTEXA53,
186205
"cortexa57" => Self::CORTEXA57,
@@ -192,9 +211,12 @@ impl FromStr for Target {
192211
"thunderx" => Self::THUNDERX,
193212
"thunderx2t99" => Self::THUNDERX2T99,
194213
"tsv110" => Self::TSV110,
214+
215+
// System Z
195216
"zarch_generic" => Self::ZARCH_GENERIC,
196217
"z13" => Self::Z13,
197218
"z14" => Self::Z14,
219+
198220
_ => {
199221
return Err(Error::UnsupportedTarget {
200222
target: s.to_string(),

0 commit comments

Comments
 (0)