Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::math_opt::codegen Namespace Reference

Classes

struct  CodegenAttrTypeDescriptor
class  Type
struct  AttrOpFunctionInfo
class  CodeGenerator

Typedefs

using AttrOpFunctionInfos = std::array<AttrOpFunctionInfo, kNumAttrOps>

Enumerations

enum class  AttrOp {
  kGet , kSet , kIsNonDefault , kNumNonDefaults ,
  kGetNonDefaults , kNumOps
}

Functions

CodegenAttrTypeDescriptor::ValueType GetValueType (bool)
CodegenAttrTypeDescriptor::ValueType GetValueType (int64_t)
CodegenAttrTypeDescriptor::ValueType GetValueType (double)
template<ElementType element_type>
CodegenAttrTypeDescriptor::ValueType GetValueType (ElementId< element_type >)
template<typename Descriptor>
CodegenAttrTypeDescriptor MakeAttrTypeDescriptor ()
std::unique_ptr< CodeGeneratorC99Declarations ()
std::unique_ptr< CodeGeneratorC99Definitions ()
std::unique_ptr< CodeGeneratorPythonEnums ()
CodegenAttrTypeDescriptor GetTestDescriptor ()
AttrOpFunctionInfo GetTestFunctionInfo (bool with_key_parameter)

Variables

constexpr absl::string_view kOpNames [static_cast< int >(AttrOp::kNumOps)]
static constexpr int kNumAttrOps = static_cast<int>(AttrOp::kNumOps)

Typedef Documentation

◆ AttrOpFunctionInfos

Enumeration Type Documentation

◆ AttrOp

Enumerator
kGet 
kSet 
kIsNonDefault 
kNumNonDefaults 
kGetNonDefaults 
kNumOps 

Definition at line 29 of file gen.h.

Function Documentation

◆ C99Declarations()

std::unique_ptr< CodeGenerator > operations_research::math_opt::codegen::C99Declarations ( )

Definition at line 239 of file gen_c.cc.

◆ C99Definitions()

std::unique_ptr< CodeGenerator > operations_research::math_opt::codegen::C99Definitions ( )

Definition at line 243 of file gen_c.cc.

◆ GetTestDescriptor()

CodegenAttrTypeDescriptor operations_research::math_opt::codegen::GetTestDescriptor ( )
inline

Definition at line 23 of file testing.h.

◆ GetTestFunctionInfo()

AttrOpFunctionInfo operations_research::math_opt::codegen::GetTestFunctionInfo ( bool with_key_parameter)
inline

Definition at line 31 of file testing.h.

◆ GetValueType() [1/4]

CodegenAttrTypeDescriptor::ValueType operations_research::math_opt::codegen::GetValueType ( bool )

Definition at line 82 of file gen.cc.

◆ GetValueType() [2/4]

CodegenAttrTypeDescriptor::ValueType operations_research::math_opt::codegen::GetValueType ( double )

Definition at line 90 of file gen.cc.

◆ GetValueType() [3/4]

template<ElementType element_type>
CodegenAttrTypeDescriptor::ValueType operations_research::math_opt::codegen::GetValueType ( ElementId< element_type > )

Definition at line 95 of file gen.cc.

◆ GetValueType() [4/4]

CodegenAttrTypeDescriptor::ValueType operations_research::math_opt::codegen::GetValueType ( int64_t )

Definition at line 86 of file gen.cc.

◆ MakeAttrTypeDescriptor()

template<typename Descriptor>
CodegenAttrTypeDescriptor operations_research::math_opt::codegen::MakeAttrTypeDescriptor ( )

Definition at line 101 of file gen.cc.

◆ PythonEnums()

std::unique_ptr< CodeGenerator > operations_research::math_opt::codegen::PythonEnums ( )

Definition at line 160 of file gen_python.cc.

Variable Documentation

◆ kNumAttrOps

int operations_research::math_opt::codegen::kNumAttrOps = static_cast<int>(AttrOp::kNumOps)
staticconstexpr

Definition at line 39 of file gen.h.

◆ kOpNames

absl::string_view operations_research::math_opt::codegen::kOpNames[static_cast< int >(AttrOp::kNumOps)]
constexpr
Initial value:
= {
"Get", "Set", "IsNonDefault", "NumNonDefaults", "GetNonDefaults"}

Definition at line 115 of file gen.cc.