![]() |
User Guide
|
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include "ast/program.hpp"
#include "codegen/codegen_acc_visitor.hpp"
#include "codegen/codegen_coreneuron_cpp_visitor.hpp"
#include "codegen/codegen_helper_visitor.hpp"
#include "parser/nmodl_driver.hpp"
#include "test/unit/utils/test_utils.hpp"
#include "visitors/implicit_argument_visitor.hpp"
#include "visitors/inline_visitor.hpp"
#include "visitors/neuron_solve_visitor.hpp"
#include "visitors/perf_visitor.hpp"
#include "visitors/solve_block_visitor.hpp"
#include "visitors/sympy_solver_visitor.hpp"
#include "visitors/symtab_visitor.hpp"
Go to the source code of this file.
Functions | |
std::shared_ptr< CodegenCoreneuronCppVisitor > | create_coreneuron_cpp_visitor (const std::shared_ptr< ast::Program > &ast, const std::string &, std::stringstream &ss) |
Helper for creating C codegen visitor. More... | |
std::shared_ptr< CodegenAccVisitor > | create_acc_visitor (const std::shared_ptr< ast::Program > &ast, const std::string &, std::stringstream &ss) |
Helper for creating OpenACC codegen visitor. More... | |
std::string | get_coreneuron_cpp_code (const std::string &nmodl_text, const bool generate_gpu_code=false) |
print entire code More... | |
SCENARIO ("Check instance variable definition order", "[codegen][var_order]") | |
SCENARIO ("Check parameter constness with VERBATIM block", "[codegen][verbatim_variable_constness]") | |
SCENARIO ("Check NEURON globals are added to the instance struct on demand", "[codegen][global_variables]") | |
SCENARIO ("Check code generation for TABLE statements", "[codegen][array_variables]") | |
SCENARIO ("Check that BEFORE/AFTER block are well generated", "[codegen][before/after]") | |
SCENARIO ("Check CONSTANT variables are added to global variable structure", "[codegen][global_variables]") | |
SCENARIO ("Check code generation for FUNCTION_TABLE block", "[codegen][function_table]") | |
SCENARIO ("Check that loops are well generated", "[codegen][loops]") | |
SCENARIO ("Check that top verbatim blocks are well generated", "[codegen][top verbatim block]") | |
SCENARIO ("Check that codegen generate event functions well", "[codegen][net_events]") | |
SCENARIO ("Some tests on derivimplicit", "[codegen][derivimplicit_solver]") | |
SCENARIO ("Some tests on euler solver", "[codegen][euler_solver]") | |
SCENARIO ("Check codegen for MUTEX and PROTECT", "[codegen][mutex_protect]") | |
SCENARIO ("Array STATE variable", "[codegen][array_state]") | |
std::shared_ptr<CodegenAccVisitor> create_acc_visitor | ( | const std::shared_ptr< ast::Program > & | ast, |
const std::string & | , | ||
std::stringstream & | ss | ||
) |
Helper for creating OpenACC codegen visitor.
construct symbol table
run all necessary pass
create C code generation visitor
Definition at line 55 of file codegen_coreneuron_cpp_visitor.cpp.
std::shared_ptr<CodegenCoreneuronCppVisitor> create_coreneuron_cpp_visitor | ( | const std::shared_ptr< ast::Program > & | ast, |
const std::string & | , | ||
std::stringstream & | ss | ||
) |
Helper for creating C codegen visitor.
construct symbol table
run all necessary pass
create C code generation visitor
Definition at line 35 of file codegen_coreneuron_cpp_visitor.cpp.
std::string get_coreneuron_cpp_code | ( | const std::string & | nmodl_text, |
const bool | generate_gpu_code = false |
||
) |
print entire code
Definition at line 72 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Array STATE variable" | , |
"" | [codegen][array_state] | ||
) |
Definition at line 1008 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check code generation for FUNCTION_TABLE block" | , |
"" | [codegen][function_table] | ||
) |
Definition at line 670 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check code generation for TABLE statements" | , |
"" | [codegen][array_variables] | ||
) |
Definition at line 382 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check codegen for MUTEX and PROTECT" | , |
"" | [codegen][mutex_protect] | ||
) |
Definition at line 965 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check CONSTANT variables are added to global variable structure" | , |
"" | [codegen][global_variables] | ||
) |
Definition at line 636 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check instance variable definition order" | , |
"" | [codegen][var_order] | ||
) |
Definition at line 86 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check NEURON globals are added to the instance struct on demand" | , |
"" | [codegen][global_variables] | ||
) |
Definition at line 332 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check parameter constness with VERBATIM block" | , |
"" | [codegen][verbatim_variable_constness] | ||
) |
Definition at line 293 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check that BEFORE/AFTER block are well generated" | , |
"" | [codegen][before/after] | ||
) |
Definition at line 460 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check that codegen generate event functions well" | , |
"" | [codegen][net_events] | ||
) |
Definition at line 767 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check that loops are well generated" | , |
"" | [codegen][loops] | ||
) |
Definition at line 691 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Check that top verbatim blocks are well generated" | , |
"" | [codegen][top verbatim block] | ||
) |
Definition at line 734 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Some tests on derivimplicit" | , |
"" | [codegen][derivimplicit_solver] | ||
) |
Definition at line 885 of file codegen_coreneuron_cpp_visitor.cpp.
SCENARIO | ( | "Some tests on euler solver" | , |
"" | [codegen][euler_solver] | ||
) |
Definition at line 930 of file codegen_coreneuron_cpp_visitor.cpp.