User Guide
codegen_coreneuron_cpp_visitor.cpp File Reference

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]")
 

Function Documentation

◆ create_acc_visitor()

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.

◆ create_coreneuron_cpp_visitor()

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.

◆ get_coreneuron_cpp_code()

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() [1/14]

SCENARIO ( "Array STATE variable"  ,
""  [codegen][array_state] 
)

Definition at line 1008 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [2/14]

SCENARIO ( "Check code generation for FUNCTION_TABLE block"  ,
""  [codegen][function_table] 
)

Definition at line 670 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [3/14]

SCENARIO ( "Check code generation for TABLE statements"  ,
""  [codegen][array_variables] 
)

Definition at line 382 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [4/14]

SCENARIO ( "Check codegen for MUTEX and PROTECT"  ,
""  [codegen][mutex_protect] 
)

Definition at line 965 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [5/14]

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() [6/14]

SCENARIO ( "Check instance variable definition order"  ,
""  [codegen][var_order] 
)

Definition at line 86 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [7/14]

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() [8/14]

SCENARIO ( "Check parameter constness with VERBATIM block"  ,
""  [codegen][verbatim_variable_constness] 
)

Definition at line 293 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [9/14]

SCENARIO ( "Check that BEFORE/AFTER block are well generated"  ,
""  [codegen][before/after] 
)

Definition at line 460 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [10/14]

SCENARIO ( "Check that codegen generate event functions well"  ,
""  [codegen][net_events] 
)

Definition at line 767 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [11/14]

SCENARIO ( "Check that loops are well generated"  ,
""  [codegen][loops] 
)

Definition at line 691 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [12/14]

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() [13/14]

SCENARIO ( "Some tests on derivimplicit"  ,
""  [codegen][derivimplicit_solver] 
)

Definition at line 885 of file codegen_coreneuron_cpp_visitor.cpp.

◆ SCENARIO() [14/14]

SCENARIO ( "Some tests on euler solver"  ,
""  [codegen][euler_solver] 
)

Definition at line 930 of file codegen_coreneuron_cpp_visitor.cpp.