Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 788184 | Differences between
and this patch

Collapse All | Expand All

(-)numpy-1.20.2.orig/numpy/distutils/checks/cpu_popcnt.c (-4 / +10 lines)
Lines 4-23 Link Here
4
    #include <popcntintrin.h>
4
    #include <popcntintrin.h>
5
#endif
5
#endif
6
6
7
#include <stdlib.h>
8
7
int main(void)
9
int main(void)
8
{
10
{
9
    long long a = 0;
11
    long long a = 0;
10
    int b;
12
    int b;
13
    
14
    a = random();
15
    b = random();
16
      
11
#ifdef _MSC_VER
17
#ifdef _MSC_VER
12
    #ifdef _M_X64
18
    #ifdef _M_X64
13
    a = _mm_popcnt_u64(1);
19
    a = _mm_popcnt_u64(a);
14
    #endif
20
    #endif
15
    b = _mm_popcnt_u32(1);
21
    b = _mm_popcnt_u32(b);
16
#else
22
#else
17
    #ifdef __x86_64__
23
    #ifdef __x86_64__
18
    a = __builtin_popcountll(1);
24
    a = __builtin_popcountll(a);
19
    #endif
25
    #endif
20
    b = __builtin_popcount(a);
26
    b = __builtin_popcount(b);
21
#endif
27
#endif
22
    return (int)a + b;
28
    return (int)a + b;
23
}
29
}

Return to bug 788184