Inv

class Inv.InvOp(min_skip, max_skip, nstates, focus='last', nil=-1, coverage=0, mode='viterbi')[source]
make_node(x, y, len_x, len_y)[source]

Create a “apply” nodes for the inputs in that order.

c_support_code()[source]

Optional: Return utility code for use by a Variable or Op to be included at global scope prior to the rest of the code for this class.

QUESTION: How many times will this support code be emitted for a graph with many instances of the same type?

Raises:
MethodNotDefined

Subclass does not implement this method.

c_compile_args()[source]

Optional: Return a list of compile args recommended to compile the code returned by other methods in this class.

Raises:
MethodNotDefined

Subclass does not implement this method.

c_code(node, name, inp, out, sub)[source]

Required: return the C implementation of an Op.

Returns C code that does the computation associated to this Op, given names for the inputs and outputs.

Parameters:
node : Apply instance

The node for which we are compiling the current c_code.

The same Op may be used in more than one node.

name : str

A name that is automatically assigned and guaranteed to be unique.

inputs : list of strings

There is a string for each input of the function, and the string is the name of a C variable pointing to that input. The type of the variable depends on the declared type of the input. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list.

outputs : list of strings

Each string is the name of a C variable where the Op should store its output. The type depends on the declared type of the output. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list. In some cases the outputs will be preallocated and the value of the variable may be pre-filled. The value for an unallocated output is type-dependent.

sub : dict of strings

Extra symbols defined in CLinker sub symbols (such as ‘fail’). WRITEME

Raises:
MethodNotDefined

The subclass does not override this method.

class Inv.InvOpBackTrace(min_skip, max_skip, nstates, focus='last', nil=-1, coverage=0, mode='viterbi')[source]
make_node(x, y, len_x, len_y)[source]

Create a “apply” nodes for the inputs in that order.

c_support_code()[source]

Optional: Return utility code for use by a Variable or Op to be included at global scope prior to the rest of the code for this class.

QUESTION: How many times will this support code be emitted for a graph with many instances of the same type?

Raises:
MethodNotDefined

Subclass does not implement this method.

c_compile_args()[source]

Optional: Return a list of compile args recommended to compile the code returned by other methods in this class.

Raises:
MethodNotDefined

Subclass does not implement this method.

c_code(node, name, inp, out, sub)[source]

Required: return the C implementation of an Op.

Returns C code that does the computation associated to this Op, given names for the inputs and outputs.

Parameters:
node : Apply instance

The node for which we are compiling the current c_code.

The same Op may be used in more than one node.

name : str

A name that is automatically assigned and guaranteed to be unique.

inputs : list of strings

There is a string for each input of the function, and the string is the name of a C variable pointing to that input. The type of the variable depends on the declared type of the input. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list.

outputs : list of strings

Each string is the name of a C variable where the Op should store its output. The type depends on the declared type of the output. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list. In some cases the outputs will be preallocated and the value of the variable may be pre-filled. The value for an unallocated output is type-dependent.

sub : dict of strings

Extra symbols defined in CLinker sub symbols (such as ‘fail’). WRITEME

Raises:
MethodNotDefined

The subclass does not override this method.

class Inv.InvOpFull(min_skip, max_skip, nstates, focus='last', mode='viterbi')[source]
make_node(x, y, len_x, len_y)[source]

Create a “apply” nodes for the inputs in that order.

c_support_code()[source]

Optional: Return utility code for use by a Variable or Op to be included at global scope prior to the rest of the code for this class.

QUESTION: How many times will this support code be emitted for a graph with many instances of the same type?

Raises:
MethodNotDefined

Subclass does not implement this method.

c_compile_args()[source]

Optional: Return a list of compile args recommended to compile the code returned by other methods in this class.

Raises:
MethodNotDefined

Subclass does not implement this method.

c_code(node, name, inp, out, sub)[source]

Required: return the C implementation of an Op.

Returns C code that does the computation associated to this Op, given names for the inputs and outputs.

Parameters:
node : Apply instance

The node for which we are compiling the current c_code.

The same Op may be used in more than one node.

name : str

A name that is automatically assigned and guaranteed to be unique.

inputs : list of strings

There is a string for each input of the function, and the string is the name of a C variable pointing to that input. The type of the variable depends on the declared type of the input. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list.

outputs : list of strings

Each string is the name of a C variable where the Op should store its output. The type depends on the declared type of the output. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list. In some cases the outputs will be preallocated and the value of the variable may be pre-filled. The value for an unallocated output is type-dependent.

sub : dict of strings

Extra symbols defined in CLinker sub symbols (such as ‘fail’). WRITEME

Raises:
MethodNotDefined

The subclass does not override this method.

class Inv.AlignOp[source]
make_node(x, y, len_x, len_y)[source]

Create a “apply” nodes for the inputs in that order.

c_support_code()[source]

Optional: Return utility code for use by a Variable or Op to be included at global scope prior to the rest of the code for this class.

QUESTION: How many times will this support code be emitted for a graph with many instances of the same type?

Raises:
MethodNotDefined

Subclass does not implement this method.

c_compile_args()[source]

Optional: Return a list of compile args recommended to compile the code returned by other methods in this class.

Raises:
MethodNotDefined

Subclass does not implement this method.

class Inv.InvAlignOp[source]
c_code(node, name, inp, out, sub)[source]

Required: return the C implementation of an Op.

Returns C code that does the computation associated to this Op, given names for the inputs and outputs.

Parameters:
node : Apply instance

The node for which we are compiling the current c_code.

The same Op may be used in more than one node.

name : str

A name that is automatically assigned and guaranteed to be unique.

inputs : list of strings

There is a string for each input of the function, and the string is the name of a C variable pointing to that input. The type of the variable depends on the declared type of the input. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list.

outputs : list of strings

Each string is the name of a C variable where the Op should store its output. The type depends on the declared type of the output. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list. In some cases the outputs will be preallocated and the value of the variable may be pre-filled. The value for an unallocated output is type-dependent.

sub : dict of strings

Extra symbols defined in CLinker sub symbols (such as ‘fail’). WRITEME

Raises:
MethodNotDefined

The subclass does not override this method.

class Inv.StdOpFull(skip_tdp, nstates)[source]
make_node(x, y, len_x, len_y)[source]

Create a “apply” nodes for the inputs in that order.

c_support_code()[source]

Optional: Return utility code for use by a Variable or Op to be included at global scope prior to the rest of the code for this class.

QUESTION: How many times will this support code be emitted for a graph with many instances of the same type?

Raises:
MethodNotDefined

Subclass does not implement this method.

c_compile_args()[source]

Optional: Return a list of compile args recommended to compile the code returned by other methods in this class.

Raises:
MethodNotDefined

Subclass does not implement this method.

c_code(node, name, inp, out, sub)[source]

Required: return the C implementation of an Op.

Returns C code that does the computation associated to this Op, given names for the inputs and outputs.

Parameters:
node : Apply instance

The node for which we are compiling the current c_code.

The same Op may be used in more than one node.

name : str

A name that is automatically assigned and guaranteed to be unique.

inputs : list of strings

There is a string for each input of the function, and the string is the name of a C variable pointing to that input. The type of the variable depends on the declared type of the input. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list.

outputs : list of strings

Each string is the name of a C variable where the Op should store its output. The type depends on the declared type of the output. There is a corresponding python variable that can be accessed by prepending “py_” to the name in the list. In some cases the outputs will be preallocated and the value of the variable may be pre-filled. The value for an unallocated output is type-dependent.

sub : dict of strings

Extra symbols defined in CLinker sub symbols (such as ‘fail’). WRITEME

Raises:
MethodNotDefined

The subclass does not override this method.