hog.ast module#

class hog.ast.Assignment(lhs: Symbol, rhs: Expr, is_declaration: bool = True)#

Bases: Statement

Simple container for an assignment of a sympy expression to a sympy symbol.

atoms() Set[Atom]#
count_operations(operations: Operations) None#
to_code() str#
class hog.ast.CodeBlock#

Bases: object

Container for the entire block.

count_operations() Operations#
to_code() str#
class hog.ast.FunctionCall(name: str, input_args: List[Expr], output_args: List[Symbol])#

Bases: Statement

Simple container for an external function call.

count_operations(operations: Operations) None#
to_code() str#
class hog.ast.FunctionDefinition(name: str, num_input_args: int, num_output_args: int, implementation_string: str)#

Bases: object

Container for a function definition.

declaration() str#
implementation(name_prefix: str = '') str#
class hog.ast.Operations#

Bases: object

to_table() str#
class hog.ast.Statement#

Bases: object

hog.ast.count_operations(expr: Expr, operations: Operations, loop_factor: int = 1) None#