vgvassilev / clad

clad -- automatic differentiation for C/C++
GNU Lesser General Public License v3.0
280 stars 123 forks source link

Differentiating variadic functions in reverse, hessian and jacobian modes #209

Open parth-07 opened 3 years ago

parth-07 commented 3 years ago

Currently there's no way to differentiate variadic functions in reverse, hessian and jacobian mode.

To implement differentiating variadic functions in these modes, we have atleast 3 syntax possibilities to consider, this issue is created to decide about which possibility will be best for clad.

1)

// function non-variadic arguments, followed by result pointer, followed by variadic arguments`
clad::gradient(4.00, result, "fdf", 1.2, 2, 2.8);

2)

// function non-variadic arguments , followed by variadic arguments, followed by result pointer
clad::gradient(4, "fdf", 1.2, 2, 2.8, result);

3)

// result pointer, followed by non-variadic arguments, followed by variadic arguments
clad::gradient(result, 4.00, "fdf", 1.2, 2,  2.8)

Please give suggestions on which possibility seem best to you for this.

grimmmyshini commented 3 years ago

Possible duplicate of #53