From 0a579b4aeca075e1643b33cb36c77cd831e67940 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 4 Dec 2017 11:06:26 -0500 Subject: [PATCH 1/2] include ExecutableCTarget in main __init__ and docs --- loopy/__init__.py | 4 ++-- loopy/cli.py | 4 ++-- loopy/target/__init__.py | 1 + loopy/target/c/c_execution.py | 4 ++-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/loopy/__init__.py b/loopy/__init__.py index 8cfc1058b..5e8a3fb06 100644 --- a/loopy/__init__.py +++ b/loopy/__init__.py @@ -137,7 +137,7 @@ from loopy.frontend.fortran import (c_preprocess, parse_transformed_fortran, parse_fortran) from loopy.target import TargetBase, ASTBuilderBase -from loopy.target.c import CTarget, generate_header +from loopy.target.c import CTarget, ExecutableCTarget, generate_header from loopy.target.cuda import CudaTarget from loopy.target.opencl import OpenCLTarget from loopy.target.pyopencl import PyOpenCLTarget @@ -257,7 +257,7 @@ __all__ = [ "LoopyError", "LoopyWarning", "TargetBase", - "CTarget", "generate_header", + "CTarget", "ExecutableCTarget", "generate_header", "CudaTarget", "OpenCLTarget", "PyOpenCLTarget", "ISPCTarget", "NumbaTarget", "NumbaCudaTarget", diff --git a/loopy/cli.py b/loopy/cli.py index 060340d59..1228d8e6c 100644 --- a/loopy/cli.py +++ b/loopy/cli.py @@ -83,8 +83,8 @@ def main(): from loopy.target.ispc import ISPCTarget target = ISPCTarget(occa_mode=True) elif args.target == "c": - from loopy.target.c import CTarget - target = CTarget() + from loopy.target.c import ExecutableCTarget + target = ExecutableCTarget() elif args.target == "c-fortran": from loopy.target.c import CTarget target = CTarget(fortran_abi=True) diff --git a/loopy/target/__init__.py b/loopy/target/__init__.py index aac528087..a08b406f5 100644 --- a/loopy/target/__init__.py +++ b/loopy/target/__init__.py @@ -32,6 +32,7 @@ __doc__ = """ .. autoclass:: ASTBuilderBase .. autoclass:: CTarget +.. autoclass:: ExecutableCTarget .. autoclass:: CudaTarget .. autoclass:: OpenCLTarget .. autoclass:: PyOpenCLTarget diff --git a/loopy/target/c/c_execution.py b/loopy/target/c/c_execution.py index 164d59b9e..1a69d8da2 100644 --- a/loopy/target/c/c_execution.py +++ b/loopy/target/c/c_execution.py @@ -306,8 +306,8 @@ class CompiledCKernel(object): """ def __init__(self, knl, idi, dev_code, target, comp=CCompiler()): - from loopy.target.c import CTarget - assert isinstance(target, CTarget) + from loopy.target.c import ExecutableCTarget + assert isinstance(target, ExecutableCTarget) self.target = target self.name = knl.name # get code and build -- GitLab From 9c5607f503d0470670aa12db12387bfa4f8dbc01 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 4 Dec 2017 11:08:34 -0500 Subject: [PATCH 2/2] revert --- loopy/cli.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loopy/cli.py b/loopy/cli.py index 1228d8e6c..060340d59 100644 --- a/loopy/cli.py +++ b/loopy/cli.py @@ -83,8 +83,8 @@ def main(): from loopy.target.ispc import ISPCTarget target = ISPCTarget(occa_mode=True) elif args.target == "c": - from loopy.target.c import ExecutableCTarget - target = ExecutableCTarget() + from loopy.target.c import CTarget + target = CTarget() elif args.target == "c-fortran": from loopy.target.c import CTarget target = CTarget(fortran_abi=True) -- GitLab