The code generator interface.
More...
#include <gen.h>
The code generator interface.
Definition at line 99 of file gen.h.
◆ CodeGenerator()
operations_research::math_opt::codegen::CodeGenerator::CodeGenerator |
( |
const AttrOpFunctionInfos * | attr_op_function_infos | ) |
|
|
inlineexplicit |
◆ ~CodeGenerator()
virtual operations_research::math_opt::codegen::CodeGenerator::~CodeGenerator |
( |
| ) |
|
|
virtualdefault |
◆ EmitAttributes()
void operations_research::math_opt::codegen::CodeGenerator::EmitAttributes |
( |
absl::Span< const CodegenAttrTypeDescriptor > | descriptors, |
|
|
std::string * | out ) const |
|
virtual |
Emits code for attributes. By default, this iterates attributes and for each attribute:
- calls StartAttrType, and
- calls EmitAttrOp for each operation.
Definition at line 127 of file gen.cc.
◆ EmitAttrOp()
Emits code for operation info for attribute described by descriptor.
Definition at line 129 of file gen.h.
◆ EmitElements()
virtual void operations_research::math_opt::codegen::CodeGenerator::EmitElements |
( |
absl::Span< const absl::string_view > | elements, |
|
|
std::string * | out ) const |
|
inlinevirtual |
Emits code for elements.
Definition at line 113 of file gen.h.
◆ EmitHeader()
virtual void operations_research::math_opt::codegen::CodeGenerator::EmitHeader |
( |
std::string * | out | ) |
const |
|
inlinevirtual |
Emits the header for the generated code.
Definition at line 110 of file gen.h.
◆ GenerateCode()
std::string operations_research::math_opt::codegen::CodeGenerator::GenerateCode |
( |
| ) |
const |
Generates code.
Generate elements.
Generate attributes.
Definition at line 138 of file gen.cc.
◆ StartAttrType()
virtual void operations_research::math_opt::codegen::CodeGenerator::StartAttrType |
( |
const CodegenAttrTypeDescriptor & | descriptor, |
|
|
std::string * | out ) const |
|
inlinevirtual |
Called before generating code for an attribute type.
Definition at line 125 of file gen.h.
The documentation for this class was generated from the following files:
- ortools/math_opt/elemental/codegen/gen.h
- ortools/math_opt/elemental/codegen/gen.cc