Commit 0c9e2797 authored by Rohan Budhiraja's avatar Rohan Budhiraja
Browse files

[code-handler] use arrayview for generatecode

parent 6eba55d6
......@@ -45,12 +45,14 @@ namespace pycppad
template<typename VectorType, typename LangType, typename NameGenType>
static std::string generateCode(CodeHandler& self,
LangType& lang,
VectorType& dependent,
const VectorType& dependent,
NameGenType& nameGen,
const std::string& jobName)
std::ostringstream oss;
self.generateCode(oss, lang, dependent, nameGen, jobName);
VectorType& dependent_= const_cast<VectorType&>(dependent);
::CppAD::cg::ArrayView<typename VectorType::Scalar> dependent_av(, dependent_.size());
self.generateCode(oss, lang, dependent_av, nameGen, jobName);
return oss.str();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment