Performance 如何测量进行了多少次浮动操作? float res[size],a[size],b[size] //进行了多次初始化 对于(inti=0;i
一种方法是使用cpu计数器,特别是Performance 如何测量进行了多少次浮动操作? float res[size],a[size],b[size] //进行了多次初始化 对于(inti=0;i,performance,parallel-processing,cpu,sse,Performance,Parallel Processing,Cpu,Sse,一种方法是使用cpu计数器,特别是触发器 float res[size], a[size], b[size] //Several initialization is done for(int i=0; i<size; i++) res[i] = a[i]*b[i]; 请参见gcc-S,阅读程序集输出。 operf -e FLOPS:100000
触发器
float res[size], a[size], b[size]
//Several initialization is done
for(int i=0; i<size; i++) res[i] = a[i]*b[i];
请参见gcc-S
,阅读程序集输出。
operf -e FLOPS:100000