devito.dle.backends package

Submodules

devito.dle.backends.advanced module

class devito.dle.backends.advanced.AdvancedRewriter(nodes, params)[source]

Bases: devito.dle.backends.basic.BasicRewriter

class devito.dle.backends.advanced.AdvancedRewriterSafeMath(nodes, params)[source]

Bases: devito.dle.backends.advanced.AdvancedRewriter

This Rewriter is slightly less aggressive than AdvancedRewriter, as it doesn’t drop denormal numbers, which may sometimes harm the numerical precision.

class devito.dle.backends.advanced.CustomRewriter(nodes, passes, params)[source]

Bases: devito.dle.backends.advanced.SpeculativeRewriter

passes_mapper = {'blocking': <function dle_pass.<locals>.wrapper at 0x114731d90>, 'denormals': <function dle_pass.<locals>.wrapper at 0x1147311e0>, 'openmp': <function dle_pass.<locals>.wrapper at 0x114749048>, 'simd': <function dle_pass.<locals>.wrapper at 0x114731ea0>, 'split': <function dle_pass.<locals>.wrapper at 0x1147312f0>, 'wrapping': <function dle_pass.<locals>.wrapper at 0x114731b70>}
class devito.dle.backends.advanced.SpeculativeRewriter(nodes, params)[source]

Bases: devito.dle.backends.advanced.AdvancedRewriter

devito.dle.backends.basic module

class devito.dle.backends.basic.BasicRewriter(nodes, params)[source]

Bases: devito.dle.backends.common.AbstractRewriter

devito.dle.backends.common module

class devito.dle.backends.common.AbstractRewriter(nodes, params)[source]

Bases: object

Transform Iteration/Expression trees to generate high performance C.

This is just an abstract class. Actual transformers should implement the abstract method _pipeline, which performs a sequence of AST transformations.

run()[source]

The optimization pipeline, as a sequence of AST transformation passes.

class devito.dle.backends.common.Arg(argument, value)[source]

Bases: object

A DLE-produced argument.

class devito.dle.backends.common.BlockingArg(blocked_dim, iteration, value)[source]

Bases: devito.dle.backends.common.Arg

original_dim
class devito.dle.backends.common.State(nodes)[source]

Bases: object

Represent the output of the DLE.

update(nodes, **kwargs)[source]
devito.dle.backends.common.dle_pass(func)[source]

devito.dle.backends.parallelizer module

class devito.dle.backends.parallelizer.Ompizer(key)[source]

Bases: object

COLLAPSE = 32

Use a collapse clause if the number of available physical cores is greater than this threshold.

lang = {'atomic': <cgen.Pragma object at 0x11472b588>, 'collapse': <function Ompizer.<lambda> at 0x114731510>, 'for': <cgen.Pragma object at 0x11472b3c8>, 'par-for': <cgen.Pragma object at 0x11472b400>, 'par-region': <function Ompizer.<lambda> at 0x114731598>, 'simd-for': <cgen.Pragma object at 0x11472b470>, 'simd-for-aligned': <function Ompizer.<lambda> at 0x114731620>}

Shortcuts for the OpenMP language.

make_parallel(iet)[source]

Transform iet by decorating its parallel Iteration`s with suitable ``#pragma omp ...` triggering thread-level parallelism.

devito.dle.backends.utils module

devito.dle.backends.utils.get_simd_flag()[source]

Retrieve the best SIMD flag on the current architecture.

devito.dle.backends.utils.get_simd_items(dtype)[source]

Determine the number of items of type dtype that can fit in a SIMD register on the current architecture.

Module contents