@@ -273,10 +273,10 @@ static gotoblas_t *get_coretype(void) {
273
273
#ifdef __linux
274
274
int i ;
275
275
int ncores = 0 ;
276
- int p ,cpucap ,cpulowperf = 0 ,cpumidperf = 0 ,cpuhiperf = 0 ;
276
+ int prt ,cpucap ,cpulowperf = 0 ,cpumidperf = 0 ,cpuhiperf = 0 ;
277
277
FILE * infile ;
278
- char buffer [512 ], * p , * cpu_part = NULL , * cpu_implementer = NULL ;
279
- p = ( char * ) NULL ;
278
+ char buffer [512 ], * cpu_part = NULL , * cpu_implementer = NULL ;
279
+
280
280
infile = fopen ("/sys/devices/system/cpu/possible" ,"r" );
281
281
if (infile ) {
282
282
(void )fgets (buffer , sizeof (buffer ), infile );
@@ -297,7 +297,7 @@ static gotoblas_t *get_coretype(void) {
297
297
(void )fgets (buffer , sizeof (buffer ), infile );
298
298
midr_el1 = strtoul (buffer ,NULL ,16 );
299
299
implementer = (midr_el1 >> 24 ) & 0xFF ;
300
- p = (midr_el1 >> 4 ) & 0xFFF ;
300
+ prt = (midr_el1 >> 4 ) & 0xFFF ;
301
301
fclose (infile );
302
302
sprintf (buffer ,"/sys/devices/system/cpu/cpu%d/cpu_capability" ,i );
303
303
infile = fopen (buffer ,"r" );
@@ -308,22 +308,22 @@ static gotoblas_t *get_coretype(void) {
308
308
if (cpucap >= 1000 ) cpuhiperf ++ ;
309
309
else if (cpucap >=500 ) cpumidperf ++ ;
310
310
else cpulowperf ++ ;
311
- if (cpucap >=1000 ) part = p ;
311
+ if (cpucap >=1000 ) part = prt ;
312
312
} else if (implementer == 0x41 ){
313
- if (p >= 0xd4b ) cpuhiperf ++ :
314
- else if (p >= 0xd07 ) cpumidperf ++ ;
313
+ if (prt >= 0xd4b ) cpuhiperf ++ :
314
+ else if (prt >= 0xd07 ) cpumidperf ++ ;
315
315
else cpulowperf ++ ;
316
316
} else cpulowperf ++ ;
317
317
}
318
- if (!part ) part = p ;
318
+ if (!part ) part = prt ;
319
319
#else
320
320
snprintf (coremsg , 128 , "Kernel lacks cpuid feature support. Auto detection of core type failed !!!\n" );
321
321
openblas_warning (1 , coremsg );
322
322
return NULL ;
323
323
#endif
324
324
} else {
325
325
get_cpu_ftr (MIDR_EL1 , midr_el1 );
326
- }
326
+
327
327
/*
328
328
* MIDR_EL1
329
329
*
@@ -334,7 +334,7 @@ static gotoblas_t *get_coretype(void) {
334
334
*/
335
335
implementer = (midr_el1 >> 24 ) & 0xFF ;
336
336
part = (midr_el1 >> 4 ) & 0xFFF ;
337
-
337
+ }
338
338
switch (implementer )
339
339
{
340
340
case 0x41 : // ARM
0 commit comments