libqasm
library for handling cQASM files
|
Public Member Functions | |
void | generate_const_scalar_op (const std::string &name, const char return_type, const std::string &arg_types, const std::string &impl) |
Generates a basic constant scalar function, such as integer addition for instance. More... | |
Generator (const std::string &header_filename, const std::string &source_filename) | |
Constructs a generator for the function table. More... | |
~Generator () | |
Finishes writing the header & source file, then destroys the generator. More... | |
Generator class.
Definition at line 138 of file func-gen.cpp.
|
inline |
Constructs a generator for the function table.
Definition at line 286 of file func-gen.cpp.
|
inline |
Finishes writing the header & source file, then destroys the generator.
Definition at line 365 of file func-gen.cpp.
|
inline |
Generates a basic constant scalar function, such as integer addition for instance.
name must be the cQASM name for the function (either just the function name or operator+ etc), return_type must be the return type code, arg_types must be the argument type codes, and impl must be a C++ expression implementing the function, operating on variables a..z representing the arguments, and returning the primitive value associated with return_type.
Definition at line 273 of file func-gen.cpp.