You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above code will only compile if the second example is commented out.
I (think!) this is due to function templates interacting badly with the lazy evaluation of x + 0. As it is handed one template expects to also return a "something + something" expression, which it can't do.
The bodge in the third case uses the same Type as the objective_function, so the lazy evaluation is no longer a problem.
Is there a better approach here I'm missing?
TMB Version:
> packageVersion("TMB")
[1] ‘1.7.18’
R Version:
> R.version.string
[1] "R version 3.6.3 (2020-02-29)"
Operating System:
$ uname -v
#1 SMP Debian 5.7.6-1 (2020-06-24)
The text was updated successfully, but these errors were encountered:
Oops, yes that would have been the sensible thing to do. Apologies.
Happy to make a pull request, adding a note to the docs to save future head-scratching. The most useful place I can see is http://kaskr.github.io/adcomp/_book/Errors.html#compilation-errors - does this seem like a plan? I can't any specific docs on the vectorized lgamma, and it's not strictly an lgamma problem anyway.
Description:
Providing an expression argument
lgamma()
, amongst others, doesn't compile.Reproducible Steps:
Try compiling the following example:
The above code will only compile if the second example is commented out.
I (think!) this is due to function templates interacting badly with the lazy evaluation of
x + 0
. As it is handed one template expects to also return a "something + something" expression, which it can't do.The bodge in the third case uses the same
Type
as the objective_function, so the lazy evaluation is no longer a problem.Is there a better approach here I'm missing?
TMB Version:
R Version:
Operating System:
The text was updated successfully, but these errors were encountered: