pystencils.jit.cpu.compiler_info.CompilerInfo#

class pystencils.jit.cpu.compiler_info.CompilerInfo(openmp=True, optlevel='fast', cxx_standard='c++17', target=<Target.CurrentCPU: 32769>, extra_cxxflags=<factory>)#

Base class for compiler infos.

Parameters:
openmp: bool = True#

Enable/disable OpenMP compilation

optlevel: str | None = 'fast'#

Compiler optimization level

cxx_standard: str = 'c++17'#

C++ language standard to be compiled with

target: Target = 32769#

Hardware target to compile for.

The value of target is used to set the -march compiler option (or equivalent). Target.CurrentCPU translates to -march=native.

abstract cxx()#

Path to the executable of this compiler

Return type:

str

abstract cxxflags()#

Compiler flags affecting C++ compilation

Return type:

list[str]

abstract linker_flags()#

Flags affecting linkage of the extension module

Return type:

list[str]

abstract include_flags(include_dirs)#

Convert a list of include directories into corresponding compiler flags

Return type:

list[str]

Parameters:

include_dirs (Sequence[str])

abstract restrict_qualifier()#

restrict memory qualifier recognized by this compiler

Return type:

str

static get_default(**kwargs)#

Create a default compiler info object for the current runtime environment.

Parameters:

kwargs – Are forwarded to the constructor of the selected CompilerInfo subclass.

Return type:

CompilerInfo