This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH][benchtests] Accept output arguments to benchmark functions
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 4 Dec 2013 15:36:40 +0530
- Subject: Re: [PATCH][benchtests] Accept output arguments to benchmark functions
- Authentication-results: sourceware.org; auth=none
- References: <20131204073859 dot GO14845 at spoyarek dot pnq dot redhat dot com> <CANu=Dmj0zkujunQRQK_FvOQia0b_mT9O8NjsLm2WVEw9XC2sEw at mail dot gmail dot com>
On Wed, Dec 04, 2013 at 09:55:40AM +0000, Will Newton wrote:
> On 4 December 2013 07:38, Siddhesh Poyarekar <firstname.lastname@example.org> wrote:
> > Hi,
> > 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:
> Is there a line missing here?
Ugh, yeah there is. sincos would have the following args directive:
## args: double:<double *>:<double *>
The above means that sincos takes three arguments of type double,
double * and double *, where the last two arguments (enclosed with <>)
are output arguments.
> It's not clear to me how these values map to the arguments / return values.
The values map only to the input arguments. So if I had a directive
## args: int:<int *>:int:<int *>
and I have a value list like this:
then the function calls generated would be:
foo (1, &out1, 2, &out2);
foo (3, &out1, 4, &out2);
foo (5, &out1, 6, &out2);