User Guide
codegen_neuron_cpp_visitor.cpp File Reference
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include "ast/program.hpp"
#include "codegen/codegen_neuron_cpp_visitor.hpp"
#include "parser/nmodl_driver.hpp"
#include "test/unit/utils/test_utils.hpp"
#include "visitors/function_callpath_visitor.hpp"
#include "visitors/inline_visitor.hpp"
#include "visitors/neuron_solve_visitor.hpp"
#include "visitors/solve_block_visitor.hpp"
#include "visitors/symtab_visitor.hpp"

Go to the source code of this file.

Functions

std::shared_ptr< CodegenNeuronCppVisitor > create_neuron_cpp_visitor (const std::shared_ptr< ast::Program > &ast, const std::string &, std::stringstream &ss)
 Helper for creating C codegen visitor. More...
 
 SCENARIO ("Check whether PROCEDURE and FUNCTION need setdata call", "[codegen][needsetdata]")
 
std::string create_mod_file_write (const std::string &var)
 
std::string create_mod_file_read (const std::string &var)
 
std::string transpile (const std::string &nmodl)
 
 SCENARIO ("Write `cao`.", "[codegen]")
 
 SCENARIO ("Write `cai`.", "[codegen]")
 
 SCENARIO ("Write `eca`.", "[codegen]")
 
 SCENARIO ("Read `cao`.", "[codegen]")
 
 SCENARIO ("Read `cai`.", "[codegen]")
 
 SCENARIO ("Read `eca`.", "[codegen]")
 
 SCENARIO ("ARTIFICIAL_CELL with `net_send`")
 
 SCENARIO ("ARTIFICIAL_CELL with `net_move`")
 

Function Documentation

◆ create_mod_file_read()

std::string create_mod_file_read ( const std::string &  var)

Definition at line 114 of file codegen_neuron_cpp_visitor.cpp.

◆ create_mod_file_write()

std::string create_mod_file_write ( const std::string &  var)

Definition at line 97 of file codegen_neuron_cpp_visitor.cpp.

◆ create_neuron_cpp_visitor()

std::shared_ptr<CodegenNeuronCppVisitor> create_neuron_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 32 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [1/9]

SCENARIO ( "ARTIFICIAL_CELL with `net_move`"  )

Definition at line 234 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [2/9]

SCENARIO ( "ARTIFICIAL_CELL with `net_send`"  )

Definition at line 216 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [3/9]

SCENARIO ( "Check whether PROCEDURE and FUNCTION need setdata call"  ,
""  [codegen][needsetdata] 
)

Definition at line 54 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [4/9]

SCENARIO ( "Read `cai`."  ,
""  [codegen] 
)

Definition at line 192 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [5/9]

SCENARIO ( "Read `cao`."  ,
""  [codegen] 
)

Definition at line 180 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [6/9]

SCENARIO ( "Read `eca`."  ,
""  [codegen] 
)

Definition at line 204 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [7/9]

SCENARIO ( "Write `cai`."  ,
""  [codegen] 
)

Definition at line 155 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [8/9]

SCENARIO ( "Write `cao`."  ,
""  [codegen] 
)

Definition at line 142 of file codegen_neuron_cpp_visitor.cpp.

◆ SCENARIO() [9/9]

SCENARIO ( "Write `eca`."  ,
""  [codegen] 
)

Definition at line 168 of file codegen_neuron_cpp_visitor.cpp.

◆ transpile()

std::string transpile ( const std::string &  nmodl)

Definition at line 133 of file codegen_neuron_cpp_visitor.cpp.