CppAD: A C++ Algorithmic Differentiation Package  20171217
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
template<class Type>
void CppAD::local::pod_vector< Type >::resize ( size_t  n)
inline

resize the vector (existing elements preserved when n <= capacity_).

Parameters
nis the new size for this vector.
if n <= capacity(), no memory is freed or allocated, the capacity is not changed, and existing elements are preserved. If n > capacity(), new memory is allocates and all the data in the vector is lost.
  • If Type is plain old data, new elements are not initialized; i.e., their constructor is not called. Otherwise, the constructor is called for each new element.
  • This and extend are the only routine that allocate memory for pod_vector. They uses thread_alloc for this allocation, hence this determines which thread corresponds to this vector (when in parallel mode).

Definition at line 180 of file pod_vector.hpp.

Referenced by CppAD::local::player< double >::Erase(), CppAD::local::for_hes_sweep(), CppAD::local::for_jac_sweep(), CppAD::local::player< double >::get(), CppAD::local::subgraph::get_argument_variable(), CppAD::local::subgraph::subgraph_info::get_rev(), CppAD::local::subgraph::subgraph_info::init_rev(), CppAD::local::sparse_list::process_post(), CppAD::local::sparse_pack::resize(), CppAD::local::subgraph::subgraph_info::resize(), CppAD::local::sparse_sizevec::resize(), CppAD::local::sparse_list::resize(), CppAD::local::rev_hes_sweep(), CppAD::local::rev_jac_sweep(), CppAD::local::subgraph::subgraph_info::set_map_user_op(), and CppAD::local::subgraph::subgraph_sparsity().