about summary refs log tree commit diff
path: root/benchtests/README
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-12-05 10:12:59 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-12-05 10:12:59 +0530
commit9298ecba15e2b8055e68189c1b11b08ef3ac008d (patch)
tree1ba9f9dcb8c625e851da8d978778d06a74b8f47a /benchtests/README
parent232983e9a74e817377a5e76f2c3872c8a92685d0 (diff)
downloadglibc-9298ecba15e2b8055e68189c1b11b08ef3ac008d.tar.gz
glibc-9298ecba15e2b8055e68189c1b11b08ef3ac008d.tar.xz
glibc-9298ecba15e2b8055e68189c1b11b08ef3ac008d.zip
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:<double *>:<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 *>: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);
Diffstat (limited to 'benchtests/README')
-rw-r--r--benchtests/README3
1 files changed, 2 insertions, 1 deletions
diff --git a/benchtests/README b/benchtests/README
index 0c643a6590..a5fd8dafe3 100644
--- a/benchtests/README
+++ b/benchtests/README
@@ -48,7 +48,8 @@ one to add `foo' to the bench tests:
 
   - args: This should be assigned a colon separated list of types of the input
     arguments.  This directive may be skipped if the function does not take any
-    inputs.
+    inputs.  One may identify output arguments by nesting them in <>.  The
+    generator will create variables to get outputs from the calling function.
   - ret: This should be assigned the type that the function returns.  This
     directive may be skipped if the function does not return a value.
   - includes: This should be assigned a comma-separated list of headers that