annotate Package

annotate Package

annotate Module

numba –annotate

class numba.annotate.annotate.Annotation

Bases: tuple

Annotation(type, value)

type

Alias for field number 0

value

Alias for field number 1

class numba.annotate.annotate.DotIntermediate

Bases: tuple

DotIntermediate(name, dotcode)

dotcode

Alias for field number 1

name

Alias for field number 0

class numba.annotate.annotate.Program

Bases: tuple

Program(python_source, intermediates)

intermediates

Alias for field number 1

python_source

Alias for field number 0

class numba.annotate.annotate.Source

Bases: tuple

Source(linemap, annotations)

annotations

Alias for field number 1

linemap

Alias for field number 0

class numba.annotate.annotate.SourceIntermediate

Bases: tuple

SourceIntermediate(name, linenomap, source)

linenomap

Alias for field number 1

name

Alias for field number 0

source

Alias for field number 2

numba.annotate.annotate.build_linemap(func)
numba.annotate.annotate.format_annotations(annotations)
numba.annotate.annotate.groupdict(xs, attr)

annotators Module

Numba annotators.

class numba.annotate.annotators.AnnotateTypes

Bases: object

visit_Name(node)
numba.annotate.annotators.annotate_pyapi(llvm_intermediate, py_annotations)

Produce annotations for CPython C API calls from an LLVM SourceIntermediate

htmlrender Module

HTML annotation rendering. Heavily based on Cython/Compiler/Annotate.py

numba.annotate.htmlrender.render(annotation_blocks, emit=<built-in method write of file object at 0x10028d150>, intermediate_names=(), inline=True)

Render a Program as html.

ir_capture Module

Capture IR emissions.

class numba.annotate.ir_capture.IRBuilder(name, builder)

Bases: object

get_pos()
update_pos(pos)
numba.annotate.ir_capture.filter_llvm(captured)
numba.annotate.ir_capture.filter_unique(captured)
numba.annotate.ir_capture.get_intermediate(ir_builder)

Get IR source from an IR builder as a SourceIntermediate

numba.annotate.ir_capture.order_llvm(blocks)

Put llvm instructions and basic blocks in the right order.

Parameters:blocks – { llvm_block : [llvm_instr] }
Returns:[llvm_line]

step Module

Copyright (c) 2012, Daniele Mazzocchio All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the developer nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

class numba.annotate.step.Template(template)

Bases: object

expand(namespace={}, **kw)

Return the expanded template string

textrender Module

class numba.annotate.textrender.Emitter

Bases: tuple

Emitter(emit, emitline)

emit

Alias for field number 0

emitline

Alias for field number 1

numba.annotate.textrender.render(annotation_blocks, emit=<built-in method write of file object at 0x10028d150>, intermediate_names=(), inline=True)

Render a Program as text.

Parameters:
  • intermediate_names – [intermediate_name], e.g. [“llvm”]
  • inline – whether to display intermediate code inline
numba.annotate.textrender.render_source(source, emitter, indent, intermediates, linenomap=None)

Print a Source and its annotations. Print any given Intermediates inline.

Subpackages