From 3acc4b33e1995191191071c673448a8182e83c56 Mon Sep 17 00:00:00 2001 From: Goran Jelic-Cizmek Date: Mon, 28 Oct 2024 15:05:02 +0100 Subject: [PATCH] Move method descriptions to header --- src/codegen/codegen_neuron_cpp_visitor.cpp | 4 ---- src/codegen/codegen_neuron_cpp_visitor.hpp | 7 ++++++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/codegen/codegen_neuron_cpp_visitor.cpp b/src/codegen/codegen_neuron_cpp_visitor.cpp index a22a82a66..ae4d49d7e 100644 --- a/src/codegen/codegen_neuron_cpp_visitor.cpp +++ b/src/codegen/codegen_neuron_cpp_visitor.cpp @@ -2646,7 +2646,6 @@ CodegenCppVisitor::ParamVector CodegenNeuronCppVisitor::cvode_update_parameters( } -/* print the function returning the # of ODEs to solve */ void CodegenNeuronCppVisitor::print_cvode_count() { printer->fmt_push_block("static constexpr int {}(int _type)", method_name(naming::CVODE_COUNT_NAME)); @@ -2655,7 +2654,6 @@ void CodegenNeuronCppVisitor::print_cvode_count() { printer->add_newline(2); } -/* print the function for setup of tolerances */ void CodegenNeuronCppVisitor::print_cvode_tolerances() { const CodegenNeuronCppVisitor::ParamVector tolerances_parameters = { {"", "Prop*", "", "_prop"}, @@ -2692,7 +2690,6 @@ void CodegenNeuronCppVisitor::print_cvode_tolerances() { printer->add_newline(2); } -/* print the CVODE update function (called ``name``) from ``block`` */ void CodegenNeuronCppVisitor::print_cvode_update(const std::string& name, const ast::StatementBlock& block) { printer->fmt_push_block("static int {}({})", @@ -2709,7 +2706,6 @@ void CodegenNeuronCppVisitor::print_cvode_update(const std::string& name, printer->add_newline(2); } -/* print the setup function (that calls an update function) */ void CodegenNeuronCppVisitor::print_cvode_setup(const std::string& setup_name, const std::string& update_name) { printer->fmt_push_block("static void {}({})", diff --git a/src/codegen/codegen_neuron_cpp_visitor.hpp b/src/codegen/codegen_neuron_cpp_visitor.hpp index a4984b4ff..ea278b979 100644 --- a/src/codegen/codegen_neuron_cpp_visitor.hpp +++ b/src/codegen/codegen_neuron_cpp_visitor.hpp @@ -784,12 +784,17 @@ class CodegenNeuronCppVisitor: public CodegenCppVisitor { */ void print_cvode_definitions(); + /* print the CVODE function returning the # of ODEs to solve */ void print_cvode_count(); + /* print the CVODE function for setup of tolerances */ void print_cvode_tolerances(); - void print_cvode_update(const std::string& name, const ast::StatementBlock& node); + /* print the CVODE update function ``name`` from ``block`` */ + void print_cvode_update(const std::string& name, const ast::StatementBlock& block); + /* print the CVODE setup function ``setup_name`` that calls the CVODE update function + * ``update_name`` */ void print_cvode_setup(const std::string& setup_name, const std::string& update_name);