|
LIBINT 2.9.0
|
CppCodeContext is an implementation of CodeContext for C++. More...
#include <context.h>


Public Member Functions | |
| CppCodeContext (const std::shared_ptr< CompilationParameters > &cparams, bool vectorize=false) | |
| std::string | code_prefix () const override |
| Implementation of CodeContext::code_prefix() | |
| std::string | code_postfix () const override |
| Implementation of CodeContext::code_postfix() | |
| std::string | copyright () const override |
| Implementation of CodeContext::copyright() | |
| std::string | std_header () const override |
| Implementation of CodeContext::std_header() | |
| std::string | std_function_header () const override |
| Implementation of CodeContext::std_function_header() | |
| std::string | label_to_name (const std::string &label) const override |
| Implementation of CodeContext::label_to_name(label) | |
| std::string | declare (const std::string &type, const std::string &name) const override |
| Implementation of CodeContext::declare() | |
| std::string | declare_v (const std::string &type, const std::string &name, const std::string &nelem) const override |
| Implementation of CodeContext::declare_v() | |
| std::string | decldef (const std::string &type, const std::string &name, const std::string &value) override |
| decldef returns a statement which declares variable named 'name' of type 'type' and defines its value to be 'value' | |
| std::string | assign (const std::string &name, const std::string &value) override |
| Implementation of CodeContext::assign() | |
| std::string | accumulate (const std::string &name, const std::string &value) override |
| Implementation of CodeContext::accumulate() | |
| std::string | assign_binary_expr (const std::string &name, const std::string &left, const std::string &oper, const std::string &right) override |
| Implementation of CodeContext::assign_binary_expr() | |
| std::string | assign_ternary_expr (const std::string &name, const std::string &arg1, const std::string &oper1, const std::string &arg2, const std::string &oper2, const std::string &arg3) override |
| assign_ternary_expr returns a statement which assigns ternary expression 'arg1 oper1 arg2 oper2 arg3' to variable 'name' | |
| std::string | accumulate_binary_expr (const std::string &name, const std::string &left, const std::string &oper, const std::string &right) override |
| Implementation of CodeContext::accumulate_binary_expr() | |
| std::string | accumulate_ternary_expr (const std::string &name, const std::string &arg1, const std::string &oper1, const std::string &arg2, const std::string &oper2, const std::string &arg3) override |
| accumulate_ternary_expr returns a statement which accumulates ternary expression 'arg1 oper1 arg2 oper2 arg3' to variable 'name' | |
| std::string | stack_address (const DGVertex::Address &a) const override |
| Implementation of CodeContext::stack_address() | |
| std::string | macro_define (const std::string &name) const override |
| Implementation of CodeContext::macro_define() | |
| std::string | macro_define (const std::string &name, const std::string &value) const override |
| Implementation of CodeContext::macro_define() | |
| std::string | macro_if (const std::string &name) const override |
| Implementation of CodeContext::macro_if() | |
| std::string | macro_ifdef (const std::string &name) const override |
| Implementation of CodeContext::macro_ifdef() | |
| std::string | macro_endif () const override |
| Implementation of CodeContext::macro_endif() | |
| std::string | comment (const std::string &statement) const override |
| Implementation of CodeContext::comment(statement) | |
| std::string | open_block () const override |
| Implementation of CodeContext::open_block() | |
| std::string | close_block () const override |
| Implementation of CodeContext::close_block() | |
| std::string | end_of_stat () const override |
| Implementation of CodeContext::end_of_stat() | |
| std::string | value_to_pointer (const std::string &val) const override |
| Implementation of CodeContext::value_to_pointer() | |
| std::shared_ptr< ForLoop > | for_loop (std::string &varname, const std::shared_ptr< Entity > &less_than, const std::shared_ptr< Entity > &start_at) const override |
| Implementation of CodeContext::for_loop() | |
| std::string | inteval_type_name (const std::string &task) const override |
| Implementation of CodeContext::inteval_type_name() | |
| std::string | inteval_spec_type_name (const std::string &task) const override |
| Implementation of CodeContext::inteval_spec_type_name() | |
| std::string | inteval_gen_type_name () const override |
| Implementation of CodeContext::inteval_spec_type_name() | |
Public Member Functions inherited from libint2::CodeContext | |
| const std::shared_ptr< CompilationParameters > & | cparams () const |
| Returns the CompilationParameters used to create this context. | |
| void | turn_comments (bool on) |
| turn comments on and off (the default is on) | |
| bool | comments_on () const |
| returns true if to print comments | |
| virtual void | reset () |
| this function resets the context to be used for the next source file | |
| template<typename T > | |
| std::string | unique_name () const |
| unique_name<T> returns a unique name for a variable of type T | |
| template<typename T > | |
| std::string | type_name () const |
| type_name<T> returns name for type T | |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
| template<> | |
| std::string | type_name () const |
Additional Inherited Members | |
Protected Member Functions inherited from libint2::CodeContext | |
| CodeContext (const std::shared_ptr< CompilationParameters > &cparams) | |
| Lone constructor takes CompilationParams. | |
| unsigned int | next_fp_index () const |
| next fp index | |
| unsigned int | next_int_index () const |
| next int index | |
Static Protected Member Functions inherited from libint2::CodeContext | |
| static std::string | replace_chars (const std::string &S, const std::string &From, const std::string &To) |
| replaces every appearance of From with To in S | |
CppCodeContext is an implementation of CodeContext for C++.
|
overridevirtual |
Implementation of CodeContext::accumulate()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::accumulate_binary_expr()
Implements libint2::CodeContext.
|
overridevirtual |
accumulate_ternary_expr returns a statement which accumulates ternary expression 'arg1 oper1 arg2 oper2 arg3' to variable 'name'
Implements libint2::CodeContext.
|
overridevirtual |
|
overridevirtual |
Implementation of CodeContext::assign_binary_expr()
Implements libint2::CodeContext.
|
overridevirtual |
assign_ternary_expr returns a statement which assigns ternary expression 'arg1 oper1 arg2 oper2 arg3' to variable 'name'
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::close_block()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::code_postfix()
Implements libint2::CodeContext.
References libint2::CodeContext::cparams().
|
overridevirtual |
Implementation of CodeContext::code_prefix()
Implements libint2::CodeContext.
References libint2::CodeContext::cparams().
|
overridevirtual |
Implementation of CodeContext::comment(statement)
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::copyright()
Implements libint2::CodeContext.
|
overridevirtual |
|
overridevirtual |
Implementation of CodeContext::declare_v()
Implements libint2::CodeContext.
References end_of_stat().
|
overridevirtual |
decldef returns a statement which declares variable named 'name' of type 'type' and defines its value to be 'value'
Implements libint2::CodeContext.
References assign().
|
overridevirtual |
Implementation of CodeContext::end_of_stat()
Implements libint2::CodeContext.
Referenced by declare(), and declare_v().
|
overridevirtual |
Implementation of CodeContext::for_loop()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::inteval_spec_type_name()
Implements libint2::CodeContext.
Referenced by inteval_type_name().
|
overridevirtual |
Implementation of CodeContext::inteval_spec_type_name()
Implements libint2::CodeContext.
Referenced by inteval_type_name().
|
overridevirtual |
Implementation of CodeContext::inteval_type_name()
Implements libint2::CodeContext.
References libint2::CodeContext::cparams(), inteval_gen_type_name(), and inteval_spec_type_name().
|
overridevirtual |
Implementation of CodeContext::label_to_name(label)
Implements libint2::CodeContext.
References libint2::CodeContext::replace_chars().
|
overridevirtual |
Implementation of CodeContext::macro_define()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::macro_define()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::macro_endif()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::macro_if()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::macro_ifdef()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::open_block()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::stack_address()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::std_function_header()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::std_header()
Implements libint2::CodeContext.
|
overridevirtual |
Implementation of CodeContext::value_to_pointer()
Implements libint2::CodeContext.