[ADMB Users] How to use Autodif as a regular external C++ library?

dave fournier davef at otter-rsch.com
Sat Nov 3 08:45:13 PDT 2012


This is possible. First thing is that autodif has a safe mode for 
development
and an optimized mode for speed. In safe model it does bounds checking.
safe model is by default.  Optimized mode is invoked by defining the macro
-DOPT_LIB.

For safe mode you would link with libraries like  libads.a and libadt.a and
maybe libadmod.a  the names may vary a bit depending on your OS.

The other thing is that before you declare dvariables or dvar_vectors etc
you need to  declare and object of type gradient_structure(long int)
like

    main()
    {
        gradient_structure gs(100000000);
        dvar_vector v(1,1000);

Give that a try and see what happens.



More information about the Users mailing list