inline and linking

30 views
Skip to first unread message

Bob Carpenter

unread,
Jun 15, 2016, 2:30:36 PM6/15/16
to stan...@googlegroups.com
You can also solve the problem by moving to a proper
header/definition setup and allowing conditional inclusion
of the definitions based on package.

Technically, inline allows multiple definitions across
translation units (if they are all the same).

Apparently, this can mean zero definitions in practice,
assuming the code isn't actually used anywhere. There just
has to be a definition available at the point of each use.

See:

https://akrzemi1.wordpress.com/2014/07/14/inline-functions/

http://stackoverflow.com/questions/4193639/inline-function-linkage

- Bob

> On Jun 15, 2016, at 2:20 PM, Daniel Lee <bea...@alum.mit.edu> wrote:
>
> Yes. But I'm lost. It's what Sebastian suggested -- by setting a whole bunch of functions in the new ode stuff inline, it works.
>
>
> Daniel
>
> On Wed, Jun 15, 2016 at 1:45 PM, Bob Carpenter <ca...@alias-i.com> wrote:
> You got my mail on that, right? You just need to make
> sure there's a way to include without an instantiated call
> to CVODES.

Daniel Lee

unread,
Jun 15, 2016, 5:01:55 PM6/15/16
to stan-dev mailing list
Thanks, Bob.

I'm just going to inline since it's going to be straightforward to do so.


Daniel



--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

a...@ariddell.org

unread,
Jun 16, 2016, 9:52:37 PM6/16/16
to stan...@googlegroups.com
Is this inline switch in (or will it be in for 2.10)? I didn't spot a
commit/PR.

On 06/15/2016 05:01 PM, Daniel Lee wrote:
> Thanks, Bob.
>
> I'm just going to inline since it's going to be straightforward to do so.
>
>
> Daniel
>
>
> On Wed, Jun 15, 2016 at 2:30 PM, Bob Carpenter <ca...@alias-i.com
> <mailto:ca...@alias-i.com>> wrote:
>
> You can also solve the problem by moving to a proper
> header/definition setup and allowing conditional inclusion
> of the definitions based on package.
>
> Technically, inline allows multiple definitions across
> translation units (if they are all the same).
>
> Apparently, this can mean zero definitions in practice,
> assuming the code isn't actually used anywhere. There just
> has to be a definition available at the point of each use.
>
> See:
>
> https://akrzemi1.wordpress.com/2014/07/14/inline-functions/
>
> http://stackoverflow.com/questions/4193639/inline-function-linkage
>
> - Bob
>
> > On Jun 15, 2016, at 2:20 PM, Daniel Lee <bea...@alum.mit.edu
> <mailto:bea...@alum.mit.edu>> wrote:
> >
> > Yes. But I'm lost. It's what Sebastian suggested -- by setting a
> whole bunch of functions in the new ode stuff inline, it works.
> >
> >
> > Daniel
> >
> > On Wed, Jun 15, 2016 at 1:45 PM, Bob Carpenter <ca...@alias-i.com
> <mailto:ca...@alias-i.com>> wrote:
> > You got my mail on that, right? You just need to make
> > sure there's a way to include without an instantiated call
> > to CVODES.
>
> --
> You received this message because you are subscribed to the Google
> Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to stan-dev+u...@googlegroups.com
> <mailto:stan-dev%2Bunsu...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "stan development mailing list" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to stan-dev+u...@googlegroups.com
> <mailto:stan-dev+u...@googlegroups.com>.

Daniel Lee

unread,
Jun 17, 2016, 2:32:46 AM6/17/16
to stan...@googlegroups.com
Yes, it's a change in the math library.
> To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages