dfba.jit

JIT compilation of functionlib.cpp.

Adapted from <https://github.com/jakeret/hope>. Copyright (c) 2013 ETH Zurich, Institute of Astronomy, Lukas Gamper <lukas.gamper@usystems.ch>.

Module Contents

Classes

BuildExtWithoutPlatformSuffix

Class for building library functionlib WithoutPlatformSuffix.

Functions

get_ext_filename_without_platform_suffix(filename: str) → str

File name without platform suffix.

get_cxxflags() → List[str]

CXX FLAGS.

compile(directory: str) → str

Compile library.

Attributes

logger

CXX_FLAGS

dfba.jit.logger[source]
dfba.jit.CXX_FLAGS[source]
exception dfba.jit.UnsupportedCompilerException[source]

Bases: Exception

Raise exceptions on unsuported compilers.

class dfba.jit.BuildExtWithoutPlatformSuffix(dist)[source]

Bases: setuptools.command.build_ext.build_ext

Class for building library functionlib WithoutPlatformSuffix.

get_ext_filename(self, ext_name: str)str[source]

Relies onf ext_name.

dfba.jit.get_ext_filename_without_platform_suffix(filename: str)str[source]

File name without platform suffix.

Returns

Name of shared library without platform suffix.

Return type

filename

dfba.jit.get_cxxflags()List[str][source]

CXX FLAGS.

JIT compilation of functionlib.cpp adapted from <https://github.com/jakeret/hope>. Copyright (c) 2013 ETH Zurich, Institute of Astronomy, Lukas Gamper <lukas.gamper@usystems.ch>

Returns

The appropriate CXX FLAGS for compilation of functionlib.cpp on supported platform. Requires compilation with c++11 features enabled.

Return type

flags

dfba.jit.compile(directory: str)str[source]

Compile library.

JIT compilation of functionlib.cpp adapted from <https://github.com/jakeret/hope>. Copyright (c) 2013 ETH Zurich, Institute of Astronomy, Lukas Gamper <lukas.gamper@usystems.ch>

Parameters

directory (string) – Path to temporary directory containing library.