- 5
- 0
- 约8.95千字
- 约 38页
- 2019-05-06 发布于广东
- 举报
* * * * * * * * * * * * * * * Memory mountain test function /* The test function */ void test (int elems, int stride) { int i ; double result = 0.0 ; volatile double sink; for (i = 0; i elems; i += stride) result += data[i]; sink = result; /* So compiler doesnt optimize away the loop */ } * Memory mountain test function /* Run test (elems, stride) and return read throughput (MB/s) */ double run (int size, int stride, double Mhz) { double cycles; int elems = size / sizeof(double); test (elems, stride); /* warm up the cache */ c
原创力文档

文档评论(0)