User Guide
codegen_cpp_visitor.hpp File Reference

Visitor for printing C++ code compatible with legacy api of CoreNEURON More...

Detailed Description

Visitor for printing C++ code compatible with legacy api of CoreNEURON

Definition in file codegen_cpp_visitor.hpp.

#include <algorithm>
#include <cmath>
#include <ctime>
#include <numeric>
#include <ostream>
#include <string>
#include <string_view>
#include <utility>
#include "codegen/codegen_info.hpp"
#include "codegen/codegen_naming.hpp"
#include "printer/code_printer.hpp"
#include "symtab/symbol_table.hpp"
#include "utils/logger.hpp"
#include "visitors/ast_visitor.hpp"

Go to the source code of this file.

Classes

class  nmodl::codegen::IndexVariableInfo
 Helper to represent information about index/int variables. More...
 
class  nmodl::codegen::ShadowUseStatement
 Represents ion write statement during code generation. More...
 
class  nmodl::codegen::CodegenCppVisitor
 Visitor for printing C++ code compatible with legacy api of CoreNEURON More...
 

Namespaces

 nmodl
 encapsulates code generation backend implementations
 
 nmodl::codegen
 

Enumerations

enum  nmodl::codegen::BlockType {
  nmodl::codegen::BlockType::Initial, nmodl::codegen::BlockType::Constructor, nmodl::codegen::BlockType::Destructor, nmodl::codegen::BlockType::Equation,
  nmodl::codegen::BlockType::State, nmodl::codegen::BlockType::Watch, nmodl::codegen::BlockType::NetReceive, nmodl::codegen::BlockType::BeforeAfter,
  nmodl::codegen::BlockType::BlockTypeEnd
}
 Helper to represent various block types. More...
 
enum  nmodl::codegen::MemberType { nmodl::codegen::MemberType::index, nmodl::codegen::MemberType::range, nmodl::codegen::MemberType::global, nmodl::codegen::MemberType::thread }
 Helper to represent various variables types. More...
 
enum  nmodl::codegen::CppObjectSpecifier {
  nmodl::codegen::CppObjectSpecifier::Inline, nmodl::codegen::CppObjectSpecifier::Static, nmodl::codegen::CppObjectSpecifier::Virtual, nmodl::codegen::CppObjectSpecifier::Explicit,
  nmodl::codegen::CppObjectSpecifier::Friend, nmodl::codegen::CppObjectSpecifier::Constexpr, nmodl::codegen::CppObjectSpecifier::Extern, nmodl::codegen::CppObjectSpecifier::ExternC,
  nmodl::codegen::CppObjectSpecifier::ThreadLocal, nmodl::codegen::CppObjectSpecifier::Const, nmodl::codegen::CppObjectSpecifier::Volatile
}
 various specifiers (mostly for function codegen) More...
 

Functions

std::string nmodl::codegen::get_name (ast::Ast const *sym)
 
std::string nmodl::codegen::get_name (const std::shared_ptr< symtab::Symbol > &sym)
 
std::string nmodl::codegen::get_name (const IndexVariableInfo &var)
 
template<class T >
int nmodl::codegen::get_index_from_name (const std::vector< T > &variables, const std::string &name)
 
int nmodl::codegen::get_length (const std::shared_ptr< symtab::Symbol > &sym)
 
int nmodl::codegen::get_length (const IndexVariableInfo &var)
 
template<class T >
int nmodl::codegen::get_prefixsum_from_name (const std::vector< T > &variables, const std::string &name)