# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
# SPDX-FileCopyrightText: Bradley M. Bell <bradbell@seanet.com>
# SPDX-FileContributor: 2003-23 Bradley M. Bell
# ----------------------------------------------------------------------------

{xrst_begin whats_new_20 app}
{xrst_spell
   autotools
   callgrind
   cg
   cl
   github
   gitlab
   libs
   msys
   omh
   optionlist
   uninitialized
}

Changes and Additions to CppAD During 2020
##########################################

mm-dd
*****

12-28
=====

#. Add the
   :ref:`cppadcg_sparse_jacobian.cpp@PASS_SPARSE_JACOBIAN_TO_CODE_GEN`
   option to the cppadcg sparse jacobian speed test
   so one can compare passing a function, or its sparse Jacobian, to
   CppADCodeGen (for the same eventual result).
#. Move ``compiled_fun`` to :ref:`code_gen_fun-name` ,
   to emphasize the fact that it used the CppADCodeGen package.

12-27
=====

#. Include the example implementations ``compiled_fun.hpp``
   and ``compiled_fun.cpp`` in the documentation.
#. Add the
   :ref:`cppadcg_det_minor.cpp@PASS_JACOBIAN_TO_CODE_GEN`
   option to the cppadcg det_minor speed test
   so one can compare passing the determinant or its Jacobian to
   CppADCodeGen (for the same eventual result).

12-21
=====

#. Add a move semantics version of the copy constructor to
   :ref:`ADFun-name` , :ref:`sparse_rc-name` , :ref:`sparse_rcv-name` , and
   :ref:`CppAD_vector@vectorBool` template classes.
   This should improve the speed of handling function return values
   that have these types.
#. The default ADFun copy constructor was deleted so that its use is now
   a compile error (it used to generate a run time error message).
#. Move  :ref:`poly.cpp-name` , :ref:`pow_int-name` ,
   :ref:`runge_45.cpp-name` , and :ref:`rosen_34.cpp-name`
   from ``example/general`` to ``example/utility/`` .

12-20
=====

#. The :ref:`rosen_34.cpp-name` example was changed to use
   :ref:`independent@dynamic` parameters so it does not
   need to record a new function for every argument value.
   The new version of this example also uses the
   ADFun :ref:`fun_construct@swap` operation to avoid
   making a separate copy of an ADFun object.
#. Fix a bug in the
   ADFun :ref:`fun_construct@swap` , which was added on 12-19.
#. Add a move semantic version of the copy constructor to
   the :ref:`cppad_vector-name` template class.
   (This should improve the speed of handling function return values
   that are vectors.)

12-19
=====
Merge in ``cg`` branch which had the following changes:

#. **API Change:**
   The *SizeVector* class in
   :ref:`sparse_rc<sparse_rc@SizeVector>` and
   :ref:`sparse_rcv<sparse_rcv@SizeVector>`
   must support the ``swap`` operation.
#. The ``swap`` operator was added to the
   :ref:`sparse_rc<sparse_rc@other@swap>` and
   :ref:`sparse_rcv<sparse_rcv@other@swap>` template classes.
#. A move semantics version of the assignment operator was added to the
   :ref:`sparse_rc<sparse_rc@other@Move Semantics Assignment and Constructor>`
   :ref:`sparse_rcv<sparse_rcv@other@Move Semantics Assignment and Constructor>` template classes.
#. The *job* option was added to the
   :ref:`det_minor<link_det_minor@job>` and
   :ref:`sparse_jacobian<link_sparse_jacobian@job>` speed tests.
#. The ``compiled_fun`` example for using CppADCodeGen was added
   (since moved to :ref:`code_gen_fun-name` ).
   In addition, :ref:`cppadcg_sparse_jacobian.cpp-name` and
   :ref:`cppadcg_det_minor.cpp-name` examples were modified to use this utility.
#. The ADFun :ref:`fun_construct@swap` operation,
   and move semantics copy constructor, were added.
   This ensures the move semantics assignment operator does not make any copies.

12-12
=====
Change the location where the source code for the
:ref:`optional<get_optional.sh-name>` packages is stored from
``build/external`` to ``external`` .
This enables one to remove the old build directory
without having to rebuild the optional packages.

12-11
=====
Change the autotools :ref:`configure@Configure` script
so that it does better detection of the microsoft cl compiler.
In addition, add documentation for the
:ref:`configure@--enable-msvc` option.

12-06
=====
Fix ``bin/get_cppadcg.sh`` install of newer version
of cppadcg.

12-05
=====
Advance to Oct 9, 2020 version of cppadcg.

12-04
=====

#. The cppad vector :ref:`cppad_vector@resize` operation
   now preserves the data even if the new size does not fit in the
   old capacity of the array.
   This makes ``cppad_vector`` more like ``std::vector`` .
#. Fix a problem with the autotools build and the ``is_pod`` function.
   This function, which is not in the CppAD user API, was simplified because
   it is no longer necessary to handle the c++98 case.
#. Fix the ``example/utility/to_string.cpp`` test; see
   `issue 44 <https://github.com/coin-or/CppAD/issues/44>`_.

12-03
=====
**API Change:** support of c++11 is required for this,
and future versions of CppAD.

12-02
=====
The :ref:`pkgconfig-name` files were modified to make user of the fields
``Requires.private`` and ``Libs.private`` .
In addition, the
:ref:`pkgconfig@cppad.pc@Extra Definitions`
were added.

12-01
=====
There was a mistake in the 20201130 version that caused
``CPPAD_HAS_IPOPT`` and ``CPPAD_HAS_ADOLC`` to be undefined,
instead of 0 or 1, this has been fixed.

11-29
=====

#. Use pkg-config to determine install prefix for
   adolc, eigen, ipopt, and cppadcg; see
   :ref:`cmake@include_adolc` ,
   :ref:`cmake@include_eigen` ,
   :ref:`cmake@include_ipopt` , and
   :ref:`cmake@include_cppadcg` .
#. Fix warning that the variable ``not_used_rec_base`` was not initialized.

10-26
=====
Improve the documentation for building the CppAD tests using
:ref:`cmake@CMake Command@Visual Studio` .

10-23
=====
Version ``cmake-3.19`` of cmake had an change that was not backward
compatible; see
`CHECK_CXX_SOURCE_RUNS <https://discourse.cmake.org/t/on-windows-check-cxx-source-runs-is-calling-check-source-runs/2065/6>`_.
This broke the CppAD install and was fixed.
Thus versions of CppAD before 20201023 do not work with version of CMake
at or after 3.18.

10-22
=====
Add ``ar-lib`` to github repository distribution.
This fixes a problem with autotools build when using the
Microsoft C++ compiler and ``msys2`` .

10-21
=====
Modify the source file ``match_op.hpp`` to avoid a
possibly un-initialized warning on some compilers.

10-20
=====
The *have_ar* variable has been removed from the
:ref:`configure-name` configuration and the configuration now exits
if ``AM_PROG_AR`` does not find an archiving tool.
This was done to try and solve some configuration problems with
a combination of ``msys2`` and the Visual Studio compiler.

10-17
=====

#. The :ref:`configure-name` configuration would fail when it tried
   to compile a :ref:`cppadcg-name` include file
   (the autotools configuration does not support ``cppadcg`` ).
   This has been fixed.
#. The autotools configuration for he profiling version of the
   speed tests was out of date. It is sufficient to do speed
   profiling using the cmake configuration, so it has
   been removed from the autotools configuration.
#. Add more documentation for the
   :ref:`cmake@cppad_profile_flag`
   and fix some problems building the
   ``speed_profile`` program.
   (We also use ``callgrind`` to do CppAD speed profiling.)

09-05
=====
Fix some errors and warnings when building with Visual Studio 2019; e.g. see
`issue 60 <https://github.com/coin-or/CppAD/issues/60>`_.

06-08
=====
Fix compiler warning in ``match_op.hpp`` about
possibly uninitialized variable.

06-04
=====

#. Advance :ref:`get_ipopt.sh-name` to ipopt-3.13.2.
#. Fix some compiler warnings generated by g++-10.1.1.

05-27
=====
If :ref:`cmake@include_ipopt` is on the cmake command line,
:ref:`ipopt_solve-name` is automatically included by ``cppad/cppad.hpp`` .
The :ref:`sparse2eigen-name` utility can still be used even
if :ref:`cmake@include_eigen` is not specified on the cmake command line.

05-26
=====

#. There was a bug in conditional expressions when the
   :ref:`condexp@left` or :ref:`condexp@right` argument is a
   :ref:`con_dyn_var@Dynamic` parameter and the other
   is a parameter and ``NDEBUG`` is not defined.
   There was a mistaken assertion that has been fixed.
#. Advance most recent release from 20200000.2 to 20200000.3.

05-23
=====

#. The ``optimize`` hash coding used to remove identical expressions
   was improved. The can make a big difference for very large programs.
#. The :ref:`collision_limit<optimize@options@collision_limit=value>`
   option was added to the ``optimize`` command.
#. The :ref:`optimize@exceed_collision_limit`
   function was added so one can check if a larger collision limit
   might make a difference.

05-01
=====

#. A problem was fixed in the :ref:`get_adolc.sh-name`
   installation of the optional package Adolc .
   To be specific, to be specific the Adolc source moved from Gitlab to Github.
   In addition, advance to Adolc master on 2020-04-01.
#. The
   :ref:`optimize@options@no_cumulative_sum_op`
   option was added to the ``optimize`` routine because,
   in some cases, gathering cumulative summations
   interferes with recognizes pieces of summations that are
   the same in different cumulative sums.

03-11
=====
The ``CppAD::vector`` constructor was extended to allow its
:ref:`size<CppAD_vector@Size Constructor>` to be a ``int``
(this used to generate a warning when using the ``clang`` compiler).

02-02
=====
The ``get_optional.sh`` prefix was extended so that it could be a
:ref:`get_optional.sh@prefix@Relative Path` .
In addition
:ref:`get_optional.sh@prefix@Configuration`
instructions were added to cover the case where the prefix is changed.

02-01
=====
The :ref:`get_optional.sh@get_optional.log`
and :ref:`get_optional.sh@get_optional.err` files
were added so one can see the progress of the ``get_optional.sh`` script.

01-29
=====

#. Add the :ref:`cppadcg_sparse_jacobian.cpp-name` speed test.
#. The speed main program
   :ref:`speed_main@test@correct`
   test results were printed as

      *package* _ *test* _ *optionlist* _ ``ok`` = *result*

   This has been changed to

      *package* _ *test* _ *optionlist* _ ``correct`` = *result*

01-24
=====

#. Add the :ref:`cppadcg_det_minor.cpp-name` speed test.
   This is the first test using :ref:`cppadcg-name`
   (this package generates C source code for the derivatives).
#. The package name was removed from the speed test size output
   (because the sizes do not depend on the package); see
   :ref:`speed_main@Speed Results` .

01-22
=====

#. Add a :ref:`json_get_started.cpp-name` example.
#. Move the section :ref:`example_abs_normal-name` below
   the section :ref:`abs_normal_fun-name` .

01-18
=====
Modify the option package install scripts so they all use the same
install :ref:`get_optional.sh@prefix`
that the user can change in the file ``bin/get_optional.sh`` .
In addition, these scripts were updated to use more recent versions
of the optional packages.

01-17
=====
Create an example / template for adding a new package to the speed tests;
see :ref:`speed_xpackage-name` .

01-12
=====
Documentation was added for the
:ref:`base_ordered@Special Requirements`
when the *Base* type does not support ordered comparison.
As a consequence, the reverse mode the derivative of ``pow`` ( *x* , *y* )
may result in zero (not nan) when *x* is zero; see the
:ref:`wish_list@Reverse Mode` wish list item.

01-06
=====
The ``VecAD`` objects have been extended to work with
dynamic parameters. However, this is not as efficient as it should be; see
:ref:`VecAD@Efficiency` and
:ref:`wish_list@Dynamic Parameters@VecAD Vectors`
under dynamic parameters in the wish list.

01-04
=====

#. The :ref:`VecAD-name` documentation was re-written.
#. An empty directory with the name ``omh`` was being
   install below the include directory.
   This has been fixed.

{xrst_end whats_new_20}
