| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) | Module: kmeans-gcc-O3-funroll | Source: main.cpp:67-108 [...] | Coverage (incl. loops): 6.71% | (excl. loops): 0.00% |
|---|
| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) | Module: kmeans-gcc-O3-funroll | Source: main.cpp:67-108 [...] | Coverage (incl. loops): 6.71% | (excl. loops): 0.00% |
|---|
/home/fmusial/KMEANS_Benchmarks/kmeans/main.cpp: 67 - 108 |
-------------------------------------------------------------------------------- |
67: void k_means(int niters, point_t *points, point_t *centroids, int *assignment, point_t* memory, int n, int k) { |
68: for (int iter = 0; iter < niters; ++iter) { |
69: // determine nearest centroids |
70: #pragma omp parallel for |
[...] |
85: int count[k]; |
86: double sum_x[k]; |
87: double sum_y[k]; |
88: for (int j = 0; j < k; ++j) { |
89: count[j] = 0; |
90: sum_x[j] = 0.; |
91: sum_y[j] = 0.; |
92: } |
93: for (int i = 0; i < n; ++i) { |
94: count[assignment[i]]++; |
95: sum_x[assignment[i]] += points[i].x; |
96: sum_y[assignment[i]] += points[i].y; |
97: } |
98: for (int j = 0; j < k; ++j) { |
99: if (count[j] != 0) { |
100: centroids[j].x = sum_x[j] / count[j]; |
101: centroids[j].y = sum_y[j] / count[j]; |
102: } |
103: // save centroids to memory |
104: memory[(iter + 1) * k + j].x = centroids[j].x; |
105: memory[(iter + 1) * k + j].y = centroids[j].y; |
106: } |
107: } |
108: } |
0x2ed0 PUSH %RBP |
0x2ed1 MOV %RSP,%RBP |
0x2ed4 PUSH %R15 |
0x2ed6 PUSH %R14 |
0x2ed8 PUSH %R13 |
0x2eda PUSH %R12 |
0x2edc PUSH %RBX |
0x2edd SUB $0xb8,%RSP |
0x2ee4 MOV %EDI,-0x8c(%RBP) |
0x2eea MOV %RSI,-0x88(%RBP) |
0x2ef1 MOV %RDX,-0xc8(%RBP) |
0x2ef8 MOV %FS:0x28,%R11 |
0x2f01 MOV %R11,-0x38(%RBP) |
0x2f05 MOV 0x10(%RBP),%R11D |
0x2f09 TEST %EDI,%EDI |
0x2f0b JLE 32a0 |
0x2f11 MOVSXD %R11D,%R13 |
0x2f14 VMOVQ %RSI,%XMM4 |
0x2f19 LEA -0x1(%R11),%EAX |
0x2f1d MOV %R11D,-0x68(%RBP) |
0x2f21 LEA 0xf(,%R13,4),%RSI |
0x2f29 LEA 0xf(,%R13,8),%RDI |
0x2f31 INC %RAX |
0x2f34 MOVL $0,-0x64(%RBP) |
0x2f3b SHR $0x4,%RSI |
0x2f3f SHR $0x4,%RDI |
0x2f43 LEA (,%RAX,4),%RBX |
0x2f4b VPINSRQ $0x1,%RDX,%XMM4,%XMM3 |
0x2f51 SAL $0x3,%RAX |
0x2f55 LEA -0x60(%RBP),%RDX |
0x2f59 SAL $0x4,%RSI |
0x2f5d VMOVD %R9D,%XMM6 |
0x2f62 SAL $0x4,%RDI |
0x2f66 MOV %RAX,-0x78(%RBP) |
0x2f6a VPINSRD $0x1,%R11D,%XMM6,%XMM5 |
0x2f70 MOV %RCX,%R15 |
0x2f73 MOV %RDX,-0xc0(%RBP) |
0x2f7a MOV %RSI,-0xb0(%RBP) |
0x2f81 MOV %RDI,-0xb8(%RBP) |
0x2f88 MOV %R8,-0xd8(%RBP) |
0x2f8f MOV %RBX,-0xd0(%RBP) |
0x2f96 MOV %R9D,%EBX |
0x2f99 VMOVDQA %XMM3,-0xa0(%RBP) |
0x2fa1 VMOVQ %XMM5,-0xa8(%RBP) |
0x2fa9 NOPL (%RAX) |
(4) 0x2fb0 MOV -0xa8(%RBP),%RCX |
(4) 0x2fb7 VMOVDQA -0xa0(%RBP),%XMM0 |
(4) 0x2fbf XOR %EDX,%EDX |
(4) 0x2fc1 LEA -0x5d8(%RIP),%RDI |
(4) 0x2fc8 MOV -0xc0(%RBP),%RSI |
(4) 0x2fcf MOV %RSP,-0x70(%RBP) |
(4) 0x2fd3 MOV %RCX,-0x48(%RBP) |
(4) 0x2fd7 XOR %ECX,%ECX |
(4) 0x2fd9 MOV %R15,-0x50(%RBP) |
(4) 0x2fdd VMOVDQA %XMM0,-0x60(%RBP) |
(4) 0x2fe2 CALL 21e0 <GOMP_parallel@plt> |
(4) 0x2fe7 MOV -0xb8(%RBP),%R8 |
(4) 0x2fee SUB -0xb0(%RBP),%RSP |
(4) 0x2ff5 MOV %RSP,%RCX |
(4) 0x2ff8 MOV 0x10(%RBP),%R9D |
(4) 0x2ffc SUB %R8,%RSP |
(4) 0x2fff MOV %RSP,%R12 |
(4) 0x3002 SUB %R8,%RSP |
(4) 0x3005 INCL -0x64(%RBP) |
(4) 0x3008 MOV %RSP,%R14 |
(4) 0x300b TEST %R9D,%R9D |
(4) 0x300e JLE 32c0 |
(4) 0x3014 MOV -0xd0(%RBP),%RDX |
(4) 0x301b MOV %RCX,%RDI |
(4) 0x301e XOR %ESI,%ESI |
(4) 0x3020 MOV %RCX,-0x80(%RBP) |
(4) 0x3024 CALL 20c0 <memset@plt> |
(4) 0x3029 MOV -0x78(%RBP),%RDX |
(4) 0x302d XOR %ESI,%ESI |
(4) 0x302f MOV %R12,%RDI |
(4) 0x3032 CALL 20c0 <memset@plt> |
(4) 0x3037 MOV -0x78(%RBP),%RDX |
(4) 0x303b XOR %ESI,%ESI |
(4) 0x303d MOV %RSP,%RDI |
(4) 0x3040 CALL 20c0 <memset@plt> |
(4) 0x3045 TEST %EBX,%EBX |
(4) 0x3047 MOV -0x80(%RBP),%RCX |
(4) 0x304b JLE 320b |
(4) 0x3051 MOVSXD (%R15),%R11 |
(4) 0x3054 MOV -0x88(%RBP),%RSI |
(4) 0x305b LEA -0x1(%RBX),%R10D |
(4) 0x305f MOV $0x1,%EDI |
(4) 0x3064 AND $0x3,%R10D |
(4) 0x3068 VMOVSD (%R12,%R11,8),%XMM1 |
(4) 0x306e VMOVSD (%R14,%R11,8),%XMM7 |
(4) 0x3074 LEA 0x10(%RSI),%RAX |
(4) 0x3078 INCL (%RCX,%R11,4) |
(4) 0x307c VADDSD (%RSI),%XMM1,%XMM2 |
(4) 0x3080 VADDSD 0x8(%RSI),%XMM7,%XMM8 |
(4) 0x3085 VMOVSD %XMM2,(%R12,%R11,8) |
(4) 0x308b VMOVSD %XMM8,(%R14,%R11,8) |
(4) 0x3091 CMP $0x1,%EBX |
(4) 0x3094 JLE 3204 |
(4) 0x309a TEST %R10D,%R10D |
(4) 0x309d JE 314b |
(4) 0x30a3 CMP $0x1,%R10D |
(4) 0x30a7 JE 3112 |
(4) 0x30a9 CMP $0x2,%R10D |
(4) 0x30ad JE 30e1 |
(4) 0x30af MOVSXD 0x4(%R15),%RDX |
(4) 0x30b3 MOV $0x2,%EDI |
(4) 0x30b8 VMOVSD (%R12,%RDX,8),%XMM9 |
(4) 0x30be VMOVSD (%R14,%RDX,8),%XMM11 |
(4) 0x30c4 INCL (%RCX,%RDX,4) |
(4) 0x30c7 VADDSD 0x8(%RAX),%XMM11,%XMM12 |
(4) 0x30cc VADDSD 0x10(%RSI),%XMM9,%XMM10 |
(4) 0x30d1 LEA 0x20(%RSI),%RAX |
(4) 0x30d5 VMOVSD %XMM10,(%R12,%RDX,8) |
(4) 0x30db VMOVSD %XMM12,(%R14,%RDX,8) |
(4) 0x30e1 MOVSXD (%R15,%RDI,4),%R8 |
(4) 0x30e5 ADD $0x10,%RAX |
(4) 0x30e9 INC %RDI |
(4) 0x30ec VMOVSD (%R12,%R8,8),%XMM13 |
(4) 0x30f2 VMOVSD (%R14,%R8,8),%XMM15 |
(4) 0x30f8 INCL (%RCX,%R8,4) |
(4) 0x30fc VADDSD -0x10(%RAX),%XMM13,%XMM14 |
(4) 0x3101 VADDSD -0x8(%RAX),%XMM15,%XMM4 |
(4) 0x3106 VMOVSD %XMM14,(%R12,%R8,8) |
(4) 0x310c VMOVSD %XMM4,(%R14,%R8,8) |
(4) 0x3112 MOVSXD (%R15,%RDI,4),%R9 |
(4) 0x3116 INC %RDI |
(4) 0x3119 ADD $0x10,%RAX |
(4) 0x311d VMOVSD (%R12,%R9,8),%XMM3 |
(4) 0x3123 VMOVSD (%R14,%R9,8),%XMM5 |
(4) 0x3129 INCL (%RCX,%R9,4) |
(4) 0x312d VADDSD -0x10(%RAX),%XMM3,%XMM6 |
(4) 0x3132 VADDSD -0x8(%RAX),%XMM5,%XMM0 |
(4) 0x3137 VMOVSD %XMM6,(%R12,%R9,8) |
(4) 0x313d VMOVSD %XMM0,(%R14,%R9,8) |
(4) 0x3143 CMP %EDI,%EBX |
(4) 0x3145 JLE 3204 |
(6) 0x314b MOVSXD (%R15,%RDI,4),%R10 |
(6) 0x314f MOVSXD 0x4(%R15,%RDI,4),%R11 |
(6) 0x3154 ADD $0x40,%RAX |
(6) 0x3158 MOVSXD 0x8(%R15,%RDI,4),%RSI |
(6) 0x315d MOVSXD 0xc(%R15,%RDI,4),%RDX |
(6) 0x3162 ADD $0x4,%RDI |
(6) 0x3166 VMOVSD (%R12,%R10,8),%XMM1 |
(6) 0x316c VMOVSD (%R14,%R10,8),%XMM7 |
(6) 0x3172 INCL (%RCX,%R10,4) |
(6) 0x3176 VADDSD -0x40(%RAX),%XMM1,%XMM2 |
(6) 0x317b VADDSD -0x38(%RAX),%XMM7,%XMM8 |
(6) 0x3180 VMOVSD %XMM2,(%R12,%R10,8) |
(6) 0x3186 VMOVSD (%R12,%R11,8),%XMM9 |
(6) 0x318c VMOVSD %XMM8,(%R14,%R10,8) |
(6) 0x3192 VMOVSD (%R14,%R11,8),%XMM11 |
(6) 0x3198 INCL (%RCX,%R11,4) |
(6) 0x319c VADDSD -0x30(%RAX),%XMM9,%XMM10 |
(6) 0x31a1 VADDSD -0x28(%RAX),%XMM11,%XMM12 |
(6) 0x31a6 VMOVSD %XMM10,(%R12,%R11,8) |
(6) 0x31ac VMOVSD (%R12,%RSI,8),%XMM13 |
(6) 0x31b2 VMOVSD %XMM12,(%R14,%R11,8) |
(6) 0x31b8 VMOVSD (%R14,%RSI,8),%XMM15 |
(6) 0x31be INCL (%RCX,%RSI,4) |
(6) 0x31c1 VADDSD -0x20(%RAX),%XMM13,%XMM14 |
(6) 0x31c6 VADDSD -0x18(%RAX),%XMM15,%XMM4 |
(6) 0x31cb VMOVSD %XMM14,(%R12,%RSI,8) |
(6) 0x31d1 VMOVSD (%R12,%RDX,8),%XMM3 |
(6) 0x31d7 INCL (%RCX,%RDX,4) |
(6) 0x31da VMOVSD %XMM4,(%R14,%RSI,8) |
(6) 0x31e0 VADDSD -0x10(%RAX),%XMM3,%XMM6 |
(6) 0x31e5 VMOVSD %XMM6,(%R12,%RDX,8) |
(6) 0x31eb VMOVSD (%R14,%RDX,8),%XMM5 |
(6) 0x31f1 VADDSD -0x8(%RAX),%XMM5,%XMM0 |
(6) 0x31f6 VMOVSD %XMM0,(%R14,%RDX,8) |
(6) 0x31fc CMP %EDI,%EBX |
(6) 0x31fe JG 314b |
(4) 0x3204 MOV 0x10(%RBP),%EDI |
(4) 0x3207 TEST %EDI,%EDI |
(4) 0x3209 JLE 3285 |
(4) 0x320b MOVSXD -0x68(%RBP),%R8 |
(4) 0x320f MOV -0xc8(%RBP),%R9 |
(4) 0x3216 XOR %EAX,%EAX |
(4) 0x3218 SAL $0x4,%R8 |
(4) 0x321c ADD -0xd8(%RBP),%R8 |
(4) 0x3223 JMP 3242 |
0x3225 NOPL (%RAX) |
(5) 0x3228 VMOVUPD (%R9),%XMM1 |
(5) 0x322d INC %RAX |
(5) 0x3230 VMOVUPD %XMM1,(%R8) |
(5) 0x3235 CMP %RAX,%R13 |
(5) 0x3238 JE 3285 |
(5) 0x323a ADD $0x10,%R8 |
(5) 0x323e ADD $0x10,%R9 |
(5) 0x3242 MOV (%RCX,%RAX,4),%R10D |
(5) 0x3246 TEST %R10D,%R10D |
(5) 0x3249 JE 3228 |
(5) 0x324b VMOVSD (%R12,%RAX,8),%XMM8 |
(5) 0x3251 VXORPD %XMM2,%XMM2,%XMM2 |
(5) 0x3255 VCVTSI2SD %R10D,%XMM2,%XMM7 |
(5) 0x325a VMOVDDUP %XMM7,%XMM11 |
(5) 0x325e VDIVSD %XMM7,%XMM8,%XMM9 |
(5) 0x3262 VMOVSD %XMM9,(%R9) |
(5) 0x3267 VMOVHPD (%R14,%RAX,8),%XMM8,%XMM10 |
(5) 0x326d VDIVPD %XMM11,%XMM10,%XMM12 |
(5) 0x3272 INC %RAX |
(5) 0x3275 VMOVHPD %XMM12,0x8(%R9) |
(5) 0x327b VMOVUPD %XMM12,(%R8) |
(5) 0x3280 CMP %RAX,%R13 |
(5) 0x3283 JNE 323a |
(4) 0x3285 MOV 0x10(%RBP),%ECX |
(4) 0x3288 MOV -0x64(%RBP),%R12D |
(4) 0x328c MOV -0x70(%RBP),%RSP |
(4) 0x3290 ADD %ECX,-0x68(%RBP) |
(4) 0x3293 CMP %R12D,-0x8c(%RBP) |
(4) 0x329a JNE 2fb0 |
0x32a0 MOV -0x38(%RBP),%RAX |
0x32a4 SUB %FS:0x28,%RAX |
0x32ad JNE 32ca |
0x32af LEA -0x28(%RBP),%RSP |
0x32b3 POP %RBX |
0x32b4 POP %R12 |
0x32b6 POP %R13 |
0x32b8 POP %R14 |
0x32ba POP %R15 |
0x32bc POP %RBP |
0x32bd RET |
0x32be XCHG %AX,%AX |
(4) 0x32c0 TEST %EBX,%EBX |
(4) 0x32c2 JG 3051 |
(4) 0x32c8 JMP 3285 |
0x32ca CALL 2130 <__stack_chk_fail@plt> |
0x32cf NOP |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-funroll |
| min | med | avg | max |
|---|---|---|---|
| Percentile Index | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
|---|---|---|---|---|---|---|---|---|---|---|
| Value |
| min | med | avg | max |
|---|---|---|---|
| Percentile Index | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 100 |
|---|---|---|---|---|---|---|---|---|---|---|
| Value |
| Path / |
The code analyzed by CQA in that panel excludes loops and represents 0.00% of application time for run run_1_thread
| Source file and lines | main.cpp:67-108 |
| Module | kmeans-gcc-O3-funroll |
| nb instructions | 60 |
| nb uops | 63 |
| loop length | 265 |
| used x86 registers | 15 |
| used mmx registers | 0 |
| used xmm registers | 4 |
| used ymm registers | 0 |
| used zmm registers | 0 |
| nb stack references | 17 |
| micro-operation queue | 15.75 cycles |
| front end | 15.75 cycles |
| P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | |
|---|---|---|---|---|---|---|---|---|
| uops | 6.50 | 6.50 | 10.67 | 10.67 | 21.00 | 6.50 | 6.50 | 10.67 |
| cycles | 6.50 | 6.50 | 10.67 | 10.67 | 21.00 | 6.50 | 6.50 | 10.67 |
| Cycles executing div or sqrt instructions | NA |
| FE+BE cycles | 20.11 |
| Stall cycles | 4.20 |
| SB full (events) | 6.53 |
| Front-end | 15.75 |
| Dispatch | 21.00 |
| Overall L1 | 21.00 |
| all | 3% |
| load | NA (no load vectorizable/vectorized instructions) |
| store | 7% |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | 0% |
| all | 11% |
| load | NA (no load vectorizable/vectorized instructions) |
| store | 12% |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | 10% |
| Instruction | Nb FU | P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | Latency | Recip. throughput | Vectorization |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PUSH %RBP | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| MOV %RSP,%RBP | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| PUSH %R15 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R14 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R13 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R12 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %RBX | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| SUB $0xb8,%RSP | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| MOV %EDI,-0x8c(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (6.3%) |
| MOV %RSI,-0x88(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RDX,-0xc8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %FS:0x28,%R11 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| MOV %R11,-0x38(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV 0x10(%RBP),%R11D | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| TEST %EDI,%EDI | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JLE 32a0 <_Z7k_meansiP7point_tS0_PiS0_ii+0x3d0> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOVSXD %R11D,%R13 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| VMOVQ %RSI,%XMM4 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | scal (12.5%) |
| LEA -0x1(%R11),%EAX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| MOV %R11D,-0x68(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (6.3%) |
| LEA 0xf(,%R13,4),%RSI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| LEA 0xf(,%R13,8),%RDI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| INC %RAX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| MOVL $0,-0x64(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 2 | 1 | scal (6.3%) |
| SHR $0x4,%RSI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| SHR $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| LEA (,%RAX,4),%RBX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| VPINSRQ $0x1,%RDX,%XMM4,%XMM3 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 3 | 2 | scal (12.5%) |
| SAL $0x3,%RAX | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | N/A |
| LEA -0x60(%RBP),%RDX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| SAL $0x4,%RSI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| VMOVD %R9D,%XMM6 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | scal (6.3%) |
| SAL $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| MOV %RAX,-0x78(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| VPINSRD $0x1,%R11D,%XMM6,%XMM5 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 3 | 2 | scal (6.3%) |
| MOV %RCX,%R15 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (12.5%) |
| MOV %RDX,-0xc0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RSI,-0xb0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RDI,-0xb8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %R8,-0xd8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RBX,-0xd0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %R9D,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| VMOVDQA %XMM3,-0xa0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 4 | 1 | vect (25.0%) |
| VMOVQ %XMM5,-0xa8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| MOV -0x38(%RBP),%RAX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| SUB %FS:0x28,%RAX | 1 | 0.25 | 0.25 | 0.50 | 0.50 | 0 | 0.25 | 0.25 | 0 | 1 | 0.50 | N/A |
| JNE 32ca <_Z7k_meansiP7point_tS0_PiS0_ii+0x3fa> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| LEA -0x28(%RBP),%RSP | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| POP %RBX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R12 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R13 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R14 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R15 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %RBP | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| RET | 1 | 0 | 0 | 0.33 | 0.33 | 0 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| XCHG %AX,%AX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| CALL 2130 <__stack_chk_fail@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| NOP | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
The code analyzed by CQA in that panel excludes loops and represents 0.00% of application time for run run_1_thread
| Source file and lines | main.cpp:67-108 |
| Module | kmeans-gcc-O3-funroll |
| nb instructions | 60 |
| nb uops | 63 |
| loop length | 265 |
| used x86 registers | 15 |
| used mmx registers | 0 |
| used xmm registers | 4 |
| used ymm registers | 0 |
| used zmm registers | 0 |
| nb stack references | 17 |
| micro-operation queue | 15.75 cycles |
| front end | 15.75 cycles |
| P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | |
|---|---|---|---|---|---|---|---|---|
| uops | 6.50 | 6.50 | 10.67 | 10.67 | 21.00 | 6.50 | 6.50 | 10.67 |
| cycles | 6.50 | 6.50 | 10.67 | 10.67 | 21.00 | 6.50 | 6.50 | 10.67 |
| Cycles executing div or sqrt instructions | NA |
| FE+BE cycles | 20.11 |
| Stall cycles | 4.20 |
| SB full (events) | 6.53 |
| Front-end | 15.75 |
| Dispatch | 21.00 |
| Overall L1 | 21.00 |
| all | 3% |
| load | NA (no load vectorizable/vectorized instructions) |
| store | 7% |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | 0% |
| all | 11% |
| load | NA (no load vectorizable/vectorized instructions) |
| store | 12% |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | 10% |
| Instruction | Nb FU | P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | Latency | Recip. throughput | Vectorization |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| PUSH %RBP | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| MOV %RSP,%RBP | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| PUSH %R15 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R14 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R13 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %R12 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| PUSH %RBX | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| SUB $0xb8,%RSP | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| MOV %EDI,-0x8c(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (6.3%) |
| MOV %RSI,-0x88(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RDX,-0xc8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %FS:0x28,%R11 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| MOV %R11,-0x38(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV 0x10(%RBP),%R11D | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| TEST %EDI,%EDI | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JLE 32a0 <_Z7k_meansiP7point_tS0_PiS0_ii+0x3d0> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOVSXD %R11D,%R13 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| VMOVQ %RSI,%XMM4 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1 | 1 | scal (12.5%) |
| LEA -0x1(%R11),%EAX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| MOV %R11D,-0x68(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (6.3%) |
| LEA 0xf(,%R13,4),%RSI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| LEA 0xf(,%R13,8),%RDI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| INC %RAX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| MOVL $0,-0x64(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 2 | 1 | scal (6.3%) |
| SHR $0x4,%RSI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| SHR $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| LEA (,%RAX,4),%RBX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| VPINSRQ $0x1,%RDX,%XMM4,%XMM3 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 3 | 2 | scal (12.5%) |
| SAL $0x3,%RAX | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | N/A |
| LEA -0x60(%RBP),%RDX | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| SAL $0x4,%RSI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| VMOVD %R9D,%XMM6 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 1 | scal (6.3%) |
| SAL $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| MOV %RAX,-0x78(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| VPINSRD $0x1,%R11D,%XMM6,%XMM5 | 2 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 3 | 2 | scal (6.3%) |
| MOV %RCX,%R15 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (12.5%) |
| MOV %RDX,-0xc0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RSI,-0xb0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RDI,-0xb8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %R8,-0xd8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %RBX,-0xd0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| MOV %R9D,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| VMOVDQA %XMM3,-0xa0(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 4 | 1 | vect (25.0%) |
| VMOVQ %XMM5,-0xa8(%RBP) | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | scal (12.5%) |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| MOV -0x38(%RBP),%RAX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| SUB %FS:0x28,%RAX | 1 | 0.25 | 0.25 | 0.50 | 0.50 | 0 | 0.25 | 0.25 | 0 | 1 | 0.50 | N/A |
| JNE 32ca <_Z7k_meansiP7point_tS0_PiS0_ii+0x3fa> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| LEA -0x28(%RBP),%RSP | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| POP %RBX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R12 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R13 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R14 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %R15 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| POP %RBP | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 2 | 0.50 | N/A |
| RET | 1 | 0 | 0 | 0.33 | 0.33 | 0 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| XCHG %AX,%AX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| CALL 2130 <__stack_chk_fail@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| NOP | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| Run run_1_thread | Number processes: 1Number nodes: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: trueOMP_NUM_THREADS: 1 |
|---|---|
| Run run_2_threads | Number processes: 1Number nodes: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: trueOMP_NUM_THREADS: 2 |
| Run run_4_threads | Number processes: 1Number nodes: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: trueOMP_NUM_THREADS: 4 |
| Run run_8_threads | Number processes: 1Number nodes: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: trueOMP_NUM_THREADS: 8 |
| Run run_10_threads | Number processes: 1Number nodes: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: trueOMP_NUM_THREADS: 10 |
| (run_1_thread) Efficiency | (run_1_thread) Potential Speed-Up (%) | (run_2_threads) Efficiency | (run_2_threads) Potential Speed-Up (%) | (run_4_threads) Efficiency | (run_4_threads) Potential Speed-Up (%) | (run_8_threads) Efficiency | (run_8_threads) Potential Speed-Up (%) | (run_10_threads) Efficiency | (run_10_threads) Potential Speed-Up (%) |
|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0.94 | 0.4 | 0.85 | 0.96 | 0.7 | 1.8 | 0.65 | 2.12 |
| Run | Number of threads | Efficiency (ideal is 1) | Speedup | Ideal Speedup | Time (s) | Coverage (%) |
|---|---|---|---|---|---|---|
| run_1_thread | 1 | 1 | 1 | 1 | 7.1599998474121 | 6.7091455459595 |
| run_2_threads | 1 | 0.94 | 1.88 | 2 | 7.1600003242493 | 6.5588788986206 |
| run_4_threads | 1 | 0.85 | 3.38 | 4 | 7.1499996185303 | 6.2284936904907 |
| run_8_threads | 1 | 0.7 | 5.64 | 8 | 7.1649994850159 | 6.0916509628296 |
| run_10_threads | 1 | 0.65 | 6.51 | 10 | 7.1550002098083 | 6.0669012069702 |
| Name | Coverage (%) | Time (s) |
|---|---|---|
| ▼k_means(int, point_t*, point_t*, int*, point_t*, int, int)– | 6.71 | 7.16 |
| ▼Loop 4 - main.cpp:68-107 - kmeans-gcc-O3-funroll– | 0.00 | 0.00 |
| ○Loop 6 - main.cpp:93-96 - kmeans-gcc-O3-funroll | 6.71 | 7.16 |
| ○Loop 5 - main.cpp:98-104 - kmeans-gcc-O3-funroll | 0.00 | 0.00 |
