visioncpp.backend¶
-
visioncpp.backend.
check_for_computecpp
()[source]¶ Check that ComputeCpp files exist.
- Raises:
- VisionCppException: If ComputeCpp file(s) are mising.
-
visioncpp.backend.
compile_cpp_code
(code)[source]¶ Compile C++ code to a dynamic library.
- Arguments:
- code (str): C++ socde.
- Returns:
- str: Path to binary.
-
visioncpp.backend.
get_device_cflags
()[source]¶ Get integration header compilation cflags.
- Returns:
- str[]: List of compiler flags.
-
visioncpp.backend.
get_host_cflags
()[source]¶ Get compilation cflags.
- Returns:
- str[]: List of compiler flags.
-
visioncpp.backend.
host_compile
(code, stub, dir='/tmp')[source]¶ Compile object file.
- Arguments:
- code (str): C++ code. stub (str): Path to integration header. dir (str, optional): Output directory.
- Returns:
- str: Path to compiled object file.
-
visioncpp.backend.
invoke_computecpp
(args, stdin=None)[source]¶ Invoke ComputeCpp compute++ compiler.
- Arguments:
- args (str[]): Arguments. stdin (str, optional): Compiler input.
-
visioncpp.backend.
link
(host, dir='/tmp')[source]¶ Link object file to library.
- Arguments:
- host (str): Path to object file. dir (str, optional): Output directory.
- Returns:
- str: Path to generated executable.