From 9298ecba15e2b8055e68189c1b11b08ef3ac008d Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Thu, 5 Dec 2013 10:12:59 +0530 Subject: Accept output arguments to benchmark functions This patch adds the ability to accept output arguments to functions being benchmarked, by nesting the argument type in <> in the args directive. It includes the sincos implementation as an example, where the function would have the following args directive: ## args: double:: This simply adds a definition for a static variable whose pointer gets passed into the function, so it's not yet possible to pass something more complicated like a pre-allocated string or array. That would be a good feature to add if a function needs it. The values in the input file will map only to the input arguments. So if I had a directive like this for a function foo: ## args: int::int: and I have a value list like this: 1, 2 3, 4 5, 6 then the function calls generated would be: foo (1, &out1, 2, &out2); foo (3, &out1, 4, &out2); foo (5, &out1, 6, &out2); --- benchtests/sincos-inputs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 benchtests/sincos-inputs (limited to 'benchtests/sincos-inputs') diff --git a/benchtests/sincos-inputs b/benchtests/sincos-inputs new file mode 100644 index 0000000000..3df4d2a23b --- /dev/null +++ b/benchtests/sincos-inputs @@ -0,0 +1,27 @@ +## includes: math.h +## args: double:: +0.9 +2.3 +3.7 +3.9 +4.0 +4.7 +5.9 +0x1.000000cf4a2a1p0 +0x1.0000010b239a8p0 +0x1.00000162a932ap0 +0x1.000002d452a11p0 +0x1.000005bc7d86cp0 +## name: 768bits +0.93340582292648832662962377071381 +2.3328432680770916363144351635128 +3.7439477503636453548097051680088 +3.9225160069792437411706487182528 +4.0711651639931289992091478779912 +4.7858438478542097982426639646292 +5.9840767662578002727968851104379 +0x1.000000cf4a2a2p0 +0x1.0000010b239a9p0 +0x1.00000162a932bp0 +0x1.000002d452a10p0 +0x1.000005bc7d86dp0 -- cgit 1.4.1