Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid toggling codegen. #1116

Merged
merged 2 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegen/codegen_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -940,4 +940,4 @@ void CodegenCppVisitor::visit_program(const Program& node) {
}

} // namespace codegen
} // namespace nmodl
} // namespace nmodl
2 changes: 1 addition & 1 deletion src/codegen/codegen_cpp_visitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,4 +1173,4 @@ void CodegenCppVisitor::print_vector_elements(const std::vector<T>& elements,
/** \} */ // end of codegen_backends

} // namespace codegen
} // namespace nmodl
} // namespace nmodl
13 changes: 1 addition & 12 deletions src/codegen/codegen_neuron_cpp_visitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,6 @@
if (info.functions.empty() && info.procedures.empty()) {
return;
}
codegen = true;
/// TODO: Fill in
codegen = false;
}


Expand All @@ -115,9 +112,7 @@

/// TODO: Edit for NEURON
void CodegenNeuronCppVisitor::print_function_procedure_helper(const ast::Block& node) {
codegen = true;
/// TODO: Fill in
codegen = false;
return;

Check warning on line 115 in src/codegen/codegen_neuron_cpp_visitor.cpp

View check run for this annotation

Codecov / codecov/patch

src/codegen/codegen_neuron_cpp_visitor.cpp#L115

Added line #L115 was not covered by tests
}


Expand Down Expand Up @@ -501,16 +496,13 @@


void CodegenNeuronCppVisitor::print_nrn_jacob() {
codegen = true;
printer->add_newline(2);
printer->add_line("/** nrn_jacob function */");

printer->fmt_line(
"static void {}(_nrn_model_sorted_token const& _sorted_token, NrnThread* "
"_nt, Memb_list* _ml_arg, int _type) {{}}",
method_name(naming::NRN_JACOB_METHOD));

codegen = false;
}


Expand Down Expand Up @@ -601,7 +593,6 @@
return;
}

codegen = true;
printer->add_newline(2);

printer->fmt_line(
Expand All @@ -610,8 +601,6 @@
method_name(naming::NRN_CUR_METHOD));

/// TODO: Fill in

codegen = false;
}


Expand Down
Loading