| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) | Module: kmeans-gcc-O3-all | Source: main.cpp:67-108 [...] | Coverage (incl. loops): 6.90% | (excl. loops): 0.00% |
|---|
| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) | Module: kmeans-gcc-O3-all | Source: main.cpp:67-108 [...] | Coverage (incl. loops): 6.90% | (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: } |
0x2f20 PUSH %RBP |
0x2f21 MOV %RSP,%RBP |
0x2f24 PUSH %R15 |
0x2f26 PUSH %R14 |
0x2f28 PUSH %R13 |
0x2f2a PUSH %R12 |
0x2f2c PUSH %RBX |
0x2f2d SUB $0xb8,%RSP |
0x2f34 MOV %EDI,-0x8c(%RBP) |
0x2f3a MOV %RSI,-0x88(%RBP) |
0x2f41 MOV %RDX,-0xc8(%RBP) |
0x2f48 MOV %FS:0x28,%R11 |
0x2f51 MOV %R11,-0x38(%RBP) |
0x2f55 MOV 0x10(%RBP),%R11D |
0x2f59 TEST %EDI,%EDI |
0x2f5b JLE 32f0 |
0x2f61 MOVSXD %R11D,%R13 |
0x2f64 VMOVQ %RSI,%XMM4 |
0x2f69 LEA -0x1(%R11),%EAX |
0x2f6d MOV %R11D,-0x68(%RBP) |
0x2f71 LEA 0xf(,%R13,4),%RSI |
0x2f79 LEA 0xf(,%R13,8),%RDI |
0x2f81 INC %RAX |
0x2f84 MOVL $0,-0x64(%RBP) |
0x2f8b SHR $0x4,%RSI |
0x2f8f SHR $0x4,%RDI |
0x2f93 LEA (,%RAX,4),%RBX |
0x2f9b VPINSRQ $0x1,%RDX,%XMM4,%XMM3 |
0x2fa1 SAL $0x3,%RAX |
0x2fa5 LEA -0x60(%RBP),%RDX |
0x2fa9 SAL $0x4,%RSI |
0x2fad VMOVD %R9D,%XMM6 |
0x2fb2 SAL $0x4,%RDI |
0x2fb6 MOV %RAX,-0x78(%RBP) |
0x2fba VPINSRD $0x1,%R11D,%XMM6,%XMM5 |
0x2fc0 MOV %RCX,%R15 |
0x2fc3 MOV %RDX,-0xc0(%RBP) |
0x2fca MOV %RSI,-0xb0(%RBP) |
0x2fd1 MOV %RDI,-0xb8(%RBP) |
0x2fd8 MOV %R8,-0xd8(%RBP) |
0x2fdf MOV %RBX,-0xd0(%RBP) |
0x2fe6 MOV %R9D,%EBX |
0x2fe9 VMOVDQA %XMM3,-0xa0(%RBP) |
0x2ff1 VMOVQ %XMM5,-0xa8(%RBP) |
0x2ff9 NOPL (%RAX) |
(4) 0x3000 MOV -0xa8(%RBP),%RCX |
(4) 0x3007 VMOVDQA -0xa0(%RBP),%XMM0 |
(4) 0x300f XOR %EDX,%EDX |
(4) 0x3011 LEA -0x5f8(%RIP),%RDI |
(4) 0x3018 MOV -0xc0(%RBP),%RSI |
(4) 0x301f MOV %RSP,-0x70(%RBP) |
(4) 0x3023 MOV %RCX,-0x48(%RBP) |
(4) 0x3027 XOR %ECX,%ECX |
(4) 0x3029 MOV %R15,-0x50(%RBP) |
(4) 0x302d VMOVDQA %XMM0,-0x60(%RBP) |
(4) 0x3032 CALL 21e0 <GOMP_parallel@plt> |
(4) 0x3037 MOV -0xb8(%RBP),%R8 |
(4) 0x303e SUB -0xb0(%RBP),%RSP |
(4) 0x3045 MOV %RSP,%RCX |
(4) 0x3048 MOV 0x10(%RBP),%R9D |
(4) 0x304c SUB %R8,%RSP |
(4) 0x304f MOV %RSP,%R12 |
(4) 0x3052 SUB %R8,%RSP |
(4) 0x3055 INCL -0x64(%RBP) |
(4) 0x3058 MOV %RSP,%R14 |
(4) 0x305b TEST %R9D,%R9D |
(4) 0x305e JLE 3310 |
(4) 0x3064 MOV -0xd0(%RBP),%RDX |
(4) 0x306b MOV %RCX,%RDI |
(4) 0x306e XOR %ESI,%ESI |
(4) 0x3070 MOV %RCX,-0x80(%RBP) |
(4) 0x3074 CALL 20c0 <memset@plt> |
(4) 0x3079 MOV -0x78(%RBP),%RDX |
(4) 0x307d XOR %ESI,%ESI |
(4) 0x307f MOV %R12,%RDI |
(4) 0x3082 CALL 20c0 <memset@plt> |
(4) 0x3087 MOV -0x78(%RBP),%RDX |
(4) 0x308b XOR %ESI,%ESI |
(4) 0x308d MOV %RSP,%RDI |
(4) 0x3090 CALL 20c0 <memset@plt> |
(4) 0x3095 TEST %EBX,%EBX |
(4) 0x3097 MOV -0x80(%RBP),%RCX |
(4) 0x309b JLE 325b |
(4) 0x30a1 MOVSXD (%R15),%R11 |
(4) 0x30a4 MOV -0x88(%RBP),%RSI |
(4) 0x30ab LEA -0x1(%RBX),%R10D |
(4) 0x30af MOV $0x1,%EDI |
(4) 0x30b4 AND $0x3,%R10D |
(4) 0x30b8 VMOVSD (%R12,%R11,8),%XMM1 |
(4) 0x30be VMOVSD (%R14,%R11,8),%XMM7 |
(4) 0x30c4 LEA 0x10(%RSI),%RAX |
(4) 0x30c8 INCL (%RCX,%R11,4) |
(4) 0x30cc VADDSD (%RSI),%XMM1,%XMM2 |
(4) 0x30d0 VADDSD 0x8(%RSI),%XMM7,%XMM8 |
(4) 0x30d5 VMOVSD %XMM2,(%R12,%R11,8) |
(4) 0x30db VMOVSD %XMM8,(%R14,%R11,8) |
(4) 0x30e1 CMP $0x1,%EBX |
(4) 0x30e4 JLE 3254 |
(4) 0x30ea TEST %R10D,%R10D |
(4) 0x30ed JE 319b |
(4) 0x30f3 CMP $0x1,%R10D |
(4) 0x30f7 JE 3162 |
(4) 0x30f9 CMP $0x2,%R10D |
(4) 0x30fd JE 3131 |
(4) 0x30ff MOVSXD 0x4(%R15),%RDX |
(4) 0x3103 MOV $0x2,%EDI |
(4) 0x3108 VMOVSD (%R12,%RDX,8),%XMM9 |
(4) 0x310e VMOVSD (%R14,%RDX,8),%XMM11 |
(4) 0x3114 INCL (%RCX,%RDX,4) |
(4) 0x3117 VADDSD 0x8(%RAX),%XMM11,%XMM12 |
(4) 0x311c VADDSD 0x10(%RSI),%XMM9,%XMM10 |
(4) 0x3121 LEA 0x20(%RSI),%RAX |
(4) 0x3125 VMOVSD %XMM10,(%R12,%RDX,8) |
(4) 0x312b VMOVSD %XMM12,(%R14,%RDX,8) |
(4) 0x3131 MOVSXD (%R15,%RDI,4),%R8 |
(4) 0x3135 ADD $0x10,%RAX |
(4) 0x3139 INC %RDI |
(4) 0x313c VMOVSD (%R12,%R8,8),%XMM13 |
(4) 0x3142 VMOVSD (%R14,%R8,8),%XMM15 |
(4) 0x3148 INCL (%RCX,%R8,4) |
(4) 0x314c VADDSD -0x10(%RAX),%XMM13,%XMM14 |
(4) 0x3151 VADDSD -0x8(%RAX),%XMM15,%XMM4 |
(4) 0x3156 VMOVSD %XMM14,(%R12,%R8,8) |
(4) 0x315c VMOVSD %XMM4,(%R14,%R8,8) |
(4) 0x3162 MOVSXD (%R15,%RDI,4),%R9 |
(4) 0x3166 INC %RDI |
(4) 0x3169 ADD $0x10,%RAX |
(4) 0x316d VMOVSD (%R12,%R9,8),%XMM3 |
(4) 0x3173 VMOVSD (%R14,%R9,8),%XMM5 |
(4) 0x3179 INCL (%RCX,%R9,4) |
(4) 0x317d VADDSD -0x10(%RAX),%XMM3,%XMM6 |
(4) 0x3182 VADDSD -0x8(%RAX),%XMM5,%XMM0 |
(4) 0x3187 VMOVSD %XMM6,(%R12,%R9,8) |
(4) 0x318d VMOVSD %XMM0,(%R14,%R9,8) |
(4) 0x3193 CMP %EDI,%EBX |
(4) 0x3195 JLE 3254 |
(6) 0x319b MOVSXD (%R15,%RDI,4),%R10 |
(6) 0x319f MOVSXD 0x4(%R15,%RDI,4),%R11 |
(6) 0x31a4 ADD $0x40,%RAX |
(6) 0x31a8 MOVSXD 0x8(%R15,%RDI,4),%RSI |
(6) 0x31ad MOVSXD 0xc(%R15,%RDI,4),%RDX |
(6) 0x31b2 ADD $0x4,%RDI |
(6) 0x31b6 VMOVSD (%R12,%R10,8),%XMM1 |
(6) 0x31bc VMOVSD (%R14,%R10,8),%XMM7 |
(6) 0x31c2 INCL (%RCX,%R10,4) |
(6) 0x31c6 VADDSD -0x40(%RAX),%XMM1,%XMM2 |
(6) 0x31cb VADDSD -0x38(%RAX),%XMM7,%XMM8 |
(6) 0x31d0 VMOVSD %XMM2,(%R12,%R10,8) |
(6) 0x31d6 VMOVSD (%R12,%R11,8),%XMM9 |
(6) 0x31dc VMOVSD %XMM8,(%R14,%R10,8) |
(6) 0x31e2 VMOVSD (%R14,%R11,8),%XMM11 |
(6) 0x31e8 INCL (%RCX,%R11,4) |
(6) 0x31ec VADDSD -0x30(%RAX),%XMM9,%XMM10 |
(6) 0x31f1 VADDSD -0x28(%RAX),%XMM11,%XMM12 |
(6) 0x31f6 VMOVSD %XMM10,(%R12,%R11,8) |
(6) 0x31fc VMOVSD (%R12,%RSI,8),%XMM13 |
(6) 0x3202 VMOVSD %XMM12,(%R14,%R11,8) |
(6) 0x3208 VMOVSD (%R14,%RSI,8),%XMM15 |
(6) 0x320e INCL (%RCX,%RSI,4) |
(6) 0x3211 VADDSD -0x20(%RAX),%XMM13,%XMM14 |
(6) 0x3216 VADDSD -0x18(%RAX),%XMM15,%XMM4 |
(6) 0x321b VMOVSD %XMM14,(%R12,%RSI,8) |
(6) 0x3221 VMOVSD (%R12,%RDX,8),%XMM3 |
(6) 0x3227 INCL (%RCX,%RDX,4) |
(6) 0x322a VMOVSD %XMM4,(%R14,%RSI,8) |
(6) 0x3230 VADDSD -0x10(%RAX),%XMM3,%XMM6 |
(6) 0x3235 VMOVSD %XMM6,(%R12,%RDX,8) |
(6) 0x323b VMOVSD (%R14,%RDX,8),%XMM5 |
(6) 0x3241 VADDSD -0x8(%RAX),%XMM5,%XMM0 |
(6) 0x3246 VMOVSD %XMM0,(%R14,%RDX,8) |
(6) 0x324c CMP %EDI,%EBX |
(6) 0x324e JG 319b |
(4) 0x3254 MOV 0x10(%RBP),%EDI |
(4) 0x3257 TEST %EDI,%EDI |
(4) 0x3259 JLE 32d5 |
(4) 0x325b MOVSXD -0x68(%RBP),%R8 |
(4) 0x325f MOV -0xc8(%RBP),%R9 |
(4) 0x3266 XOR %EAX,%EAX |
(4) 0x3268 SAL $0x4,%R8 |
(4) 0x326c ADD -0xd8(%RBP),%R8 |
(4) 0x3273 JMP 3292 |
0x3275 NOPL (%RAX) |
(5) 0x3278 VMOVUPD (%R9),%XMM1 |
(5) 0x327d INC %RAX |
(5) 0x3280 VMOVUPD %XMM1,(%R8) |
(5) 0x3285 CMP %RAX,%R13 |
(5) 0x3288 JE 32d5 |
(5) 0x328a ADD $0x10,%R8 |
(5) 0x328e ADD $0x10,%R9 |
(5) 0x3292 MOV (%RCX,%RAX,4),%R10D |
(5) 0x3296 TEST %R10D,%R10D |
(5) 0x3299 JE 3278 |
(5) 0x329b VMOVSD (%R12,%RAX,8),%XMM8 |
(5) 0x32a1 VXORPD %XMM2,%XMM2,%XMM2 |
(5) 0x32a5 VCVTSI2SD %R10D,%XMM2,%XMM7 |
(5) 0x32aa VMOVDDUP %XMM7,%XMM11 |
(5) 0x32ae VDIVSD %XMM7,%XMM8,%XMM9 |
(5) 0x32b2 VMOVSD %XMM9,(%R9) |
(5) 0x32b7 VMOVHPD (%R14,%RAX,8),%XMM8,%XMM10 |
(5) 0x32bd VDIVPD %XMM11,%XMM10,%XMM12 |
(5) 0x32c2 INC %RAX |
(5) 0x32c5 VMOVHPD %XMM12,0x8(%R9) |
(5) 0x32cb VMOVUPD %XMM12,(%R8) |
(5) 0x32d0 CMP %RAX,%R13 |
(5) 0x32d3 JNE 328a |
(4) 0x32d5 MOV 0x10(%RBP),%ECX |
(4) 0x32d8 MOV -0x64(%RBP),%R12D |
(4) 0x32dc MOV -0x70(%RBP),%RSP |
(4) 0x32e0 ADD %ECX,-0x68(%RBP) |
(4) 0x32e3 CMP %R12D,-0x8c(%RBP) |
(4) 0x32ea JNE 3000 |
0x32f0 MOV -0x38(%RBP),%RAX |
0x32f4 SUB %FS:0x28,%RAX |
0x32fd JNE 331a |
0x32ff LEA -0x28(%RBP),%RSP |
0x3303 POP %RBX |
0x3304 POP %R12 |
0x3306 POP %R13 |
0x3308 POP %R14 |
0x330a POP %R15 |
0x330c POP %RBP |
0x330d RET |
0x330e XCHG %AX,%AX |
(4) 0x3310 TEST %EBX,%EBX |
(4) 0x3312 JG 30a1 |
(4) 0x3318 JMP 32d5 |
0x331a CALL 2130 <__stack_chk_fail@plt> |
0x331f NOP |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-all |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-all |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-all |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-all |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-all |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-all |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-all |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-all |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►100.00+ | main | main.cpp:139 | kmeans-gcc-O3-all |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:896 | kmeans-gcc-O3-all |
| 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-all |
| 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 32f0 <_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 331a <_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-all |
| 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 32f0 <_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 331a <_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.39 | 0.84 | 1 | 0.71 | 1.77 | 0.66 | 2.06 |
| Run | Number of threads | Efficiency (ideal is 1) | Speedup | Ideal Speedup | Time (s) | Coverage (%) |
|---|---|---|---|---|---|---|
| run_1_thread | 1 | 1 | 1 | 1 | 7.1749982833862 | 6.8957223892212 |
| run_2_threads | 1 | 0.94 | 1.88 | 2 | 7.1449980735779 | 6.7326264381409 |
| run_4_threads | 1 | 0.84 | 3.38 | 4 | 7.1550002098083 | 6.3981046676636 |
| run_8_threads | 1 | 0.71 | 5.69 | 8 | 7.1349997520447 | 6.1194739341736 |
| run_10_threads | 1 | 0.66 | 6.6 | 10 | 7.175000667572 | 6.0663723945618 |
| Name | Coverage (%) | Time (s) |
|---|---|---|
| ▼k_means(int, point_t*, point_t*, int*, point_t*, int, int)– | 6.90 | 7.17 |
| ▼Loop 4 - main.cpp:68-107 - kmeans-gcc-O3-all– | 0.00 | 0.00 |
| ○Loop 6 - main.cpp:93-96 - kmeans-gcc-O3-all | 6.90 | 7.17 |
| ○Loop 5 - main.cpp:98-104 - kmeans-gcc-O3-all | 0.00 | 0.00 |
