solution
sol_3159247_1781243189810890613_3
01
source
Submitted source
723 bytes
show source
#include <cstddef>
#include <cstdint>
extern "C" void nk_sparse_dot_u32f32(
const std::uint32_t *a,
const std::uint32_t *b,
const float *a_weights,
const float *b_weights,
std::size_t a_length,
std::size_t b_length,
double *product
) {
std::size_t i = 0;
std::size_t j = 0;
double sum = 0.0;
while (i < a_length && j < b_length) {
const std::uint32_t ai = a[i];
const std::uint32_t bj = b[j];
if (ai == bj) {
sum += static_cast<double>(a_weights[i]) * static_cast<double>(b_weights[j]);
++i;
++j;
} else if (ai < bj) {
++i;
} else {
++j;
}
}
*product = sum;
}
02
jobs
Systems
02 jobs
03
counters
Performance counters
31 counters
cyclesi
183,852,174Show more
branch_instructionsi
46,441,289branch_missesi
5,746,297cycle_activity.stalls_l1d_missi
1,126,711cycle_activity.stalls_l2_missi
767,658cycle_activity.stalls_l3_missi
629,534cycle_activity.stalls_totali
83,654,264dtlb_load_misses.walk_completedi
794exe_activity.bound_on_loadsi
16,207,050exe_activity.bound_on_storesi
21,557instructionsi
116,102,038machine_clearsi
1,095mem_inst_retired.split_loadsi
879mem_load_retired.l1_missi
89,759mem_load_retired.l2_missi
5,815mem_load_retired.l3_missi
4,157tma_backend_boundi
99,715,542tma_bad_speculationi
320,242,324tma_branch_mispredict_slotsi
320,314,365tma_frontend_boundi
606,833,559tma_memory_boundi
13,152,294tma_retiringi
84,976,111tma_slotsi
1,106,047,146uops_dispatched.port_0i
12,138,645uops_dispatched.port_1i
9,414,186uops_dispatched.port_2_3_10i
60,631,555uops_dispatched.port_4_9i
848,655uops_dispatched.port_5_11i
31,848,281uops_dispatched.port_6i
80,935,650uops_dispatched.port_7_8i
860,189uops_retired.msi
0
04
top down
Top-down analysis
Raptor Cove P-core
05
profile
load profile
03
counters
Performance counters
26 counters
cyclesi
173,486,259Show more
branch_instructionsi
46,444,622branch_missesi
5,114,345dtlb_load_misses.walk_completedi
2,134instructionsi
116,109,507mem_bound_stalls.load_dram_hiti
606,058mem_bound_stalls.load_l2_hiti
2,755,462mem_bound_stalls.load_llc_hiti
35,143mem_inst_retired.split_loadsi
745mem_load_retired.l1_missi
341,550mem_load_retired.l2_missi
5,050mem_load_retired.l3_missi
4,206tma_backend_boundi
4,791,487tma_backend_bound_alloc_restrictionsi
235,871tma_backend_bound_non_memory_scheduleri
1,527,265tma_backend_bound_registeri
860tma_backend_bound_reorder_bufferi
1,178,395tma_backend_bound_serializationi
1,341,867tma_bad_speculationi
463,848,607tma_bad_speculation_branch_mispredicti
463,755,929tma_bad_speculation_machine_clearsi
92,678tma_frontend_bandwidthi
236,131,545tma_frontend_boundi
287,605,888tma_frontend_latencyi
51,474,343tma_memory_boundi
326,495tma_retiringi
116,743,500
04
top down
Top-down analysis
Gracemont E-core
05
profile
load profile