Peano
Loading...
Searching...
No Matches
printers.CPPPrinter.CPPPrinter Class Reference
Inheritance diagram for printers.CPPPrinter.CPPPrinter:
Collaboration diagram for printers.CPPPrinter.CPPPrinter:

Public Member Functions

 __init__ (self, spaces_per_tab=2)
 
str get_indent (self, int indent_level)
 
 print_function_definition (self, SyntaxTree.FunctionDefinition function_definition, indent_level=0)
 
 print_function_declaration (self, SyntaxTree.FunctionDefinition function_definition, indent_level=0)
 
 print_function_definition_with_timer (self, SyntaxTree.FunctionDefinition function_definition, indent_level=0)
 
 print_function_declaration_with_timer (self, SyntaxTree.FunctionDefinition function_definition, indent_level=0)
 
 print_argument (self, SyntaxTree.Argument argument, indent_level=0)
 
 print_name (self, SyntaxTree.Name name, indent_level=0)
 
 print_integer (self, SyntaxTree.Integer integer, indent_level=0)
 
 print_if (self, SyntaxTree.If if_statement, indent_level=0)
 
 print_for (self, SyntaxTree.For for_statement, indent_level=0)
 
 print_comment (self, SyntaxTree.Comment comment, indent_level=0)
 
 print_function_call (self, SyntaxTree.FunctionCall function_call, indent_level=0)
 
 print_max (self, SyntaxTree.Max max, indent_level=0)
 
 print_memory_allocation (self, SyntaxTree.MemoryAllocation memory_allocation, indent_level=0)
 
 print_memory_deallocation (self, SyntaxTree.MemoryDeallocation memory_deallocation, indent_level=0)
 
 print_assignment (self, SyntaxTree.Assignment assignment, indent_level=0)
 
 print_construction (self, SyntaxTree.Construction construction, indent_level=0)
 
 print_data_block_construction_from_existing (self, SyntaxTree.DataBlockConstructionFromExisting construction, indent_level=0)
 
 print_data_block_construction_from_operation (self, SyntaxTree.DataBlockConstructionFromOperation construction, indent_level=0)
 
 print_data_block_construction_from_function (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_data_block_construction_from_matrix_vector_product (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_data_block_construction_from_dot_product (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_diagonal_matrix (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_matrix (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_diagonal_matrix_construction_from_kronecker_product (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_diagonal_matrix_construction_from_value (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_matrix_construction_from_kronecker_product (self, SyntaxTree.DataBlockConstructionFromFunction construction, indent_level=0)
 
 print_data_block_assignment (self, SyntaxTree.DataBlockAssignment assignment, indent_level=0)
 
 print_boolean (self, SyntaxTree.Boolean boolean, indent_level=0)
 
 print_string (self, SyntaxTree.String string, indent_level=0)
 
 print_float (self, SyntaxTree.Float float, indent_level=0)
 
 print_data_block (self, SyntaxTree.DataBlock data_block, indent_level=0)
 
 print_subscript (self, SyntaxTree.Subscript subscript, indent_level=0)
 
 print_reference (self, SyntaxTree.Reference reference, indent_level=0)
 
 print_vector (self, SyntaxTree.Vector vector, indent_level=0)
 
 print_vector_index (self, SyntaxTree.VectorIndex vector_index, indent_level=0)
 
 print_comparison (self, SyntaxTree.Comparison comparison, indent_level=0)
 
 print_binary_operation (self, SyntaxTree.BinaryOperation binary_operation, indent_level=0)
 
 print_unary_operation (self, SyntaxTree.UnaryOperation unary_operation, indent_level=0)
 
 print_data_block_unary_max (self, SyntaxTree.DataBlockUnaryMax unary_max, indent_level=0)
 
 print_custom_type (self, SyntaxTree.TCustom type, indent_level=0)
 
 print_void_type (self, SyntaxTree.TVoid type, indent_level=0)
 
 print_integer_type (self, SyntaxTree.TInteger type, indent_level=0)
 
 print_long_type (self, SyntaxTree.TLong type, indent_level=0)
 
 print_boolean_type (self, SyntaxTree.TBoolean type, indent_level=0)
 
 print_float_type (self, SyntaxTree.TFloat type, indent_level=0)
 
 print_string_type (self, SyntaxTree.TString type, indent_level=0)
 
 print_data_block_type (self, SyntaxTree.TDataBlock type, indent_level=0)
 
 print_matrix_type (self, SyntaxTree.TMatrix type, indent_level=0)
 
 print_diagonal_matrix_type (self, SyntaxTree.TDiagonalMatrix type, indent_level=0)
 
 print_nested_memref_type (self, SyntaxTree.TNestedMemref type, indent_level=0)
 
 print_simple_memref_type (self, SyntaxTree.TSimpleMemref type, indent_level=0)
 
 print_function_type (self, SyntaxTree.TFunctionType type, indent_level=0)
 

Protected Attributes

 _spaces_per_tab
 

Detailed Description

Definition at line 6 of file CPPPrinter.py.

Constructor & Destructor Documentation

◆ __init__()

printers.CPPPrinter.CPPPrinter.__init__ (   self,
  spaces_per_tab = 2 
)

Definition at line 7 of file CPPPrinter.py.

Member Function Documentation

◆ get_indent()

str printers.CPPPrinter.CPPPrinter.get_indent (   self,
int  indent_level 
)

Definition at line 10 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter._spaces_per_tab, and printers.MLIRPrinter.MLIRPrinter._spaces_per_tab.

Referenced by printers.CPPPrinter.CPPPrinter.print_argument(), printers.MLIRPrinter.MLIRPrinter.print_assignment(), printers.MLIRPrinter.MLIRPrinter.print_binary_operation(), printers.MLIRPrinter.MLIRPrinter.print_boolean_type(), printers.MLIRPrinter.MLIRPrinter.print_comment(), printers.MLIRPrinter.MLIRPrinter.print_comparison(), printers.MLIRPrinter.MLIRPrinter.print_construction(), printers.MLIRPrinter.MLIRPrinter.print_custom_type(), printers.SYCLPrinter.SYCLPrinter.print_data_block_assignment(), printers.MLIRPrinter.MLIRPrinter.print_data_block_construction_from_existing(), printers.SYCLPrinter.SYCLPrinter.print_data_block_construction_from_function(), printers.MLIRPrinter.MLIRPrinter.print_data_block_type(), printers.SYCLPrinter.SYCLPrinter.print_data_block_unary_max(), printers.MLIRPrinter.MLIRPrinter.print_float(), printers.MLIRPrinter.MLIRPrinter.print_float_type(), printers.CPPPrinter.CPPPrinter.print_for(), printers.MLIRPrinter.MLIRPrinter.print_for(), printers.MLIRPrinter.MLIRPrinter.print_function_call(), printers.MLIRPrinter.MLIRPrinter.print_function_type(), printers.CPPPrinter.CPPPrinter.print_if(), printers.MLIRPrinter.MLIRPrinter.print_if(), printers.CPPPrinter.CPPPrinter.print_integer(), printers.MLIRPrinter.MLIRPrinter.print_integer(), printers.MLIRPrinter.MLIRPrinter.print_integer_type(), printers.MLIRPrinter.MLIRPrinter.print_long_type(), printers.MLIRPrinter.MLIRPrinter.print_max(), printers.MLIRPrinter.MLIRPrinter.print_memory_allocation(), printers.MLIRPrinter.MLIRPrinter.print_memory_deallocation(), printers.CPPPrinter.CPPPrinter.print_name(), printers.MLIRPrinter.MLIRPrinter.print_nested_memref_type(), printers.MLIRPrinter.MLIRPrinter.print_reference(), printers.MLIRPrinter.MLIRPrinter.print_simple_memref_type(), printers.MLIRPrinter.MLIRPrinter.print_string(), printers.MLIRPrinter.MLIRPrinter.print_subscript(), printers.MLIRPrinter.MLIRPrinter.print_unary_operation(), printers.MLIRPrinter.MLIRPrinter.print_vector_index(), printers.MLIRPrinter.MLIRPrinter.print_vector_type(), and printers.MLIRPrinter.MLIRPrinter.print_void_type().

Here is the caller graph for this function:

◆ print_argument()

printers.CPPPrinter.CPPPrinter.print_argument (   self,
SyntaxTree.Argument  argument,
  indent_level = 0 
)

Definition at line 93 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter.get_indent(), and printers.MLIRPrinter.MLIRPrinter.get_indent().

Here is the call graph for this function:

◆ print_assignment()

printers.CPPPrinter.CPPPrinter.print_assignment (   self,
SyntaxTree.Assignment  assignment,
  indent_level = 0 
)

Definition at line 153 of file CPPPrinter.py.

◆ print_binary_operation()

printers.CPPPrinter.CPPPrinter.print_binary_operation (   self,
SyntaxTree.BinaryOperation  binary_operation,
  indent_level = 0 
)

Definition at line 249 of file CPPPrinter.py.

◆ print_boolean()

printers.CPPPrinter.CPPPrinter.print_boolean (   self,
SyntaxTree.Boolean  boolean,
  indent_level = 0 
)

Definition at line 213 of file CPPPrinter.py.

◆ print_boolean_type()

printers.CPPPrinter.CPPPrinter.print_boolean_type (   self,
SyntaxTree.TBoolean  type,
  indent_level = 0 
)

Definition at line 270 of file CPPPrinter.py.

◆ print_comment()

printers.CPPPrinter.CPPPrinter.print_comment (   self,
SyntaxTree.Comment  comment,
  indent_level = 0 
)

Definition at line 123 of file CPPPrinter.py.

◆ print_comparison()

printers.CPPPrinter.CPPPrinter.print_comparison (   self,
SyntaxTree.Comparison  comparison,
  indent_level = 0 
)

Definition at line 246 of file CPPPrinter.py.

◆ print_construction()

printers.CPPPrinter.CPPPrinter.print_construction (   self,
SyntaxTree.Construction  construction,
  indent_level = 0 
)

Definition at line 158 of file CPPPrinter.py.

◆ print_custom_type()

printers.CPPPrinter.CPPPrinter.print_custom_type (   self,
SyntaxTree.TCustom  type,
  indent_level = 0 
)

Definition at line 258 of file CPPPrinter.py.

◆ print_data_block()

printers.CPPPrinter.CPPPrinter.print_data_block (   self,
SyntaxTree.DataBlock  data_block,
  indent_level = 0 
)

Definition at line 225 of file CPPPrinter.py.

◆ print_data_block_assignment()

printers.CPPPrinter.CPPPrinter.print_data_block_assignment (   self,
SyntaxTree.DataBlockAssignment  assignment,
  indent_level = 0 
)

Definition at line 210 of file CPPPrinter.py.

◆ print_data_block_construction_from_dot_product()

printers.CPPPrinter.CPPPrinter.print_data_block_construction_from_dot_product (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 181 of file CPPPrinter.py.

◆ print_data_block_construction_from_existing()

printers.CPPPrinter.CPPPrinter.print_data_block_construction_from_existing (   self,
SyntaxTree.DataBlockConstructionFromExisting  construction,
  indent_level = 0 
)

Definition at line 161 of file CPPPrinter.py.

◆ print_data_block_construction_from_function()

printers.CPPPrinter.CPPPrinter.print_data_block_construction_from_function (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 173 of file CPPPrinter.py.

◆ print_data_block_construction_from_matrix_vector_product()

printers.CPPPrinter.CPPPrinter.print_data_block_construction_from_matrix_vector_product (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 177 of file CPPPrinter.py.

◆ print_data_block_construction_from_operation()

printers.CPPPrinter.CPPPrinter.print_data_block_construction_from_operation (   self,
SyntaxTree.DataBlockConstructionFromOperation  construction,
  indent_level = 0 
)

Definition at line 169 of file CPPPrinter.py.

◆ print_data_block_type()

printers.CPPPrinter.CPPPrinter.print_data_block_type (   self,
SyntaxTree.TDataBlock  type,
  indent_level = 0 
)

Definition at line 279 of file CPPPrinter.py.

◆ print_data_block_unary_max()

printers.CPPPrinter.CPPPrinter.print_data_block_unary_max (   self,
SyntaxTree.DataBlockUnaryMax  unary_max,
  indent_level = 0 
)

Definition at line 255 of file CPPPrinter.py.

◆ print_diagonal_matrix()

printers.CPPPrinter.CPPPrinter.print_diagonal_matrix (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 185 of file CPPPrinter.py.

◆ print_diagonal_matrix_construction_from_kronecker_product()

printers.CPPPrinter.CPPPrinter.print_diagonal_matrix_construction_from_kronecker_product (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 197 of file CPPPrinter.py.

◆ print_diagonal_matrix_construction_from_value()

printers.CPPPrinter.CPPPrinter.print_diagonal_matrix_construction_from_value (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 201 of file CPPPrinter.py.

◆ print_diagonal_matrix_type()

printers.CPPPrinter.CPPPrinter.print_diagonal_matrix_type (   self,
SyntaxTree.TDiagonalMatrix  type,
  indent_level = 0 
)

Definition at line 285 of file CPPPrinter.py.

◆ print_float()

printers.CPPPrinter.CPPPrinter.print_float (   self,
SyntaxTree.Float  float,
  indent_level = 0 
)

Definition at line 219 of file CPPPrinter.py.

◆ print_float_type()

printers.CPPPrinter.CPPPrinter.print_float_type (   self,
SyntaxTree.TFloat  type,
  indent_level = 0 
)

Definition at line 273 of file CPPPrinter.py.

◆ print_for()

printers.CPPPrinter.CPPPrinter.print_for (   self,
SyntaxTree.For  for_statement,
  indent_level = 0 
)

Definition at line 111 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter.get_indent(), and printers.MLIRPrinter.MLIRPrinter.get_indent().

Here is the call graph for this function:

◆ print_function_call()

printers.CPPPrinter.CPPPrinter.print_function_call (   self,
SyntaxTree.FunctionCall  function_call,
  indent_level = 0 
)

Definition at line 126 of file CPPPrinter.py.

◆ print_function_declaration()

printers.CPPPrinter.CPPPrinter.print_function_declaration (   self,
SyntaxTree.FunctionDefinition  function_definition,
  indent_level = 0 
)

Definition at line 32 of file CPPPrinter.py.

◆ print_function_declaration_with_timer()

printers.CPPPrinter.CPPPrinter.print_function_declaration_with_timer (   self,
SyntaxTree.FunctionDefinition  function_definition,
  indent_level = 0 
)

Definition at line 74 of file CPPPrinter.py.

◆ print_function_definition()

printers.CPPPrinter.CPPPrinter.print_function_definition (   self,
SyntaxTree.FunctionDefinition  function_definition,
  indent_level = 0 
)

Definition at line 13 of file CPPPrinter.py.

◆ print_function_definition_with_timer()

printers.CPPPrinter.CPPPrinter.print_function_definition_with_timer (   self,
SyntaxTree.FunctionDefinition  function_definition,
  indent_level = 0 
)

Definition at line 48 of file CPPPrinter.py.

◆ print_function_type()

printers.CPPPrinter.CPPPrinter.print_function_type (   self,
SyntaxTree.TFunctionType  type,
  indent_level = 0 
)

Definition at line 294 of file CPPPrinter.py.

◆ print_if()

printers.CPPPrinter.CPPPrinter.print_if (   self,
SyntaxTree.If  if_statement,
  indent_level = 0 
)

Definition at line 105 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter.get_indent(), and printers.MLIRPrinter.MLIRPrinter.get_indent().

Here is the call graph for this function:

◆ print_integer()

printers.CPPPrinter.CPPPrinter.print_integer (   self,
SyntaxTree.Integer  integer,
  indent_level = 0 
)

Definition at line 99 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter.get_indent(), and printers.MLIRPrinter.MLIRPrinter.get_indent().

Here is the call graph for this function:

◆ print_integer_type()

printers.CPPPrinter.CPPPrinter.print_integer_type (   self,
SyntaxTree.TInteger  type,
  indent_level = 0 
)

Definition at line 264 of file CPPPrinter.py.

◆ print_long_type()

printers.CPPPrinter.CPPPrinter.print_long_type (   self,
SyntaxTree.TLong  type,
  indent_level = 0 
)

Definition at line 267 of file CPPPrinter.py.

◆ print_matrix()

printers.CPPPrinter.CPPPrinter.print_matrix (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 191 of file CPPPrinter.py.

◆ print_matrix_construction_from_kronecker_product()

printers.CPPPrinter.CPPPrinter.print_matrix_construction_from_kronecker_product (   self,
SyntaxTree.DataBlockConstructionFromFunction  construction,
  indent_level = 0 
)

Definition at line 205 of file CPPPrinter.py.

◆ print_matrix_type()

printers.CPPPrinter.CPPPrinter.print_matrix_type (   self,
SyntaxTree.TMatrix  type,
  indent_level = 0 
)

Definition at line 282 of file CPPPrinter.py.

◆ print_max()

printers.CPPPrinter.CPPPrinter.print_max (   self,
SyntaxTree.Max  max,
  indent_level = 0 
)

Definition at line 130 of file CPPPrinter.py.

◆ print_memory_allocation()

printers.CPPPrinter.CPPPrinter.print_memory_allocation (   self,
SyntaxTree.MemoryAllocation  memory_allocation,
  indent_level = 0 
)

Definition at line 133 of file CPPPrinter.py.

◆ print_memory_deallocation()

printers.CPPPrinter.CPPPrinter.print_memory_deallocation (   self,
SyntaxTree.MemoryDeallocation  memory_deallocation,
  indent_level = 0 
)

Definition at line 143 of file CPPPrinter.py.

◆ print_name()

printers.CPPPrinter.CPPPrinter.print_name (   self,
SyntaxTree.Name  name,
  indent_level = 0 
)

Definition at line 96 of file CPPPrinter.py.

References printers.CPPPrinter.CPPPrinter.get_indent(), and printers.MLIRPrinter.MLIRPrinter.get_indent().

Here is the call graph for this function:

◆ print_nested_memref_type()

printers.CPPPrinter.CPPPrinter.print_nested_memref_type (   self,
SyntaxTree.TNestedMemref  type,
  indent_level = 0 
)

Definition at line 288 of file CPPPrinter.py.

◆ print_reference()

printers.CPPPrinter.CPPPrinter.print_reference (   self,
SyntaxTree.Reference  reference,
  indent_level = 0 
)

Definition at line 234 of file CPPPrinter.py.

◆ print_simple_memref_type()

printers.CPPPrinter.CPPPrinter.print_simple_memref_type (   self,
SyntaxTree.TSimpleMemref  type,
  indent_level = 0 
)

Definition at line 291 of file CPPPrinter.py.

◆ print_string()

printers.CPPPrinter.CPPPrinter.print_string (   self,
SyntaxTree.String  string,
  indent_level = 0 
)

Definition at line 216 of file CPPPrinter.py.

◆ print_string_type()

printers.CPPPrinter.CPPPrinter.print_string_type (   self,
SyntaxTree.TString  type,
  indent_level = 0 
)

Definition at line 276 of file CPPPrinter.py.

◆ print_subscript()

printers.CPPPrinter.CPPPrinter.print_subscript (   self,
SyntaxTree.Subscript  subscript,
  indent_level = 0 
)

Definition at line 231 of file CPPPrinter.py.

◆ print_unary_operation()

printers.CPPPrinter.CPPPrinter.print_unary_operation (   self,
SyntaxTree.UnaryOperation  unary_operation,
  indent_level = 0 
)

Definition at line 252 of file CPPPrinter.py.

◆ print_vector()

printers.CPPPrinter.CPPPrinter.print_vector (   self,
SyntaxTree.Vector  vector,
  indent_level = 0 
)

Definition at line 237 of file CPPPrinter.py.

◆ print_vector_index()

printers.CPPPrinter.CPPPrinter.print_vector_index (   self,
SyntaxTree.VectorIndex  vector_index,
  indent_level = 0 
)

Definition at line 243 of file CPPPrinter.py.

◆ print_void_type()

printers.CPPPrinter.CPPPrinter.print_void_type (   self,
SyntaxTree.TVoid  type,
  indent_level = 0 
)

Definition at line 261 of file CPPPrinter.py.

Field Documentation

◆ _spaces_per_tab

printers.CPPPrinter.CPPPrinter._spaces_per_tab
protected

The documentation for this class was generated from the following file: