[PATCH] XCore target: add support to build MultiSource/Benchmarks/SciMark2-C
robert lytton
robert at xmos.com
Mon Mar 10 04:16:26 PDT 2014
The clock() function was wrapping, hence negative stopwatch elapse times were negating the Mflop calculations.
As the Mflop calculations are disabled, clock() has been replaced by a simple counter.
Hi ddunbar,
http://llvm-reviews.chandlerc.com/D2771
CHANGE SINCE LAST DIFF
http://llvm-reviews.chandlerc.com/D2771?vs=7069&id=7686#toc
Files:
MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
Index: MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
===================================================================
--- MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
+++ MultiSource/Benchmarks/SciMark2-C/Stopwatch.c
@@ -3,7 +3,12 @@
double seconds()
{
+#ifdef __XS1B__
+ static double t = 0.0;
+ return ++t;
+#else
return ((double) clock()) / (double) CLOCKS_PER_SEC;
+#endif
}
void Stopwtach_reset(Stopwatch Q)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2771.2.patch
Type: text/x-patch
Size: 441 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140310/2a1505ba/attachment.bin>
More information about the llvm-commits
mailing list