32
32
33
33
/* ---------------------------------------------------------------------- */
34
34
35
- extern inline unsigned int hweight32 (unsigned int w )
35
+ static inline unsigned int hweight32 (unsigned int w )
36
36
#ifndef _MSC_VER
37
37
__attribute__ ((unused ))
38
38
#endif
39
39
;
40
- extern inline unsigned int hweight16 (unsigned short w )
40
+ static inline unsigned int hweight16 (unsigned short w )
41
41
#ifndef _MSC_VER
42
42
__attribute__ ((unused ))
43
43
#endif
44
44
;
45
45
46
- extern inline unsigned int hweight8 (unsigned char w )
46
+ static inline unsigned int hweight8 (unsigned char w )
47
47
#ifndef _MSC_VER
48
48
__attribute__ ((unused ))
49
49
#endif
50
50
;
51
51
52
- extern inline unsigned int hweight32 (unsigned int w )
52
+ static inline unsigned int hweight32 (unsigned int w )
53
53
{
54
54
unsigned int res = (w & 0x55555555 ) + ((w >> 1 ) & 0x55555555 );
55
55
res = (res & 0x33333333 ) + ((res >> 2 ) & 0x33333333 );
@@ -58,33 +58,33 @@ extern inline unsigned int hweight32(unsigned int w)
58
58
return (res & 0x0000FFFF ) + ((res >> 16 ) & 0x0000FFFF );
59
59
}
60
60
61
- extern inline unsigned int hweight16 (unsigned short w )
61
+ static inline unsigned int hweight16 (unsigned short w )
62
62
{
63
63
unsigned short res = (w & 0x5555 ) + ((w >> 1 ) & 0x5555 );
64
64
res = (res & 0x3333 ) + ((res >> 2 ) & 0x3333 );
65
65
res = (res & 0x0F0F ) + ((res >> 4 ) & 0x0F0F );
66
66
return (res & 0x00FF ) + ((res >> 8 ) & 0x00FF );
67
67
}
68
68
69
- extern inline unsigned int hweight8 (unsigned char w )
69
+ static inline unsigned int hweight8 (unsigned char w )
70
70
{
71
71
unsigned short res = (w & 0x55 ) + ((w >> 1 ) & 0x55 );
72
72
res = (res & 0x33 ) + ((res >> 2 ) & 0x33 );
73
73
return (res & 0x0F ) + ((res >> 4 ) & 0x0F );
74
74
}
75
75
76
- extern inline unsigned int gcd (unsigned int x , unsigned int y )
76
+ static inline unsigned int gcd (unsigned int x , unsigned int y )
77
77
#ifndef _MSC_VER
78
78
__attribute__ ((unused ))
79
79
#endif
80
80
;
81
- extern inline unsigned int lcm (unsigned int x , unsigned int y )
81
+ static inline unsigned int lcm (unsigned int x , unsigned int y )
82
82
#ifndef _MSC_VER
83
83
__attribute__ ((unused ))
84
84
#endif
85
85
;
86
86
87
- extern inline unsigned int gcd (unsigned int x , unsigned int y )
87
+ static inline unsigned int gcd (unsigned int x , unsigned int y )
88
88
{
89
89
for (;;) {
90
90
if (!x )
@@ -98,15 +98,15 @@ extern inline unsigned int gcd(unsigned int x, unsigned int y)
98
98
}
99
99
}
100
100
101
- extern inline unsigned int lcm (unsigned int x , unsigned int y )
101
+ static inline unsigned int lcm (unsigned int x , unsigned int y )
102
102
{
103
103
return x * y / gcd (x , y );
104
104
}
105
105
106
106
/* ---------------------------------------------------------------------- */
107
107
108
108
#ifndef __HAVE_ARCH_MAC
109
- extern inline float mac (const float * a , const float * b , unsigned int size )
109
+ static inline float mac (const float * a , const float * b , unsigned int size )
110
110
{
111
111
float sum = 0 ;
112
112
unsigned int i ;
@@ -117,7 +117,7 @@ extern inline float mac(const float *a, const float *b, unsigned int size)
117
117
}
118
118
#endif /* __HAVE_ARCH_MAC */
119
119
120
- extern inline float fsqr (float f )
120
+ static inline float fsqr (float f )
121
121
{
122
122
return f * f ;
123
123
}
0 commit comments