Skip to content

Commit c0cd4f5

Browse files
author
Goran Jelic-Cizmek
committed
Remove codegen parts for now
1 parent fefafdd commit c0cd4f5

7 files changed

Lines changed: 0 additions & 63 deletions

src/nmodl/codegen/codegen_coreneuron_cpp_visitor.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -703,8 +703,6 @@ class CodegenCoreneuronCppVisitor: public CodegenCppVisitor {
703703
*/
704704
void print_net_send_call(const ast::FunctionCall& node) override;
705705

706-
void print_nrn_state_disc(const ast::FunctionCall& node) override {}
707-
708706

709707
/**
710708
* Print call to net\_move

src/nmodl/codegen/codegen_cpp_visitor.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,6 @@ void CodegenCppVisitor::print_function_call(const FunctionCall& node) {
525525
return;
526526
}
527527

528-
if (is_nrn_state_disc(name)) {
529-
print_nrn_state_disc(node);
530-
return;
531-
}
532-
533528
if (is_net_send(name)) {
534529
print_net_send_call(node);
535530
return;

src/nmodl/codegen/codegen_cpp_visitor.hpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -847,11 +847,6 @@ class CodegenCppVisitor: public visitor::ConstAstVisitor {
847847
*/
848848
virtual void print_nrn_pointing(const ast::FunctionCall& node);
849849

850-
/**
851-
* Print code for NMODL's \c state_discontinuity call
852-
*/
853-
virtual void print_nrn_state_disc(const ast::FunctionCall& node) = 0;
854-
855850

856851
/**
857852
* Print call to net\_move

src/nmodl/codegen/codegen_neuron_cpp_visitor.cpp

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2764,44 +2764,6 @@ void CodegenNeuronCppVisitor::print_net_event_call(const ast::FunctionCall& /* n
27642764
printer->fmt_text("net_event({}, t)", point_process);
27652765
}
27662766

2767-
void CodegenNeuronCppVisitor::print_nrn_state_disc(const ast::FunctionCall& node) {
2768-
printer->push_block("if (nrn_netrec_state_adjust && !cvode_active_)");
2769-
printer->add_text("double state = ");
2770-
const auto& args = node.get_arguments();
2771-
const auto& first = args[0];
2772-
const auto& second = args[1];
2773-
first->accept(*this);
2774-
printer->add_text(";");
2775-
printer->add_newline();
2776-
printer->add_text("double primary_delta = (");
2777-
second->accept(*this);
2778-
printer->add_text(") - state;");
2779-
printer->add_newline();
2780-
printer->add_line("double dtsav = nt->_dt;");
2781-
printer->fmt_push_block("for(auto i = 0; i < {}(0); ++i)",
2782-
method_name(naming::CVODE_COUNT_NAME));
2783-
printer->add_line("// TODO: add setting stuff to zero");
2784-
printer->pop_block();
2785-
printer->add_line("// TODO: add setting first element");
2786-
printer->add_line("nt->_dt *= 0.5;");
2787-
printer->add_line("// TODO: add v");
2788-
printer->fmt_line("{}({});",
2789-
method_name(naming::CVODE_UPDATE_STIFF_NAME),
2790-
get_arg_str(cvode_update_parameters()));
2791-
printer->add_line("nt->_dt = dtsav;");
2792-
printer->fmt_push_block("for(auto i = 0; i < {}(0); ++i)",
2793-
method_name(naming::CVODE_COUNT_NAME));
2794-
printer->add_line("// TODO: add updating of data");
2795-
printer->pop_block();
2796-
printer->pop_block();
2797-
printer->push_block("else");
2798-
print_vector_elements(args, " = ");
2799-
printer->add_text(";");
2800-
printer->add_newline();
2801-
printer->pop_block();
2802-
}
2803-
2804-
28052767
void CodegenNeuronCppVisitor::print_function_table_call(const FunctionCall& node) {
28062768
auto name = node.get_node_name();
28072769
const auto& arguments = node.get_arguments();

src/nmodl/codegen/codegen_neuron_cpp_visitor.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,6 @@ class CodegenNeuronCppVisitor: public CodegenCppVisitor {
173173
*/
174174
void print_net_send_call(const ast::FunctionCall& node) override;
175175

176-
void print_nrn_state_disc(const ast::FunctionCall& node) override;
177-
178176

179177
/**
180178
* Print call to net\_move

src/nmodl/visitors/visitor_utils.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,5 @@ bool is_nrn_pointing(const std::string& name) {
302302
return name == codegen::naming::NRN_POINTING_METHOD;
303303
}
304304

305-
bool is_nrn_state_disc(const std::string& name) {
306-
return name == codegen::naming::NRN_STATE_DISC_METHOD;
307-
}
308-
309305

310306
} // namespace nmodl

src/nmodl/visitors/visitor_utils.hpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,4 @@ bool is_random_construct_function(const std::string& name);
147147
/// Is given name `nrn_pointing`.
148148
bool is_nrn_pointing(const std::string& name);
149149

150-
/**
151-
* Checks if given function name is \c state_discontinuity
152-
* \param name The function name to check
153-
* \return \c true if the function is state_discontinuity
154-
*/
155-
bool is_nrn_state_disc(const std::string& name);
156-
157150
} // namespace nmodl

0 commit comments

Comments
 (0)