casadi 3.6.7__cp37-none-manylinux2014_aarch64.whl → 3.7.0__cp37-none-manylinux2014_aarch64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (210) hide show
  1. casadi/_casadi.so +0 -0
  2. casadi/casadi-cli +0 -0
  3. casadi/casadi.py +6070 -3038
  4. casadi/cmake/casadi-config-version.cmake +1 -1
  5. casadi/cmake/casadi-targets-release.cmake +5 -5
  6. casadi/cmake/casadi-targets.cmake +5 -5
  7. casadi/{lib/cmake/tinyxml2/tinyxml2-config-version.cmake → cmake/ghc_filesystem/ghc_filesystem-config-version.cmake} +30 -10
  8. casadi/cmake/ghc_filesystem/ghc_filesystem-config.cmake +30 -0
  9. casadi/cmake/ghc_filesystem/ghc_filesystem-targets.cmake +107 -0
  10. casadi/cmake/libzip/libzip-config-version.cmake +43 -0
  11. casadi/cmake/libzip/libzip-config.cmake +69 -0
  12. casadi/cmake/libzip/libzip-targets-release.cmake +19 -0
  13. casadi/{lib/cmake/tinyxml2/tinyxml2-static-targets.cmake → cmake/libzip/libzip-targets.cmake} +11 -7
  14. casadi/cmake/libzip/modules/FindMbedTLS.cmake +141 -0
  15. casadi/cmake/libzip/modules/FindNettle.cmake +141 -0
  16. casadi/cmake/libzip/modules/Findzstd.cmake +186 -0
  17. casadi/include/casadi/casadi.i +194 -44
  18. casadi/include/casadi/config.h +11 -11
  19. casadi/include/casadi/core/archiver.hpp +58 -0
  20. casadi/include/casadi/core/blazing_spline.hpp +47 -0
  21. casadi/include/casadi/core/calculus.hpp +57 -2
  22. casadi/include/casadi/core/casadi_common.hpp +37 -0
  23. casadi/include/casadi/core/casadi_meta.hpp +15 -0
  24. casadi/include/casadi/core/casadi_misc.hpp +7 -0
  25. casadi/include/casadi/core/code_generator.hpp +95 -17
  26. casadi/include/casadi/core/core.hpp +5 -0
  27. casadi/include/casadi/core/dae_builder.hpp +283 -141
  28. casadi/include/casadi/core/dm.hpp +3 -0
  29. casadi/include/casadi/core/filesystem.hpp +58 -0
  30. casadi/include/casadi/core/fmu.hpp +51 -16
  31. casadi/include/casadi/core/function.hpp +19 -0
  32. casadi/include/casadi/core/generic_matrix.hpp +214 -7
  33. casadi/include/casadi/core/generic_shared.hpp +318 -0
  34. casadi/include/casadi/core/generic_shared_impl.hpp +214 -0
  35. casadi/include/casadi/core/generic_shared_internal.hpp +215 -0
  36. casadi/include/casadi/core/generic_type.hpp +3 -0
  37. casadi/include/casadi/core/global_options.hpp +10 -0
  38. casadi/include/casadi/core/integrator.hpp +41 -7
  39. casadi/include/casadi/core/matrix_decl.hpp +67 -0
  40. casadi/include/casadi/core/mx.hpp +63 -2
  41. casadi/include/casadi/core/options.hpp +6 -3
  42. casadi/include/casadi/core/optistack.hpp +43 -9
  43. casadi/include/casadi/core/printable.hpp +8 -0
  44. casadi/include/casadi/core/resource.hpp +107 -0
  45. casadi/include/casadi/core/runtime/casadi_blazing_1d_boor_eval.hpp +112 -0
  46. casadi/include/casadi/core/runtime/casadi_blazing_2d_boor_eval.hpp +311 -0
  47. casadi/include/casadi/core/runtime/casadi_blazing_3d_boor_eval.hpp +645 -0
  48. casadi/include/casadi/core/runtime/casadi_blazing_de_boor.hpp +101 -0
  49. casadi/include/casadi/core/runtime/casadi_nlp.hpp +8 -2
  50. casadi/include/casadi/core/runtime/casadi_printme.hpp +25 -0
  51. casadi/include/casadi/core/serializer.hpp +12 -4
  52. casadi/include/casadi/core/serializing_stream.hpp +3 -0
  53. casadi/include/casadi/core/shared_object.hpp +73 -161
  54. casadi/include/casadi/core/sparsity.hpp +13 -1
  55. casadi/include/casadi/core/sparsity_interface.hpp +19 -1
  56. casadi/include/casadi/core/sx.hpp +41 -0
  57. casadi/include/casadi/core/sx_elem.hpp +25 -0
  58. casadi/include/casadi/core/xml_node.hpp +5 -0
  59. casadi/include/casadi/doc.i +9703 -6539
  60. casadi/include/casadi/doc_merged.i +6483 -4447
  61. casadi/include/casadi/valgrind-casadi.supp +138 -0
  62. casadi/include/casadi/valgrind-python.supp +2470 -0
  63. casadi/include/fatrop/blasfeo_wrapper/LinearAlgebraBlasfeo.hpp +4 -1
  64. casadi/include/ghc/filesystem.hpp +6083 -0
  65. casadi/include/ghc/fs_fwd.hpp +38 -0
  66. casadi/include/ghc/fs_impl.hpp +35 -0
  67. casadi/include/ghc/fs_std.hpp +60 -0
  68. casadi/include/ghc/fs_std_fwd.hpp +63 -0
  69. casadi/include/ghc/fs_std_impl.hpp +46 -0
  70. casadi/include/licenses/ghc-external/LICENSE +19 -0
  71. casadi/include/licenses/libz-external/LICENSE +22 -0
  72. casadi/include/licenses/libz-external/contrib/dotzlib/LICENSE_1_0.txt +23 -0
  73. casadi/include/licenses/libzip-external/LICENSE +31 -0
  74. casadi/include/zconf.h +545 -0
  75. casadi/include/zip.h +528 -0
  76. casadi/include/zipconf.h +48 -0
  77. casadi/include/zlib.h +1938 -0
  78. casadi/libcasadi.so +0 -0
  79. casadi/libcasadi.so.3.7 +0 -0
  80. casadi/libcasadi_archiver_libzip.so +0 -0
  81. casadi/libcasadi_archiver_libzip.so.3.7 +0 -0
  82. casadi/libcasadi_conic_cplex.so +0 -0
  83. casadi/libcasadi_conic_cplex.so.3.7 +0 -0
  84. casadi/libcasadi_conic_daqp.so +0 -0
  85. casadi/libcasadi_conic_daqp.so.3.7 +0 -0
  86. casadi/libcasadi_conic_fatrop.so +0 -0
  87. casadi/libcasadi_conic_fatrop.so.3.7 +0 -0
  88. casadi/libcasadi_conic_gurobi.so +0 -0
  89. casadi/libcasadi_conic_gurobi.so.3.7 +0 -0
  90. casadi/libcasadi_conic_hpipm.so +0 -0
  91. casadi/libcasadi_conic_hpipm.so.3.7 +0 -0
  92. casadi/libcasadi_conic_ipqp.so +0 -0
  93. casadi/libcasadi_conic_ipqp.so.3.7 +0 -0
  94. casadi/libcasadi_conic_nlpsol.so +0 -0
  95. casadi/libcasadi_conic_nlpsol.so.3.7 +0 -0
  96. casadi/libcasadi_conic_osqp.so +0 -0
  97. casadi/libcasadi_conic_osqp.so.3.7 +0 -0
  98. casadi/libcasadi_conic_proxqp.so +0 -0
  99. casadi/libcasadi_conic_proxqp.so.3.7 +0 -0
  100. casadi/libcasadi_conic_qpoases.so +0 -0
  101. casadi/libcasadi_conic_qpoases.so.3.7 +0 -0
  102. casadi/libcasadi_conic_qrqp.so +0 -0
  103. casadi/libcasadi_conic_qrqp.so.3.7 +0 -0
  104. casadi/libcasadi_conic_superscs.so +0 -0
  105. casadi/libcasadi_conic_superscs.so.3.7 +0 -0
  106. casadi/libcasadi_filesystem_ghc.so +0 -0
  107. casadi/libcasadi_filesystem_ghc.so.3.7 +0 -0
  108. casadi/libcasadi_importer_shell.so +0 -0
  109. casadi/libcasadi_importer_shell.so.3.7 +0 -0
  110. casadi/libcasadi_integrator_collocation.so +0 -0
  111. casadi/libcasadi_integrator_collocation.so.3.7 +0 -0
  112. casadi/libcasadi_integrator_cvodes.so +0 -0
  113. casadi/libcasadi_integrator_cvodes.so.3.7 +0 -0
  114. casadi/libcasadi_integrator_idas.so +0 -0
  115. casadi/libcasadi_integrator_idas.so.3.7 +0 -0
  116. casadi/libcasadi_integrator_rk.so +0 -0
  117. casadi/libcasadi_integrator_rk.so.3.7 +0 -0
  118. casadi/libcasadi_interpolant_bspline.so +0 -0
  119. casadi/libcasadi_interpolant_bspline.so.3.7 +0 -0
  120. casadi/libcasadi_interpolant_linear.so +0 -0
  121. casadi/libcasadi_interpolant_linear.so.3.7 +0 -0
  122. casadi/libcasadi_linsol_csparse.so +0 -0
  123. casadi/libcasadi_linsol_csparse.so.3.7 +0 -0
  124. casadi/libcasadi_linsol_csparsecholesky.so +0 -0
  125. casadi/libcasadi_linsol_csparsecholesky.so.3.7 +0 -0
  126. casadi/libcasadi_linsol_lapacklu.so +0 -0
  127. casadi/libcasadi_linsol_lapacklu.so.3.7 +0 -0
  128. casadi/libcasadi_linsol_lapackqr.so +0 -0
  129. casadi/libcasadi_linsol_lapackqr.so.3.7 +0 -0
  130. casadi/libcasadi_linsol_ldl.so +0 -0
  131. casadi/libcasadi_linsol_ldl.so.3.7 +0 -0
  132. casadi/libcasadi_linsol_lsqr.so +0 -0
  133. casadi/libcasadi_linsol_lsqr.so.3.7 +0 -0
  134. casadi/libcasadi_linsol_ma27.so +0 -0
  135. casadi/libcasadi_linsol_ma27.so.3.7 +0 -0
  136. casadi/libcasadi_linsol_mumps.so +0 -0
  137. casadi/libcasadi_linsol_mumps.so.3.7 +0 -0
  138. casadi/libcasadi_linsol_qr.so +0 -0
  139. casadi/libcasadi_linsol_qr.so.3.7 +0 -0
  140. casadi/libcasadi_linsol_symbolicqr.so +0 -0
  141. casadi/libcasadi_linsol_symbolicqr.so.3.7 +0 -0
  142. casadi/libcasadi_linsol_tridiag.so +0 -0
  143. casadi/libcasadi_linsol_tridiag.so.3.7 +0 -0
  144. casadi/libcasadi_nlpsol_alpaqa.so +0 -0
  145. casadi/libcasadi_nlpsol_alpaqa.so.3.7 +0 -0
  146. casadi/libcasadi_nlpsol_ampl.so +0 -0
  147. casadi/libcasadi_nlpsol_ampl.so.3.7 +0 -0
  148. casadi/libcasadi_nlpsol_blocksqp.so +0 -0
  149. casadi/libcasadi_nlpsol_blocksqp.so.3.7 +0 -0
  150. casadi/libcasadi_nlpsol_fatrop.so +0 -0
  151. casadi/libcasadi_nlpsol_fatrop.so.3.7 +0 -0
  152. casadi/libcasadi_nlpsol_feasiblesqpmethod.so +0 -0
  153. casadi/libcasadi_nlpsol_feasiblesqpmethod.so.3.7 +0 -0
  154. casadi/libcasadi_nlpsol_ipopt.so +0 -0
  155. casadi/libcasadi_nlpsol_ipopt.so.3.7 +0 -0
  156. casadi/libcasadi_nlpsol_knitro.so +0 -0
  157. casadi/libcasadi_nlpsol_knitro.so.3.7 +0 -0
  158. casadi/libcasadi_nlpsol_madnlp.so +0 -0
  159. casadi/libcasadi_nlpsol_madnlp.so.3.7 +0 -0
  160. casadi/libcasadi_nlpsol_qrsqp.so +0 -0
  161. casadi/libcasadi_nlpsol_qrsqp.so.3.7 +0 -0
  162. casadi/libcasadi_nlpsol_scpgen.so +0 -0
  163. casadi/libcasadi_nlpsol_scpgen.so.3.7 +0 -0
  164. casadi/libcasadi_nlpsol_snopt.so +0 -0
  165. casadi/libcasadi_nlpsol_snopt.so.3.7 +0 -0
  166. casadi/libcasadi_nlpsol_sqpmethod.so +0 -0
  167. casadi/libcasadi_nlpsol_sqpmethod.so.3.7 +0 -0
  168. casadi/libcasadi_nlpsol_worhp.so +0 -0
  169. casadi/libcasadi_nlpsol_worhp.so.3.7 +0 -0
  170. casadi/libcasadi_rootfinder_fast_newton.so +0 -0
  171. casadi/libcasadi_rootfinder_fast_newton.so.3.7 +0 -0
  172. casadi/libcasadi_rootfinder_kinsol.so +0 -0
  173. casadi/libcasadi_rootfinder_kinsol.so.3.7 +0 -0
  174. casadi/libcasadi_rootfinder_newton.so +0 -0
  175. casadi/libcasadi_rootfinder_newton.so.3.7 +0 -0
  176. casadi/libcasadi_rootfinder_nlpsol.so +0 -0
  177. casadi/libcasadi_rootfinder_nlpsol.so.3.7 +0 -0
  178. casadi/libcasadi_sundials_common.so +0 -0
  179. casadi/libcasadi_sundials_common.so.3.7 +0 -0
  180. casadi/libcasadi_xmlfile_tinyxml.so +0 -0
  181. casadi/libcasadi_xmlfile_tinyxml.so.3.7 +0 -0
  182. casadi/libcoinmumps.so +0 -0
  183. casadi/libcoinmumps.so.3 +0 -0
  184. casadi/libcoinmumps.so.3.0.1 +0 -0
  185. casadi/libfatrop.so +0 -0
  186. casadi/libipopt.so +0 -0
  187. casadi/libipopt.so.3 +0 -0
  188. casadi/libipopt.so.3.14.11 +0 -0
  189. casadi/libsipopt.so +0 -0
  190. casadi/libsipopt.so.3 +0 -0
  191. casadi/libsipopt.so.3.14.11 +0 -0
  192. casadi/libz.a +0 -0
  193. casadi/libz.so +0 -0
  194. casadi/libz.so.1 +0 -0
  195. casadi/libz.so.1.3.1 +0 -0
  196. casadi/libzip.a +0 -0
  197. casadi/pkgconfig/casadi.pc +1 -1
  198. casadi/pkgconfig/libzip.pc +14 -0
  199. casadi/tools/__init__.py +3 -1
  200. casadi/tools/graph/graph.py +1 -1
  201. casadi/tools/structure3.py +2 -2
  202. {casadi-3.6.7.dist-info → casadi-3.7.0.dist-info}/METADATA +1 -1
  203. {casadi-3.6.7.dist-info → casadi-3.7.0.dist-info}/RECORD +204 -166
  204. casadi/include/tinyxml2.h +0 -2380
  205. casadi/lib/cmake/tinyxml2/tinyxml2-config.cmake +0 -57
  206. casadi/lib/cmake/tinyxml2/tinyxml2-static-targets-release.cmake +0 -19
  207. casadi/lib/libtinyxml2.a +0 -0
  208. casadi/lib/pkgconfig/tinyxml2.pc +0 -10
  209. casadi/tools/structure.py +0 -1446
  210. {casadi-3.6.7.dist-info → casadi-3.7.0.dist-info}/WHEEL +0 -0
@@ -483,8 +483,6 @@ namespace casadi {
483
483
  template<> struct F0XChecker<OP_MUL>{ static const bool check=true;};
484
484
  template<> struct F0XChecker<OP_DIV>{ static const bool check=true;};
485
485
  template<> struct F0XChecker<OP_NEG>{ static const bool check=true;};
486
- template<> struct F0XChecker<OP_POW>{ static const bool check=true;};
487
- template<> struct F0XChecker<OP_CONSTPOW>{ static const bool check=true;};
488
486
  template<> struct F0XChecker<OP_SQRT>{ static const bool check=true;};
489
487
  template<> struct F0XChecker<OP_SQ>{ static const bool check=true;};
490
488
  template<> struct F0XChecker<OP_TWICE>{ static const bool check=true;};
@@ -1156,6 +1154,11 @@ namespace casadi {
1156
1154
  \identifier{1gb} */
1157
1155
  static inline void derF(unsigned char op, const T& x, const T& y, T& f, T* d);
1158
1156
 
1157
+ /** \brief Evaluate function on a const/linear/nonlinear partition
1158
+
1159
+ \identifier{28f} */
1160
+ static inline void fun_linear(unsigned char op, const T*x, const T* y, T* f);
1161
+
1159
1162
  /** \brief Is binary operation?
1160
1163
 
1161
1164
  \identifier{1gc} */
@@ -1545,6 +1548,56 @@ case OP_HYPOT: DerBinaryOperation<OP_HYPOT>::derf(X, Y, F, D); break;
1545
1548
  case OP_LOG1P: \
1546
1549
  case OP_EXPM1:
1547
1550
 
1551
+ template<typename T>
1552
+ inline void casadi_math<T>::fun_linear(unsigned char op, const T* x, const T* y, T* f) {
1553
+ if (op==OP_ADD || op==OP_SUB) {
1554
+ for (int i=0;i<3;++i) {
1555
+ f[i] = T::binary(op, x[i], y[i]);
1556
+ }
1557
+ } else if (op==OP_TWICE || op==OP_NEG) {
1558
+ for (int i=0;i<3;++i) {
1559
+ f[i] = T::unary(op, x[i]);
1560
+ }
1561
+ } else if (op==OP_MUL) {
1562
+ f[0] += x[0]*y[0];
1563
+ f[1] += x[0]*y[1];
1564
+ f[2] += x[0]*y[2];
1565
+ f[1] += x[1]*y[0];
1566
+ f[2] += x[1]*y[1];
1567
+ f[2] += x[1]*y[2];
1568
+ f[2] += x[2]*y[0];
1569
+ f[2] += x[2]*y[1];
1570
+ f[2] += x[2]*y[2];
1571
+ } else if (op==OP_DIV) {
1572
+ bool const_argy = y[1].is_zero() && y[2].is_zero();
1573
+ if (const_argy) {
1574
+ f[0] = x[0]/y[0];
1575
+ f[1] = x[1]/y[0];
1576
+ f[2] = x[2]/y[0];
1577
+ } else {
1578
+ f[2] = (x[0]+x[1]+x[2])/(y[0]+y[1]+y[2]);
1579
+ }
1580
+ } else if (casadi_math<T>::is_unary(op)) {
1581
+ bool const_arg = x[1].is_zero() && x[2].is_zero();
1582
+ if (const_arg) {
1583
+ f[0] = T::unary(op, x[0]);
1584
+ } else {
1585
+ f[2] = T::unary(op, x[0]+x[1]+x[2]);
1586
+ }
1587
+
1588
+ } else if (casadi_math<T>::is_binary(op)) {
1589
+ bool const_argx = x[1].is_zero() && x[2].is_zero();
1590
+ bool const_argy = y[1].is_zero() && y[2].is_zero();
1591
+ if (const_argx && const_argy) {
1592
+ f[0] = T::binary(op, x[0], y[0]);
1593
+ } else {
1594
+ f[2] = T::binary(op, x[0]+x[1]+x[2], y[0]+y[1]+y[2]);
1595
+ }
1596
+ } else {
1597
+ casadi_error("Not implemented");
1598
+ }
1599
+ }
1600
+
1548
1601
  template<typename T>
1549
1602
  bool casadi_math<T>::is_binary(unsigned char op) {
1550
1603
  switch (op) {
@@ -1576,6 +1629,8 @@ case OP_HYPOT: DerBinaryOperation<OP_HYPOT>::derf(X, Y, F, D); break;
1576
1629
  CASADI_MATH_BINARY_BUILTIN
1577
1630
  case OP_IF_ELSE_ZERO:
1578
1631
  return 2;
1632
+ case OP_CALL:
1633
+ return -1;
1579
1634
  default:
1580
1635
  return 1;
1581
1636
  }
@@ -183,6 +183,9 @@ namespace casadi {
183
183
  template<typename T2>
184
184
  std::string str(const std::map<std::string, T2> &p, bool more=false);
185
185
 
186
+ /// String representation of an array
187
+ template<typename T, size_t N>
188
+ std::string str(const std::array<T, N> &p, bool more=false);
186
189
 
187
190
  //! \brief Create a list of strings from __VA_ARGS__, no argument
188
191
  inline std::vector<std::string> strvec() {
@@ -309,8 +312,42 @@ namespace casadi {
309
312
  ss << "}";
310
313
  return ss.str();
311
314
  }
315
+
316
+ template<typename T, size_t N>
317
+ std::string str(const std::array<T, N> &v, bool more) {
318
+ std::stringstream ss;
319
+ ss << "[";
320
+ for (casadi_int i=0; i<N; ++i) {
321
+ if (i!=0) ss << ", ";
322
+ ss << v[i];
323
+ }
324
+ ss << "]";
325
+ return ss.str();
326
+ }
327
+
312
328
  #endif // SWIG
313
329
 
330
+ template<typename _Mutex>
331
+ class conditional_lock_guard {
332
+ public:
333
+ typedef _Mutex mutex_type;
334
+
335
+ conditional_lock_guard(mutex_type& m, bool condition) : mtx_(m), condition_(condition) {
336
+ if (condition_) mtx_.lock();
337
+ }
338
+
339
+ ~conditional_lock_guard() {
340
+ if (condition_) mtx_.unlock();
341
+ }
342
+
343
+ conditional_lock_guard(const conditional_lock_guard&) = delete;
344
+ conditional_lock_guard& operator=(const conditional_lock_guard&) = delete;
345
+
346
+ private:
347
+ mutex_type& mtx_;
348
+ bool condition_;
349
+ };
350
+
314
351
  } // namespace casadi
315
352
 
316
353
  #include "casadi_logger.hpp"
@@ -100,6 +100,21 @@ namespace casadi {
100
100
 
101
101
  \identifier{j9} */
102
102
  static const char* install_prefix();
103
+
104
+ /** \brief Obtain shared library prefix
105
+
106
+ \identifier{2be} */
107
+ static const char* shared_library_prefix();
108
+
109
+ /** \brief Obtain shared library suffix
110
+
111
+ \identifier{2bf} */
112
+ static const char* shared_library_suffix();
113
+
114
+ /** \brief Obtain object file suffix
115
+
116
+ \identifier{2bg} */
117
+ static const char* object_file_suffix();
103
118
  };
104
119
 
105
120
  } // namespace casadi
@@ -487,6 +487,13 @@ namespace std {
487
487
  return stream;
488
488
  }
489
489
 
490
+ /// Enables flushing an std::vector to a stream (prints representation)
491
+ template<typename T, size_t N>
492
+ ostream& operator<<(ostream& stream, const array<T, N>& v) {
493
+ stream << casadi::str(v);
494
+ return stream;
495
+ }
496
+
490
497
  /// Enables flushing an std::set to a stream (prints representation)
491
498
  template<typename T>
492
499
  ostream& operator<<(ostream& stream, const set<T>& v) {
@@ -82,11 +82,19 @@ namespace casadi {
82
82
  /// Add/get a shorthand
83
83
  std::string shorthand(const std::string& name, bool allow_adding=true);
84
84
 
85
- // Add a sparsity pattern
86
- std::string sparsity(const Sparsity& sp);
87
-
88
- // Add a sparsity pattern, get index
89
- casadi_int add_sparsity(const Sparsity& sp);
85
+ /* Add a sparsity pattern
86
+ *
87
+ * \param canonical If true, request canonical form,
88
+ * as opposed to potential dense abbreviation
89
+ */
90
+ std::string sparsity(const Sparsity& sp, bool canonical=true);
91
+
92
+ /* Add a sparsity pattern, get index
93
+ *
94
+ * \param canonical If true, request canonical form,
95
+ * as opposed to potential dense abbreviation
96
+ */
97
+ casadi_int add_sparsity(const Sparsity& sp, bool canonical=true);
90
98
 
91
99
  /** \brief Get the index of an existing sparsity pattern
92
100
 
@@ -163,15 +171,26 @@ namespace casadi {
163
171
  \identifier{s4} */
164
172
  void define_rom_integer(const void* id, casadi_int size);
165
173
 
166
- /** \brief Setup a callback
167
-
168
- \identifier{27s} */
169
- void setup_callback(const std::string& s, const Function& f);
170
174
  /** \brief Access file scope integer read-only memory
171
175
 
172
176
  \identifier{s5} */
173
177
  std::string rom_integer(const void* id) const;
174
178
 
179
+ /** \brief Allocate file scope double writeable memory
180
+
181
+ \identifier{2aw} */
182
+ void define_pool_double(const std::string& name, const std::vector<double>& def);
183
+
184
+ /** \brief Access file scope double writeable memory
185
+
186
+ \identifier{2ax} */
187
+ std::string pool_double(const std::string& name) const;
188
+
189
+ /** \brief Setup a callback
190
+
191
+ \identifier{27s} */
192
+ void setup_callback(const std::string& s, const Function& f);
193
+
175
194
  /** \brief Generate a call to a function (generic signature)
176
195
 
177
196
  \identifier{s6} */
@@ -242,7 +261,7 @@ namespace casadi {
242
261
  /** \brief Avoid stack?
243
262
 
244
263
  \identifier{si} */
245
- bool avoid_stack() { return avoid_stack_;}
264
+ bool avoid_stack() const { return avoid_stack_;}
246
265
 
247
266
  /** \brief Print a constant in a lossless but compact manner
248
267
 
@@ -250,14 +269,38 @@ namespace casadi {
250
269
  std::string constant(double v);
251
270
  std::string constant(casadi_int v);
252
271
  std::string constant(const std::string& v);
272
+ std::string constant(char v);
253
273
 
254
- /** \brief Print an intializer
274
+ std::string format_padded(casadi_int i) const;
275
+
276
+ std::string zeros(casadi_int sz);
277
+ std::string ones(casadi_int sz);
278
+
279
+ /** \brief Print an initializer
255
280
 
256
281
  \identifier{sk} */
257
- std::string initializer(const std::vector<double>& v);
258
- std::string initializer(const std::vector<casadi_int>& v);
259
- std::string initializer(const std::vector<char>& v);
260
- std::string initializer(const std::vector<std::string>& v);
282
+ template <typename T>
283
+ std::string initializer(const std::vector<T>& v) {
284
+ std::stringstream s;
285
+ if (v.size() > max_initializer_elements_per_line) {
286
+ s << "\n ";
287
+ }
288
+
289
+ s << "{";
290
+ for (casadi_int i = 0; i < v.size(); ++i) {
291
+ if (i != 0) {
292
+ if (max_initializer_elements_per_line > 1 &&
293
+ i % max_initializer_elements_per_line == 0) {
294
+ s << ",\n ";
295
+ } else {
296
+ s << ", ";
297
+ }
298
+ }
299
+ s << constant(v[i]);
300
+ }
301
+ s << "}";
302
+ return s.str();
303
+ }
261
304
 
262
305
  /** \brief Sanitize source files for codegen
263
306
 
@@ -487,6 +530,11 @@ namespace casadi {
487
530
  \identifier{te} */
488
531
  std::string norm_inf(casadi_int n, const std::string& x);
489
532
 
533
+ /** \brief norm_1
534
+
535
+ \identifier{2br} */
536
+ std::string norm_1(casadi_int n, const std::string& x);
537
+
490
538
  /**
491
539
 
492
540
  * \brief norm_2
@@ -634,7 +682,12 @@ namespace casadi {
634
682
  AUX_ORACLE_CALLBACK,
635
683
  AUX_OCP_BLOCK,
636
684
  AUX_ORACLE,
637
- AUX_SCALED_COPY
685
+ AUX_SCALED_COPY,
686
+ AUX_BLAZING_DE_BOOR,
687
+ AUX_BLAZING_1D_BOOR_EVAL,
688
+ AUX_BLAZING_2D_BOOR_EVAL,
689
+ AUX_BLAZING_3D_BOOR_EVAL,
690
+ AUX_PRINTME
638
691
  };
639
692
 
640
693
  /** \brief Add a built-in auxiliary function
@@ -650,11 +703,16 @@ namespace casadi {
650
703
  const std::vector<Sparsity>& sp_out);
651
704
 
652
705
  /** Get work vector name from index */
653
- std::string work(casadi_int n, casadi_int sz) const;
706
+ std::string work(casadi_int n, casadi_int sz, bool is_ref) const;
654
707
 
655
708
  /** Get work vector element from index */
656
709
  std::string workel(casadi_int n) const;
657
710
 
711
+ /** \brief Reserve a maximum size of work elements, used for padding of index
712
+
713
+ \identifier{2ay} */
714
+ void reserve_work(casadi_int n);
715
+
658
716
  /** Declare an array */
659
717
  static std::string array(const std::string& type, const std::string& name, casadi_int len,
660
718
  const std::string& def=std::string());
@@ -692,6 +750,9 @@ namespace casadi {
692
750
  void copy_default(const std::string& arg, std::size_t n, const std::string& res,
693
751
  const std::string& def, bool check_rhs=true);
694
752
 
753
+ // Should we elide a copy?
754
+ bool elide_copy(casadi_int sz);
755
+
695
756
  /** \brief Create a fill operation
696
757
 
697
758
  \identifier{tu} */
@@ -887,6 +948,15 @@ namespace casadi {
887
948
  // Have a flag for exporting/importing symbols
888
949
  bool with_export, with_import;
889
950
 
951
+ // Maximum number of declarations per line
952
+ casadi_int max_declarations_per_line;
953
+
954
+ // Maximum number of initializer elements per line
955
+ casadi_int max_initializer_elements_per_line;
956
+
957
+ // Force the external API to use canonical sparsity
958
+ bool force_canonical;
959
+
890
960
  // Prefix symbols in DLLs?
891
961
  std::string dll_export, dll_import;
892
962
 
@@ -907,6 +977,12 @@ namespace casadi {
907
977
  casadi_int indent_;
908
978
  casadi_int current_indent_;
909
979
 
980
+ // Number of zeros/ones
981
+ casadi_int sz_zeros_;
982
+ casadi_int sz_ones_;
983
+
984
+ casadi_int padding_length_;
985
+
910
986
  // Names of exposed functions
911
987
  std::vector<std::string> exposed_fname;
912
988
 
@@ -926,6 +1002,8 @@ namespace casadi {
926
1002
  std::map<std::string, std::string> local_default_;
927
1003
  std::map<const void *, casadi_int> file_scope_double_;
928
1004
  std::map<const void *, casadi_int> file_scope_integer_;
1005
+ std::vector< std::vector<double> > pool_double_defaults_;
1006
+ std::map<std::string, casadi_int> pool_double_;
929
1007
 
930
1008
  // Added functions
931
1009
  struct FunctionMeta {
@@ -56,6 +56,7 @@
56
56
  #include "expm.hpp"
57
57
  #include "interpolant.hpp"
58
58
  #include "external.hpp"
59
+ #include "blazing_spline.hpp"
59
60
 
60
61
  // Misc
61
62
  #include "integration_tools.hpp"
@@ -66,5 +67,9 @@
66
67
  #include "optistack.hpp"
67
68
  #include "serializer.hpp"
68
69
  #include "tools.hpp"
70
+ #include "resource.hpp"
71
+ #include "archiver.hpp"
72
+ #include "filesystem.hpp"
73
+ #include "options.hpp"
69
74
 
70
75
  #endif // CASADI_CORE_HPP