| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) [clone ._omp_fn.0] | Module: kmeans-gcc-O3-funroll | Source: main.cpp:58-67 | Coverage (incl. loops): 93.29% | (excl. loops): 0.00% |
|---|
| Function: k_means(int, point_t*, point_t*, int*, point_t*, int, int) [clone ._omp_fn.0] | Module: kmeans-gcc-O3-funroll | Source: main.cpp:58-67 | Coverage (incl. loops): 93.29% | (excl. loops): 0.00% |
|---|
/home/fmusial/KMEANS_Benchmarks/kmeans/main.cpp: 58 - 67 |
-------------------------------------------------------------------------------- |
58: #pragma omp parallel for |
59: for (int i = 0; i < n; ++i) { |
60: double optimal_dist = DBL_MAX; |
61: for (int j = 0; j < k; ++j) { |
62: double dist = |
63: (points[i].x - centroids[j].x) * (points[i].x - centroids[j].x) + |
64: (points[i].y - centroids[j].y) * (points[i].y - centroids[j].y); |
65: if (dist < optimal_dist) { |
66: optimal_dist = dist; |
67: assignment[i] = j; |
0x29c0 PUSH %RBP |
0x29c1 MOV %RSP,%RBP |
0x29c4 PUSH %R12 |
0x29c6 MOV %RDI,%R12 |
0x29c9 PUSH %RBX |
0x29ca CALL 2260 <omp_get_num_threads@plt> |
0x29cf MOV %EAX,%EBX |
0x29d1 CALL 21d0 <omp_get_thread_num@plt> |
0x29d6 MOV %EAX,%ECX |
0x29d8 MOV 0x18(%R12),%EAX |
0x29dd CLTD |
0x29de IDIV %EBX |
0x29e0 CMP %EDX,%ECX |
0x29e2 JL 2ba1 |
0x29e8 IMUL %EAX,%ECX |
0x29eb ADD %ECX,%EDX |
0x29ed LEA (%RAX,%RDX,1),%ESI |
0x29f0 CMP %ESI,%EDX |
0x29f2 JGE 2b9c |
0x29f8 MOV 0x1c(%R12),%R8D |
0x29fd MOV 0x10(%R12),%R11 |
0x2a02 MOV 0x8(%R12),%R9 |
0x2a07 MOV (%R12),%R10 |
0x2a0b TEST %R8D,%R8D |
0x2a0e JLE 2b9c |
0x2a14 MOVSXD %EDX,%R12 |
0x2a17 MOV %EAX,%EBX |
0x2a19 VMOVSD 0x1727(%RIP),%XMM5 |
0x2a21 MOV %R12,%RDI |
0x2a24 ADD %R12,%RBX |
0x2a27 LEA (%R11,%R12,4),%RSI |
0x2a2b SAL $0x4,%RDI |
0x2a2f SAL $0x4,%RBX |
0x2a33 ADD %R10,%RDI |
0x2a36 ADD %RBX,%R10 |
0x2a39 NOPL (%RAX) |
(2) 0x2a40 MOV %R8D,%ECX |
(2) 0x2a43 VMOVSD (%RDI),%XMM3 |
(2) 0x2a47 VMOVSD 0x8(%RDI),%XMM2 |
(2) 0x2a4c MOV %R9,%RBX |
(2) 0x2a4f XOR %EDX,%EDX |
(2) 0x2a51 VMOVAPD %XMM5,%XMM0 |
(2) 0x2a55 AND $0x3,%ECX |
(2) 0x2a58 JE 2ae9 |
(2) 0x2a5e CMP $0x1,%ECX |
(2) 0x2a61 JE 2aba |
(2) 0x2a63 CMP $0x2,%ECX |
(2) 0x2a66 JE 2a95 |
(2) 0x2a68 VSUBSD 0x8(%R9),%XMM2,%XMM4 |
(2) 0x2a6e VSUBSD (%R9),%XMM3,%XMM1 |
(2) 0x2a73 VMULSD %XMM4,%XMM4,%XMM6 |
(2) 0x2a77 VFMADD132SD %XMM1,%XMM6,%XMM1 |
(2) 0x2a7c VCOMISD %XMM1,%XMM5 |
(2) 0x2a80 JBE 2a8c |
(2) 0x2a82 MOVL $0,(%RSI) |
(2) 0x2a88 VMOVAPD %XMM1,%XMM0 |
(2) 0x2a8c MOV $0x1,%EDX |
(2) 0x2a91 LEA 0x10(%R9),%RBX |
(2) 0x2a95 VSUBSD 0x8(%RBX),%XMM2,%XMM8 |
(2) 0x2a9a VSUBSD (%RBX),%XMM3,%XMM7 |
(2) 0x2a9e VMULSD %XMM8,%XMM8,%XMM9 |
(2) 0x2aa3 VFMADD132SD %XMM7,%XMM9,%XMM7 |
(2) 0x2aa8 VCOMISD %XMM7,%XMM0 |
(2) 0x2aac JBE 2ab4 |
(2) 0x2aae MOV %EDX,(%RSI) |
(2) 0x2ab0 VMOVAPD %XMM7,%XMM0 |
(2) 0x2ab4 INC %EDX |
(2) 0x2ab6 ADD $0x10,%RBX |
(2) 0x2aba VSUBSD 0x8(%RBX),%XMM2,%XMM11 |
(2) 0x2abf VSUBSD (%RBX),%XMM3,%XMM10 |
(2) 0x2ac3 VMULSD %XMM11,%XMM11,%XMM12 |
(2) 0x2ac8 VFMADD132SD %XMM10,%XMM12,%XMM10 |
(2) 0x2acd VCOMISD %XMM10,%XMM0 |
(2) 0x2ad2 JBE 2ada |
(2) 0x2ad4 MOV %EDX,(%RSI) |
(2) 0x2ad6 VMOVAPD %XMM10,%XMM0 |
(2) 0x2ada INC %EDX |
(2) 0x2adc ADD $0x10,%RBX |
(2) 0x2ae0 CMP %EDX,%R8D |
(2) 0x2ae3 JE 2b8b |
(1) 0x2ae9 VSUBSD 0x8(%RBX),%XMM2,%XMM14 |
(1) 0x2aee VSUBSD (%RBX),%XMM3,%XMM13 |
(1) 0x2af2 VMULSD %XMM14,%XMM14,%XMM15 |
(1) 0x2af7 VFMADD132SD %XMM13,%XMM15,%XMM13 |
(1) 0x2afc VCOMISD %XMM13,%XMM0 |
(1) 0x2b01 JBE 2b09 |
(1) 0x2b03 MOV %EDX,(%RSI) |
(1) 0x2b05 VMOVAPD %XMM13,%XMM0 |
(1) 0x2b09 VSUBSD 0x18(%RBX),%XMM2,%XMM4 |
(1) 0x2b0e VSUBSD 0x10(%RBX),%XMM3,%XMM1 |
(1) 0x2b13 INC %EDX |
(1) 0x2b15 LEA 0x10(%RBX),%R11 |
(1) 0x2b19 VMULSD %XMM4,%XMM4,%XMM6 |
(1) 0x2b1d VFMADD132SD %XMM1,%XMM6,%XMM1 |
(1) 0x2b22 VCOMISD %XMM1,%XMM0 |
(1) 0x2b26 JBE 2b2e |
(1) 0x2b28 MOV %EDX,(%RSI) |
(1) 0x2b2a VMOVAPD %XMM1,%XMM0 |
(1) 0x2b2e VSUBSD 0x18(%R11),%XMM2,%XMM8 |
(1) 0x2b34 VSUBSD 0x10(%R11),%XMM3,%XMM7 |
(1) 0x2b3a LEA 0x1(%RDX),%EAX |
(1) 0x2b3d VMULSD %XMM8,%XMM8,%XMM9 |
(1) 0x2b42 VFMADD132SD %XMM7,%XMM9,%XMM7 |
(1) 0x2b47 VCOMISD %XMM7,%XMM0 |
(1) 0x2b4b JBE 2b53 |
(1) 0x2b4d MOV %EAX,(%RSI) |
(1) 0x2b4f VMOVAPD %XMM7,%XMM0 |
(1) 0x2b53 VSUBSD 0x28(%R11),%XMM2,%XMM11 |
(1) 0x2b59 VSUBSD 0x20(%R11),%XMM3,%XMM10 |
(1) 0x2b5f LEA 0x2(%RDX),%R12D |
(1) 0x2b63 VMULSD %XMM11,%XMM11,%XMM12 |
(1) 0x2b68 VFMADD132SD %XMM10,%XMM12,%XMM10 |
(1) 0x2b6d VCOMISD %XMM10,%XMM0 |
(1) 0x2b72 JBE 2b7b |
(1) 0x2b74 MOV %R12D,(%RSI) |
(1) 0x2b77 VMOVAPD %XMM10,%XMM0 |
(1) 0x2b7b ADD $0x3,%EDX |
(1) 0x2b7e LEA 0x30(%R11),%RBX |
(1) 0x2b82 CMP %EDX,%R8D |
(1) 0x2b85 JNE 2ae9 |
(2) 0x2b8b ADD $0x10,%RDI |
(2) 0x2b8f ADD $0x4,%RSI |
(2) 0x2b93 CMP %RDI,%R10 |
(2) 0x2b96 JNE 2a40 |
0x2b9c POP %RBX |
0x2b9d POP %R12 |
0x2b9f POP %RBP |
0x2ba0 RET |
0x2ba1 INC %EAX |
0x2ba3 XOR %EDX,%EDX |
0x2ba5 JMP 29e8 |
0x2baa NOPW (%RAX,%RAX,1) |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►98.59+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►48.94+ | gomp_thread_start | team.c:130 | libgomp.so.1.0.0 |
| ○ | pthread_condattr_setpshared | libc.so.6 | |
| ○ | __clone | libc.so.6 | |
| ►48.33+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►69.74+ | gomp_thread_start | team.c:130 | libgomp.so.1.0.0 |
| ○ | pthread_condattr_setpshared | libc.so.6 | |
| ○ | __clone | libc.so.6 | |
| ►23.60+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►86.52+ | gomp_thread_start | team.c:130 | libgomp.so.1.0.0 |
| ○ | pthread_condattr_setpshared | libc.so.6 | |
| ○ | __clone | libc.so.6 | |
| ►12.50+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►93.50+ | gomp_thread_start | team.c:130 | libgomp.so.1.0.0 |
| ○ | pthread_condattr_setpshared | libc.so.6 | |
| ○ | __clone | libc.so.6 | |
| ►6.24+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | kmeans-gcc-O3-funroll |
| Coverage (%) | Name | Source Location | Module |
|---|---|---|---|
| ►96.02+ | gomp_thread_start | team.c:130 | libgomp.so.1.0.0 |
| ○ | pthread_condattr_setpshared | libc.so.6 | |
| ○ | __clone | libc.so.6 | |
| ►3.85+ | GOMP_parallel | parallel.c:140 | libgomp.so.1.0.0 |
| ○ | k_means(int, point_t*, point_t[...] | main.cpp:73 | kmeans-gcc-O3-funroll |
| ○ | main | main.cpp:20 | kmeans-gcc-O3-funroll |
| ○ | __libc_init_first | libc.so.6 | |
| ○ | __libc_start_main | libc.so.6 | |
| ○ | _start | basic_string.h:809 | 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:58-67 |
| Module | kmeans-gcc-O3-funroll |
| nb instructions | 44 |
| nb uops | 55 |
| loop length | 148 |
| used x86 registers | 13 |
| used mmx registers | 0 |
| used xmm registers | 1 |
| used ymm registers | 0 |
| used zmm registers | 0 |
| nb stack references | 0 |
| micro-operation queue | 13.75 cycles |
| front end | 13.75 cycles |
| P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | |
|---|---|---|---|---|---|---|---|---|
| uops | 8.00 | 8.00 | 5.17 | 4.83 | 5.00 | 8.00 | 8.00 | 5.00 |
| cycles | 8.00 | 8.00 | 5.17 | 4.83 | 5.00 | 8.00 | 8.00 | 5.00 |
| Cycles executing div or sqrt instructions | 6.00 |
| FE+BE cycles | 12.73 |
| Stall cycles | 0.68 |
| ROB full (events) | 0.53 |
| RS full (events) | 0.65 |
| Front-end | 13.75 |
| Dispatch | 8.00 |
| DIV/SQRT | 6.00 |
| Overall L1 | 13.75 |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 0% |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| other | 0% |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | NA (no add-sub vectorizable/vectorized instructions) |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | NA (no other vectorizable/vectorized instructions) |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 0% |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | 0% |
| other | 0% |
| all | 9% |
| load | 10% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 6% |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| other | 8% |
| all | 12% |
| load | 12% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | NA (no add-sub vectorizable/vectorized instructions) |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | NA (no other vectorizable/vectorized instructions) |
| all | 9% |
| load | 10% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 6% |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | 6% |
| other | 8% |
| 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 | scal (12.5%) |
| PUSH %R12 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| MOV %RDI,%R12 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| PUSH %RBX | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| CALL 2260 <omp_get_num_threads@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| MOV %EAX,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| CALL 21d0 <omp_get_thread_num@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| MOV %EAX,%ECX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| MOV 0x18(%R12),%EAX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| CLTD | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (6.3%) |
| IDIV %EBX | 10 | 2.50 | 2.50 | 0 | 0 | 0 | 2.50 | 2.50 | 0 | 26 | 6 | scal (6.3%) |
| CMP %EDX,%ECX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JL 2ba1 <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1e1> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| IMUL %EAX,%ECX | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | scal (6.3%) |
| ADD %ECX,%EDX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| LEA (%RAX,%RDX,1),%ESI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| CMP %ESI,%EDX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JGE 2b9c <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1dc> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOV 0x1c(%R12),%R8D | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (6.3%) |
| MOV 0x10(%R12),%R11 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| MOV 0x8(%R12),%R9 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| MOV (%R12),%R10 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| TEST %R8D,%R8D | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JLE 2b9c <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1dc> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOVSXD %EDX,%R12 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| MOV %EAX,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| VMOVSD 0x1727(%RIP),%XMM5 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| MOV %R12,%RDI | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (12.5%) |
| ADD %R12,%RBX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| LEA (%R11,%R12,4),%RSI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| SAL $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| SAL $0x4,%RBX | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| ADD %R10,%RDI | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| ADD %RBX,%R10 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 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 %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 |
| INC %EAX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| XOR %EDX,%EDX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| JMP 29e8 <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x28> | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1-2 | N/A |
| NOPW (%RAX,%RAX,1) | 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:58-67 |
| Module | kmeans-gcc-O3-funroll |
| nb instructions | 44 |
| nb uops | 55 |
| loop length | 148 |
| used x86 registers | 13 |
| used mmx registers | 0 |
| used xmm registers | 1 |
| used ymm registers | 0 |
| used zmm registers | 0 |
| nb stack references | 0 |
| micro-operation queue | 13.75 cycles |
| front end | 13.75 cycles |
| P0 | P1 | P2 | P3 | P4 | P5 | P6 | P7 | |
|---|---|---|---|---|---|---|---|---|
| uops | 8.00 | 8.00 | 5.17 | 4.83 | 5.00 | 8.00 | 8.00 | 5.00 |
| cycles | 8.00 | 8.00 | 5.17 | 4.83 | 5.00 | 8.00 | 8.00 | 5.00 |
| Cycles executing div or sqrt instructions | 6.00 |
| FE+BE cycles | 12.73 |
| Stall cycles | 0.68 |
| ROB full (events) | 0.53 |
| RS full (events) | 0.65 |
| Front-end | 13.75 |
| Dispatch | 8.00 |
| DIV/SQRT | 6.00 |
| Overall L1 | 13.75 |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 0% |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| other | 0% |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | NA (no add-sub vectorizable/vectorized instructions) |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | NA (no other vectorizable/vectorized instructions) |
| all | 0% |
| load | 0% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 0% |
| add-sub | 0% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | 0% |
| other | 0% |
| all | 9% |
| load | 10% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 6% |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| other | 8% |
| all | 12% |
| load | 12% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | NA (no mul vectorizable/vectorized instructions) |
| add-sub | NA (no add-sub vectorizable/vectorized instructions) |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | NA (no div/sqrt vectorizable/vectorized instructions) |
| other | NA (no other vectorizable/vectorized instructions) |
| all | 9% |
| load | 10% |
| store | NA (no store vectorizable/vectorized instructions) |
| mul | 6% |
| add-sub | 12% |
| fma | NA (no fma vectorizable/vectorized instructions) |
| div/sqrt | 6% |
| other | 8% |
| 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 | scal (12.5%) |
| PUSH %R12 | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| MOV %RDI,%R12 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| PUSH %RBX | 1 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 0 | 0.33 | 3 | 1 | N/A |
| CALL 2260 <omp_get_num_threads@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| MOV %EAX,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| CALL 21d0 <omp_get_thread_num@plt> | 2 | 0 | 0 | 0.33 | 0.33 | 1 | 0 | 1 | 0.33 | 0 | 1 | N/A |
| MOV %EAX,%ECX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| MOV 0x18(%R12),%EAX | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| CLTD | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (6.3%) |
| IDIV %EBX | 10 | 2.50 | 2.50 | 0 | 0 | 0 | 2.50 | 2.50 | 0 | 26 | 6 | scal (6.3%) |
| CMP %EDX,%ECX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JL 2ba1 <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1e1> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| IMUL %EAX,%ECX | 1 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 1 | scal (6.3%) |
| ADD %ECX,%EDX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| LEA (%RAX,%RDX,1),%ESI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| CMP %ESI,%EDX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JGE 2b9c <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1dc> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOV 0x1c(%R12),%R8D | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (6.3%) |
| MOV 0x10(%R12),%R11 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | N/A |
| MOV 0x8(%R12),%R9 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| MOV (%R12),%R10 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| TEST %R8D,%R8D | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (6.3%) |
| JLE 2b9c <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x1dc> | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 0 | 0.50-1 | N/A |
| MOVSXD %EDX,%R12 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| MOV %EAX,%EBX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (6.3%) |
| VMOVSD 0x1727(%RIP),%XMM5 | 1 | 0 | 0 | 0.50 | 0.50 | 0 | 0 | 0 | 0 | 4-5 | 0.50 | scal (12.5%) |
| MOV %R12,%RDI | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | scal (12.5%) |
| ADD %R12,%RBX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| LEA (%R11,%R12,4),%RSI | 1 | 0 | 0.50 | 0 | 0 | 0 | 0.50 | 0 | 0 | 1 | 0.50 | N/A |
| SAL $0x4,%RDI | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| SAL $0x4,%RBX | 1 | 0.50 | 0 | 0 | 0 | 0 | 0 | 0.50 | 0 | 1 | 0.50 | scal (12.5%) |
| ADD %R10,%RDI | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| ADD %RBX,%R10 | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | scal (12.5%) |
| NOPL (%RAX) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | 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 %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 |
| INC %EAX | 1 | 0.25 | 0.25 | 0 | 0 | 0 | 0.25 | 0.25 | 0 | 1 | 0.25 | N/A |
| XOR %EDX,%EDX | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| JMP 29e8 <_Z7k_meansiP7point_tS0_PiS0_ii._omp_fn.0+0x28> | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 1-2 | N/A |
| NOPW (%RAX,%RAX,1) | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | N/A |
| Run run_1_thread | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 1 |
|---|---|
| Run run_2_threads | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 2 |
| Run run_4_threads | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 4 |
| Run run_8_threads | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 8 |
| Run run_16_threads | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 16 |
| Run run_26_threads | Number processes: 1Number nodes: 1Number processes per node: 1Run Command: <executable> input/100000000.in 1000 100000000 50 25MPI Command: Dataset: Run Directory: /home/fmusial/KMEANS_BenchmarksOMP_PROC_BIND: closeOMP_NUM_THREADS: 26 |
| (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_16_threads) Efficiency | (run_16_threads) Potential Speed-Up (%) | (run_26_threads) Efficiency | (run_26_threads) Potential Speed-Up (%) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 0 | 0.94 | 5.49 | 0.84 | 14.59 | 0.7 | 27.57 | 0.52 | 42.17 | 0.41 | 51.12 |
| Run | Number of threads | Efficiency (ideal is 1) | Speedup | Ideal Speedup | Time (s) | Coverage (%) |
|---|---|---|---|---|---|---|
| run_1_thread | 1 | 1 | 1 | 1 | 151.84997558594 | 93.294006347656 |
| run_2_threads | 2 | 0.94 | 1.88 | 2 | 75.969985961914 | 92.960540771484 |
| run_4_threads | 4 | 0.84 | 3.37 | 4 | 37.994987487793 | 92.297645568848 |
| run_8_threads | 8 | 0.7 | 5.58 | 8 | 18.995000839233 | 91.105651855469 |
| run_16_threads | 16 | 0.52 | 8.4 | 16 | 9.5000009536743 | 88.748641967773 |
| run_26_threads | 26 | 0.41 | 10.55 | 26 | 5.8649997711182 | 86.02702331543 |
| Name | Coverage (%) | Time (s) |
|---|---|---|
| ▼k_means(int, point_t*, point_t*, int*, point_t*, int, int) [clone ._omp_fn.0]– | 93.29 | 151.85 |
| ▼Loop 2 - main.cpp:60-67 - kmeans-gcc-O3-funroll– | 5.89 | 9.59 |
| ○Loop 1 - main.cpp:61-67 - kmeans-gcc-O3-funroll | 87.41 | 142.26 |
