From d20a243f3a26d294fd4302a6131b0d93089d3f0d Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sat, 27 Jun 2020 19:34:06 -0500 Subject: [PATCH 01/41] Initial compiling, non-working pybind11 wrapper --- .editorconfig | 32 + .github/workflows/ci.yml | 45 + .gitlab-ci.yml | 66 +- .gitmodules | 3 - MANIFEST.in | 8 +- README.rst | 13 +- aksetup_helper.py | 280 +- bpl-subset | 1 - build-with-barvinok.sh | 67 + examples/demo.py | 11 +- gen_wrap.py | 553 +++- isl | 2 +- isl_declaration_macros.h | 32 - isl_declaration_macros_expanded_v14.h | 2429 ---------------- islpy/version.py | 2 +- ...609bef79bab7d128cffd9241099e9b3741bb54dced | 168 ++ ...d4ec58e4b1a2e0b84532f1ef64fafa71a5f9a2c524 | 47 + ...1aeee83177046221b027b407c1f6e3dfb8fce8fee5 | 63 + ...d60fa5689a99f6d3907a384e6d5d62ba603e094d17 | 39 + ...03cd32b4ba1587f891072403771288d5fe7d3be74f | 71 + ...ec5c67e8aeee48891a4d7bbfaebecd4f9612af76f1 | 41 + ...f87bcb4cc76f24b361f764292dcd25befafc749905 | 38 + ...aa0a891da59b34c30ba660fedda0c14cc4c339e14c | 338 +++ ...2e09553463ba74ba6d7c0f73a6d60398b5394e95c8 | 102 + ...3dbf44e2fba07f582322a93781f1cb8278717e26a2 | 2465 ++--------------- ...b34a397c31e0b3711a5b79ead5be3c43f4ccdbcded | 694 +++++ ...655c678c4b8d2fb885ffd1bb39e724edf1340d4687 | 74 + ...923375ab4e9b124b11ec0e325af5f1aa88609d8f70 | 1243 +++++++++ ...8ffd40652fe19c3c47b83fe7ca4ec54b3f0c4bff08 | 194 ++ ...4bb90a93f2505dbe09c5379dd341ec5ae7732458a2 | 178 ++ ...78d2258d5ffe33a5890f5a2665e1b07af4d4ab80c2 | 130 + ...9ba52970f590665085ea78ac396971a73f8c9b9964 | 125 + ...42c0a66ff0bdce95b1e4776d38aeeb7bb53214f6a2 | 91 + ...419a44bc82d1a3723db001097257d1e1f860b3961c | 294 ++ ...11aa90891962fd5d0d4850b752e1068d5457f5cf7a | 33 + ...ca75ff90069696d33238e5be968491f37f62be76de | 769 +++++ ...bbe5fb30a5286460669d9ad1c797b7c35587bac52b | 142 + ...8e9040cc208b9889f90297e90e03be992a03f27686 | 230 ++ ...412fce643ab84163d592e3d0a663ca1468f22b2126 | 187 ++ ...0fd30f37a78e4f1961a2930783fd2528b302f720b5 | 546 ++++ ...8e294bd4b6c81edee5edf110c389374a60bcc6be72 | 31 + regenerate-isl-declaration-macros-expanded.sh | 20 - setup.cfg | 2 +- setup.py | 142 +- src/wrapper/wrap_helpers.hpp | 46 +- src/wrapper/wrap_isl.cpp | 66 +- src/wrapper/wrap_isl.hpp | 67 +- src/wrapper/wrap_isl_part1.cpp | 69 +- src/wrapper/wrap_isl_part2.cpp | 21 +- src/wrapper/wrap_isl_part3.cpp | 3 +- test/test_isl.py | 263 +- 51 files changed, 7525 insertions(+), 5051 deletions(-) create mode 100644 .editorconfig create mode 100644 .github/workflows/ci.yml delete mode 160000 bpl-subset create mode 100755 build-with-barvinok.sh delete mode 100644 isl_declaration_macros.h delete mode 100644 isl_declaration_macros_expanded_v14.h create mode 100644 preproc-headers/00acdddc7f2724521ea27b609bef79bab7d128cffd9241099e9b3741bb54dced create mode 100644 preproc-headers/07210d6c7da99014318baad4ec58e4b1a2e0b84532f1ef64fafa71a5f9a2c524 create mode 100644 preproc-headers/0ebe8d452f8098e326bcae1aeee83177046221b027b407c1f6e3dfb8fce8fee5 create mode 100644 preproc-headers/198b62646817de1f144aa8d60fa5689a99f6d3907a384e6d5d62ba603e094d17 create mode 100644 preproc-headers/1af5b88ab98c657d7b972e03cd32b4ba1587f891072403771288d5fe7d3be74f create mode 100644 preproc-headers/1b4e45a0179e87945fa630ec5c67e8aeee48891a4d7bbfaebecd4f9612af76f1 create mode 100644 preproc-headers/2e56e4449bd63e4ce362b3f87bcb4cc76f24b361f764292dcd25befafc749905 create mode 100644 preproc-headers/440a7ec726aae68823966faa0a891da59b34c30ba660fedda0c14cc4c339e14c create mode 100644 preproc-headers/72f4cb515f999eec5245f22e09553463ba74ba6d7c0f73a6d60398b5394e95c8 rename isl_declaration_macros_expanded.h => preproc-headers/75bdd384d9793d0adb0e1e3dbf44e2fba07f582322a93781f1cb8278717e26a2 (94%) create mode 100644 preproc-headers/85990c7737ab3ff3557bc2b34a397c31e0b3711a5b79ead5be3c43f4ccdbcded create mode 100644 preproc-headers/8fa89ec6fec498d28a0e86655c678c4b8d2fb885ffd1bb39e724edf1340d4687 create mode 100644 preproc-headers/9704ba63715975aacc95c0923375ab4e9b124b11ec0e325af5f1aa88609d8f70 create mode 100644 preproc-headers/9758fb9d3cf05e1cb1ad978ffd40652fe19c3c47b83fe7ca4ec54b3f0c4bff08 create mode 100644 preproc-headers/97d9776cea0d429fb413464bb90a93f2505dbe09c5379dd341ec5ae7732458a2 create mode 100644 preproc-headers/b1b2247dd156415daf938078d2258d5ffe33a5890f5a2665e1b07af4d4ab80c2 create mode 100644 preproc-headers/b73e1aad66190df39c8d0e9ba52970f590665085ea78ac396971a73f8c9b9964 create mode 100644 preproc-headers/bf37233eabe4e4eb1b852542c0a66ff0bdce95b1e4776d38aeeb7bb53214f6a2 create mode 100644 preproc-headers/c2531089626ef4db9e56e4419a44bc82d1a3723db001097257d1e1f860b3961c create mode 100644 preproc-headers/d40e142630a78275f34f1011aa90891962fd5d0d4850b752e1068d5457f5cf7a create mode 100644 preproc-headers/d4d86011cca2702b795d57ca75ff90069696d33238e5be968491f37f62be76de create mode 100644 preproc-headers/db16d31de902815eccf86dbbe5fb30a5286460669d9ad1c797b7c35587bac52b create mode 100644 preproc-headers/dc67b0ce3dea88efbe42948e9040cc208b9889f90297e90e03be992a03f27686 create mode 100644 preproc-headers/e2498d10a929860891e1d4412fce643ab84163d592e3d0a663ca1468f22b2126 create mode 100644 preproc-headers/f50fac0beb24a73d2849670fd30f37a78e4f1961a2930783fd2528b302f720b5 create mode 100644 preproc-headers/f5e918ac8556215393136c8e294bd4b6c81edee5edf110c389374a60bcc6be72 delete mode 100755 regenerate-isl-declaration-macros-expanded.sh diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..dcbc21d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,32 @@ +# https://editorconfig.org/ +# https://github.com/editorconfig/editorconfig-vim +# https://github.com/editorconfig/editorconfig-emacs + +root = true + +[*] +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.py] +indent_size = 4 + +[*.rst] +indent_size = 4 + +[*.cpp] +indent_size = 2 + +[*.hpp] +indent_size = 2 + +# There may be one in doc/ +[Makefile] +indent_style = tab + +# https://github.com/microsoft/vscode/issues/1679 +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..4130994 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,45 @@ +name: CI +on: + push: + branches: + - master + pull_request: + paths-ignore: + - 'doc/*.rst' + schedule: + - cron: '17 3 * * 0' + +jobs: + flake8: + name: Flake8 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - name: "Main Script" + run: | + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh + . ./prepare-and-run-flake8.sh ./islpy ./test + + pytest: + name: Pytest on Py${{ matrix.python-version }} + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.6, 3.7, 3.8] + steps: + - uses: actions/checkout@v2 + - + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + - name: "Main Script" + run: | + EXTRA_INSTALL="cffi" + curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh + . ./build-and-test-py-project.sh + +# vim: sw=4 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8748833..1cf2492 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,27 +1,75 @@ -Python 2.7: +Python 3: script: - - py_version=2.7 + - export PY_EXE=python3 - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" tags: - - python2.7 + - python3 except: - tags -Python 3.4: + artifacts: + reports: + junit: test/pytest.xml + +Python 3 small integer opt: script: - - py_version=3.4 + - export PY_EXE=python3 - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh + - ./configure.py --use-imath-sio - ". ./build-and-test-py-project.sh" tags: - - python3.4 + - python3 except: - tags -Python 2.6: + artifacts: + reports: + junit: test/pytest.xml + +Python 3 + Barvinok: script: - - py_version=2.6 + - git clean -fdx + - python3 -m venv .env + - source .env/bin/activate + - python -m ensurepip + - pip install cffi pcpp + - "./build-with-barvinok.sh" + tags: + - python3 + except: + - tags + artifacts: + reports: + junit: test/pytest.xml + +PyPy3: + script: + - export PY_EXE=pypy3 - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-and-test-py-project.sh - ". ./build-and-test-py-project.sh" + allow_failure: true + tags: + - pypy + except: + - tags + artifacts: + reports: + junit: test/pytest.xml + +Documentation: + script: + - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/build-docs.sh + - ". ./build-docs.sh" + tags: + - python3 + only: + - master + +Flake8: + script: + - curl -L -O -k https://gitlab.tiker.net/inducer/ci-support/raw/master/prepare-and-run-flake8.sh + - ". ./prepare-and-run-flake8.sh islpy test" tags: - - python2.6 + - python3 except: - tags + diff --git a/.gitmodules b/.gitmodules index 670e245..dbf0c71 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ [submodule "isl"] path = isl url = http://repo.or.cz/isl.git -[submodule "bpl-subset"] - path = bpl-subset - url = git://github.com/inducer/bpl-subset diff --git a/MANIFEST.in b/MANIFEST.in index 5933e5b..63e3a69 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,12 +3,16 @@ include isl/*.h include isl/imath/*.c include isl/imath/*.h include isl/imath_wrap/*.h +include isl/imath_wrap/*.c include isl/include/isl/*.h +include isl/include/isl/*.c include isl/include/isl/deprecated/*.h include isl-supplementary/isl/*.h include isl-supplementary/*.h include isl_declaration_macros_expanded_v*.h +include preproc-headers/* + include src/wrapper/*.h include src/wrapper/*.hpp include src/wrapper/*.cpp @@ -16,7 +20,7 @@ include src/wrapper/*.cpp include gen_wrap.py include test/*.py -include example/*.py +include examples/*.py include doc/*.rst include doc/images/*png @@ -32,5 +36,7 @@ include README_SETUP.txt include README.rst +include isl/LICENSE +include isl/imath/LICENSE recursive-include bpl-subset/bpl_subset/boost *.h *.hpp *.cpp *.html *.inl *.ipp *.pl *.txt recursive-include bpl-subset/bpl_subset/libs *.h *.hpp *.cpp *.html *.inl *.ipp *.pl *.txt diff --git a/README.rst b/README.rst index a52ac85..28065c1 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,15 @@ +islpy: Polyhedral Analysis from Python +====================================== + +.. image:: https://gitlab.tiker.net/inducer/islpy/badges/master/pipeline.svg + :alt: Gitlab Build Status + :target: https://gitlab.tiker.net/inducer/islpy/commits/master +.. image:: https://github.com/inducer/islpy/workflows/CI/badge.svg?branch=master&event=push + :alt: Github Build Status + :target: https://github.com/inducer/islpy/actions?query=branch%3Amaster+workflow%3ACI+event%3Apush .. image:: https://badge.fury.io/py/islpy.png - :target: http://pypi.python.org/pypi/islpy + :alt: Python Package Index Release Page + :target: https://pypi.org/project/islpy/ islpy is a Python wrapper around Sven Verdoolaege's `isl `_, a library for manipulating sets and @@ -24,4 +34,3 @@ Islpy comes with comprehensive `documentation `_ *Requirements:* islpy needs a C++ compiler to build. GMP, which used to be a dependency, is no longer required. - diff --git a/aksetup_helper.py b/aksetup_helper.py index 12d888c..f90d085 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -1,10 +1,12 @@ import setuptools # noqa from setuptools import Extension +import sys +from setuptools.command.build_ext import ( # noqa: N812 + build_ext as BaseBuildExtCommand) def count_down_delay(delay): from time import sleep - import sys while delay: sys.stdout.write("Continuing in %d seconds... \r" % delay) sys.stdout.flush() @@ -12,6 +14,7 @@ def count_down_delay(delay): sleep(1) print("") + DASH_SEPARATOR = 75 * "-" @@ -23,7 +26,7 @@ def setup(*args, **kwargs): raise except SystemExit: raise - except: + except Exception: print(DASH_SEPARATOR) print("Sorry, your build failed. Try rerunning configure.py with " "different options.") @@ -31,6 +34,14 @@ def setup(*args, **kwargs): raise +def get_numpy_incpath(): + from imp import find_module + # avoid actually importing numpy, it screws up distutils + file, pathname, descr = find_module("numpy") + from os.path import join + return join(pathname, "core", "include") + + class NumpyExtension(Extension): # nicked from # http://mail.python.org/pipermail/distutils-sig/2007-September/008253.html @@ -40,15 +51,11 @@ class NumpyExtension(Extension): self._include_dirs = self.include_dirs del self.include_dirs # restore overwritten property - def get_numpy_incpath(self): - from imp import find_module - # avoid actually importing numpy, it screws up distutils - file, pathname, descr = find_module("numpy") - from os.path import join - return join(pathname, "core", "include") + def get_additional_include_dirs(self): + return [get_numpy_incpath()] def get_include_dirs(self): - return self._include_dirs + [self.get_numpy_incpath()] + return self._include_dirs + self.get_additional_include_dirs() def set_include_dirs(self, value): self._include_dirs = value @@ -59,38 +66,44 @@ class NumpyExtension(Extension): include_dirs = property(get_include_dirs, set_include_dirs, del_include_dirs) -class PyUblasExtension(NumpyExtension): - def get_module_include_path(self, name): - from pkg_resources import Requirement, resource_filename - return resource_filename(Requirement.parse(name), "%s/include" % name) +class ExtensionUsingNumpy(Extension): + """Unlike :class:`NumpyExtension`, this class does not require numpy to be + importable upon extension module creation, allowing ``setup_requires=["numpy"]`` + to work. On the other hand, it requires the use of:: - @property - def include_dirs(self): - return self._include_dirs + [ - self.get_numpy_incpath(), - self.get_module_include_path("pyublas"), - ] + setup(..., + cmdclass={'build_ext': NumpyBuildExtCommand}) + or + + setup(..., + cmdclass={'build_ext': PybindBuildExtCommand}) + """ -class HedgeExtension(PyUblasExtension): - @property - def include_dirs(self): - return self._include_dirs + [ - self.get_numpy_incpath(), - self.get_module_include_path("pyublas"), - self.get_module_include_path("hedge"), - ] + +class NumpyBuildExtCommand(BaseBuildExtCommand): + def build_extension(self, extension): + # We add the numpy include dir right before building the + # extension, in order to avoid having to import numpy when + # the setup script is imported, which would prevent + # installation before manual installation of numpy. + if isinstance(extension, ExtensionUsingNumpy): + numpy_incpath = get_numpy_incpath() + if numpy_incpath not in extension.include_dirs: + extension.include_dirs.append(numpy_incpath) + + BaseBuildExtCommand.build_extension(self, extension) # {{{ tools -def flatten(list): +def flatten(lst): """For an iterable of sub-iterables, generate each member of each sub-iterable in turn, i.e. a flattened version of that super-iterable. Example: Turn [[a,b,c],[d,e,f]] into [a,b,c,d,e,f]. """ - for sublist in list: + for sublist in lst: for j in sublist: yield j @@ -128,7 +141,9 @@ def get_config(schema=None, warn_about_no_config=True): count_down_delay(delay=10) - return expand_options(schema.read_config()) + config = expand_options(schema.read_config()) + schema.update_config_from_and_modify_command_line(config, sys.argv) + return config def hack_distutils(debug=False, fast_link=True, what_opt=3): @@ -143,7 +158,6 @@ def hack_distutils(debug=False, fast_link=True, what_opt=3): break return optlist - import sys if not sys.platform.lower().startswith("win"): from distutils import sysconfig @@ -162,7 +176,10 @@ def hack_distutils(debug=False, fast_link=True, what_opt=3): cflags.append("-DNDEBUG") cvars['OPT'] = str.join(' ', cflags) - cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] + if "BASECFLAGS" in cvars: + cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] + else: + assert "CFLAGS" in cvars if fast_link: for varname in ["LDSHARED", "BLDSHARED"]: @@ -208,7 +225,7 @@ def expand_value(v, options): for i in v: try: exp_i = expand_value(i, options) - except: + except Exception: pass else: result.append(exp_i) @@ -233,7 +250,6 @@ class ConfigSchema: from os.path import expanduser self.user_conf_file = expanduser("~/.aksetup-defaults.py") - import sys if not sys.platform.lower().startswith("win"): self.global_conf_file = "/etc/aksetup-defaults.py" else: @@ -282,7 +298,7 @@ class ConfigSchema: if value is not None: filevars[key] = value - keys = filevars.keys() + keys = list(filevars.keys()) keys.sort() outf = open(filename, "w") @@ -328,23 +344,44 @@ class ConfigSchema: import os return os.access(self.get_conf_file(), os.R_OK) - def read_config(self, warn_if_none=True): + def update_from_python_snippet(self, config, py_snippet, filename): + filevars = {} + exec(compile(py_snippet, filename, "exec"), filevars) + + for key, value in filevars.items(): + if key in self.optdict: + config[key] = value + elif key == "__builtins__": + pass + else: + raise KeyError("invalid config key in %s: %s" % ( + filename, key)) + + def update_config_from_and_modify_command_line(self, config, argv): + cfg_prefix = "--conf:" + + i = 0 + while i < len(argv): + arg = argv[i] + + if arg.startswith(cfg_prefix): + del argv[i] + self.update_from_python_snippet( + config, arg[len(cfg_prefix):], "") + else: + i += 1 + + return config + + def read_config(self): import os cfile = self.get_conf_file() result = self.get_default_config_with_files() if os.access(cfile, os.R_OK): - filevars = {} - exec(compile(open(cfile, "r").read(), cfile, "exec"), filevars) - - for key, value in filevars.items(): - if key in self.optdict: - result[key] = value - elif key == "__builtins__": - pass - else: - raise KeyError("invalid config key in %s: %s" % ( - cfile, key)) + with open(cfile, "r") as inf: + py_snippet = inf.read() + self.update_from_python_snippet(result, py_snippet, cfile) return result @@ -479,12 +516,15 @@ class Libraries(StringListOption): help=help or ("Library names for %s (without lib or .so)" % (human_name or humanize(lib_name)))) +# }}} + + +# {{{ configure options for specific software class BoostLibraries(Libraries): def __init__(self, lib_base_name, default_lib_name=None): if default_lib_name is None: if lib_base_name == "python": - import sys default_lib_name = "boost_python-py%d%d" % sys.version_info[:2] else: default_lib_name = "boost_%s" % lib_base_name @@ -492,7 +532,7 @@ class BoostLibraries(Libraries): Libraries.__init__(self, "BOOST_%s" % lib_base_name.upper(), [default_lib_name], help="Library names for Boost C++ %s library (without lib or .so)" - % humanize(lib_base_name)) + % humanize(lib_base_name)) def set_up_shipped_boost_if_requested(project_name, conf, source_path=None, @@ -506,7 +546,6 @@ def set_up_shipped_boost_if_requested(project_name, conf, source_path=None, (only relevant in shipped mode) """ from os.path import exists - import sys if source_path is None: source_path = "bpl-subset/bpl_subset" @@ -605,6 +644,10 @@ def make_boost_base_options(): help="The compiler with which Boost C++ was compiled, e.g. gcc43"), ] +# }}} + + +# {{{ configure frontend def configure_frontend(): from optparse import OptionParser @@ -619,8 +662,6 @@ def configure_frontend(): print("*** %s." % schema.get_conf_file()) print("************************************************************") - import sys - description = "generate a configuration file for this software package" parser = OptionParser(description=description) parser.add_option( @@ -658,6 +699,8 @@ def configure_frontend(): substitute(substs, "Makefile") +# }}} + def substitute(substitutions, fname): import re @@ -667,17 +710,20 @@ def substitute(substitutions, fname): fname_in = fname+".in" lines = open(fname_in, "r").readlines() new_lines = [] - for l in lines: + for line in lines: made_change = True while made_change: made_change = False - match = var_re.search(l) + match = var_re.search(line) if match: varname = match.group(1) - l = l[:match.start()] + str(substitutions[varname]) + l[match.end():] + line = ( + line[:match.start()] + + str(substitutions[varname]) + + line[match.end():]) made_change = True - match = string_var_re.search(l) + match = string_var_re.search(line) if match: varname = match.group(1) subst = substitutions[varname] @@ -686,12 +732,11 @@ def substitute(substitutions, fname): else: subst = '"%s"' % subst - l = l[:match.start()] + subst + l[match.end():] + line = line[:match.start()] + subst + line[match.end():] made_change = True - new_lines.append(l) + new_lines.append(line) new_lines.insert(1, "# DO NOT EDIT THIS FILE -- " "it was generated by configure.py\n") - import sys new_lines.insert(2, "# %s\n" % (" ".join(sys.argv))) open(fname, "w").write("".join(new_lines)) @@ -700,9 +745,12 @@ def substitute(substitutions, fname): chmod(fname, infile_stat_res.st_mode) +# {{{ git bits + def _run_git_command(cmd): git_error = None from subprocess import Popen, PIPE + stdout = None try: popen = Popen(["git"] + cmd, stdout=PIPE) stdout, stderr = popen.communicate() @@ -722,8 +770,11 @@ def _run_git_command(cmd): print(git_error) print("Hit Ctrl-C now if you'd like to think about the situation.") print(DASH_SEPARATOR) - count_down_delay(delay=5) - return stdout.decode("utf-8"), git_error + count_down_delay(delay=0) + if stdout: + return stdout.decode("utf-8"), git_error + else: + return '', "(subprocess call to git did not succeed)" def check_git_submodules(): @@ -800,3 +851,110 @@ def check_git_submodules(): print(DASH_SEPARATOR) print("git submodules initialized successfully") print(DASH_SEPARATOR) + +# }}} + + +# {{{ pybind11 + +def check_pybind11(): + try: + import pybind11 # noqa + except ImportError: + print(DASH_SEPARATOR) + print("Pybind11 is not installed.") + print(DASH_SEPARATOR) + print("Very likely, the build process after this message will fail.") + print("") + print("Simply press Ctrl+C and type") + print("python -m pip install pybind11") + print("to fix this. If you don't, the build will continue ") + print("in a few seconds.") + print("") + print("[1] https://pybind11.readthedocs.io/en/stable/") + print(DASH_SEPARATOR) + + from aksetup_helper import count_down_delay + count_down_delay(delay=10) + + +# {{{ (modified) boilerplate from https://github.com/pybind/python_example/blob/2ed5a68759cd6ff5d2e5992a91f08616ef457b5c/setup.py # noqa + +class get_pybind_include(object): # noqa: N801 + """Helper class to determine the pybind11 include path + + The purpose of this class is to postpone importing pybind11 + until it is actually installed, so that the ``get_include()`` + method can be invoked. """ + + def __init__(self, user=False): + self.user = user + + def __str__(self): + import pybind11 + return pybind11.get_include(self.user) + + +# As of Python 3.6, CCompiler has a `has_flag` method. +# cf http://bugs.python.org/issue26689 +def has_flag(compiler, flagname): + """Return a boolean indicating whether a flag name is supported on + the specified compiler. + """ + import tempfile + with tempfile.NamedTemporaryFile('w', suffix='.cpp', delete=False) as f: + f.write('int main (int argc, char **argv) { return 0; }') + fname = f.name + try: + compiler.compile([fname], extra_postargs=[flagname]) + except setuptools.distutils.errors.CompileError: + return False + return True + + +def cpp_flag(compiler): + """Return the -std=c++[11/14] compiler flag. + + The c++14 is prefered over c++11 (when it is available). + """ + if has_flag(compiler, '-std=gnu++14'): + return '-std=gnu++14' + elif has_flag(compiler, '-std=c++14'): + return '-std=c++14' + elif has_flag(compiler, '-std=c++11'): + return '-std=c++11' + else: + raise RuntimeError('Unsupported compiler -- at least C++11 support ' + 'is needed!') + + +class PybindBuildExtCommand(NumpyBuildExtCommand): + """A custom build extension for adding compiler-specific options.""" + c_opts = { + 'msvc': ['/EHsc'], + 'unix': [], + } + + if sys.platform == 'darwin': + c_opts['unix'] += ['-stdlib=libc++', '-mmacosx-version-min=10.7'] + + def build_extensions(self): + ct = self.compiler.compiler_type + opts = self.c_opts.get(ct, []) + if ct in ['unix', 'mingw32']: + opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) + opts.append(cpp_flag(self.compiler)) + if has_flag(self.compiler, '-fvisibility=hidden'): + opts.append('-fvisibility=hidden') + elif ct == 'msvc': + opts.append('/DVERSION_INFO=\\"%s\\"' % self.distribution.get_version()) + for ext in self.extensions: + ext.extra_compile_args = ext.extra_compile_args + opts + + NumpyBuildExtCommand.build_extensions(self) + +# }}} + +# }}} + +# vim: foldmethod=marker diff --git a/bpl-subset b/bpl-subset deleted file mode 160000 index a44c81f..0000000 --- a/bpl-subset +++ /dev/null @@ -1 +0,0 @@ -Subproject commit a44c81ff6251387d660a25b3c1c39a5639484079 diff --git a/build-with-barvinok.sh b/build-with-barvinok.sh new file mode 100755 index 0000000..f9d548b --- /dev/null +++ b/build-with-barvinok.sh @@ -0,0 +1,67 @@ +#! /bin/bash + +set -e +set -x + +BUILD_DIR=$(mktemp -d -t islpy-barvinok-build-XXXXXXX) +echo "BUILDING IN $BUILD_DIR" + +PREFIX="$HOME/pack/barvinok" +NTL_VER="10.5.0" +BARVINOK_GIT_REV="barvinok-0.41.2" +NPROCS=6 + +if true; then + rm -Rf "$BUILD_DIR" + + mkdir "$BUILD_DIR" + cd "$BUILD_DIR" + + rm -Rf islpy + git clone --recursive https://github.com/inducer/islpy + + curl -L -O http://shoup.net/ntl/ntl-"$NTL_VER".tar.gz + tar xfz ntl-"$NTL_VER".tar.gz + cd "$BUILD_DIR/ntl-$NTL_VER/src" + ./configure NTL_GMP_LIP=on PREFIX="$PREFIX" TUNE=x86 SHARED=on + make -j$NPROCS + make install + + cd "$BUILD_DIR" + rm -Rf barvinok + git clone git://repo.or.cz/barvinok.git + cd barvinok + git checkout $BARVINOK_GIT_REV + + numtries=1 + while ! ./get_submodules.sh; do + sleep 5 + numtries=$((numtries+1)) + if test "$numtries" == 5; then + echo "*** getting barvinok submodules failed even after a few tries" + exit 1 + fi + done + + (cd isl; patch -p1 < ../../islpy/add-missing-isl_term_cow-in-isl_poly_foreach_term.patch) + + sh autogen.sh + ./configure \ + --prefix="$PREFIX" \ + --with-ntl-prefix="$PREFIX" \ + --enable-shared-barvinok \ + --with-pet=no + + make -j$NPROCS + make install +fi + +cd "$BUILD_DIR" +cd islpy +./configure.py \ + --no-use-shipped-isl \ + --no-use-shipped-imath \ + --isl-inc-dir=$PREFIX/include \ + --isl-lib-dir=$PREFIX/lib \ + --use-barvinok +CC=g++ LDSHARED="g++ -shared" python setup.py install diff --git a/examples/demo.py b/examples/demo.py index b760e47..cbca0d8 100644 --- a/examples/demo.py +++ b/examples/demo.py @@ -1,7 +1,6 @@ import islpy as isl -ctx = isl.Context() -space = isl.Space.create_from_names(ctx, set=["x", "y"]) +space = isl.Space.create_from_names(isl.DEFAULT_CONTEXT, set=["x", "y"]) bset = (isl.BasicSet.universe(space) .add_constraint(isl.Constraint.ineq_from_names(space, {1: -1, "x": 1})) @@ -35,7 +34,9 @@ def plot_basic_set(bset, *args, **kwargs): for v in vertices: points = [] - isl.Set.from_basic_set(v.get_expr()).foreach_point(points.append) + myset = (isl.Map.from_basic_map(isl.BasicMap.from_multi_aff(v.get_expr())) + .range()) + myset.foreach_point(points.append) point, = points vertex_pts.append([ point.get_coordinate_val(isl.dim_type.set, i).to_python() @@ -48,7 +49,7 @@ def plot_basic_set(bset, *args, **kwargs): from math import atan2 vertex_pts = np.array( - sorted(vertex_pts, key=lambda x, y: atan2(y-center[0], x-center[1]))) + sorted(vertex_pts, key=lambda x: atan2(x[1]-center[1], x[0]-center[0]))) if plot_vert: pt.plot(vertex_pts[:, 0], vertex_pts[:, 1], "o") @@ -56,7 +57,7 @@ def plot_basic_set(bset, *args, **kwargs): import matplotlib.path as mpath import matplotlib.patches as mpatches - Path = mpath.Path + Path = mpath.Path # noqa codes = [Path.LINETO] * len(vertex_pts) codes[0] = Path.MOVETO diff --git a/gen_wrap.py b/gen_wrap.py index a9b43c8..e5166cc 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1,14 +1,40 @@ +__copyright__ = "Copyright (C) 2011-20 Andreas Kloeckner" + +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + import re import sys +import os +from os.path import join SEM_TAKE = "take" SEM_GIVE = "give" SEM_KEEP = "keep" +SEM_NULL = "null" ISL_SEM_TO_SEM = { "__isl_take": SEM_TAKE, "__isl_give": SEM_GIVE, "__isl_keep": SEM_KEEP, + "__isl_null": SEM_NULL, } NON_COPYABLE = ["ctx", "printer", "access_info"] @@ -49,6 +75,7 @@ class Method: args, is_exported, is_constructor): self.cls = cls self.name = name + assert name self.c_name = c_name self.return_semantics = return_semantics self.return_base_type = return_base_type @@ -67,6 +94,8 @@ class Method: @property def is_mutator(self): + # FIXME + return False return (not self.is_static and self.args[0].semantics is SEM_TAKE and self.return_ptr == "*" == self.args[0].ptr @@ -81,6 +110,8 @@ class Method: # }}} +# {{{ PART_TO_CLASSES + PART_TO_CLASSES = { # If you change this, change: # - src/wrapper/wrap_isl.hpp to add WRAP_CLASS(...) @@ -89,21 +120,29 @@ PART_TO_CLASSES = { "part1": [ # lists - "id_list", - "basic_set_list", "basic_map_list", "set_list", - "aff_list", "pw_aff_list", "band_list", + "id_list", "val_list", + "basic_set_list", "basic_map_list", "set_list", "map_list", + "union_set_list", + "constraint_list", + "aff_list", "pw_aff_list", "pw_multi_aff_list", "ast_expr_list", "ast_node_list", + "pw_qpolynomial_list", + "pw_qpolynomial_fold_list", + "union_pw_aff_list", + "union_pw_multi_aff_list", + "union_map_list", # maps "id_to_ast_expr", # others - "printer", "val", "multi_val", "vec", "mat", + "printer", "val", "multi_val", "vec", "mat", "fixed_box", "aff", "pw_aff", "union_pw_aff", "multi_aff", "multi_pw_aff", "pw_multi_aff", "union_pw_multi_aff", "multi_union_pw_aff", - "id", + "id", "multi_id", + "constraint", "space", "local_space", ], @@ -112,6 +151,7 @@ PART_TO_CLASSES = { "set", "map", "union_map", "union_set", "point", "vertex", "cell", "vertices", + "stride_info", ], "part3": [ @@ -141,17 +181,169 @@ CLASS_MAP = { "options": "ctx", } -ENUMS = ["isl_dim_type", "isl_fold", - "isl_ast_op_type", "isl_ast_expr_type", - "isl_ast_node_type", "isl_stat"] +# }}} + + +# {{{ enums + +ENUMS = { + # ctx.h + "isl_error": """ + isl_error_none, + isl_error_abort, + isl_error_alloc, + isl_error_unknown, + isl_error_internal, + isl_error_invalid, + isl_error_quota, + isl_error_unsupported, + """, + "isl_stat": """ + isl_stat_error, + isl_stat_ok, + """, + "isl_bool": """ + isl_bool_error, + isl_bool_false, + isl_bool_true, + """, + # space.h + "isl_dim_type": """ + isl_dim_cst, + isl_dim_param, + isl_dim_in, + isl_dim_out, + isl_dim_set, + isl_dim_div, + isl_dim_all, + """, + + # schedule_type.h + "isl_schedule_node_type": """ + isl_schedule_node_error, + isl_schedule_node_band, + isl_schedule_node_context, + isl_schedule_node_domain, + isl_schedule_node_expansion, + isl_schedule_node_extension, + isl_schedule_node_filter, + isl_schedule_node_leaf, + isl_schedule_node_guard, + isl_schedule_node_mark, + isl_schedule_node_sequence, + isl_schedule_node_set, + """, + + # ast_type.h + "isl_ast_expr_op_type": """ + isl_ast_op_error, + isl_ast_op_and, + isl_ast_op_and_then, + isl_ast_op_or, + isl_ast_op_or_else, + isl_ast_op_max, + isl_ast_op_min, + isl_ast_op_minus, + isl_ast_op_add, + isl_ast_op_sub, + isl_ast_op_mul, + isl_ast_op_div, + isl_ast_op_fdiv_q, + isl_ast_op_pdiv_q, + isl_ast_op_pdiv_r, + isl_ast_op_zdiv_r, + isl_ast_op_cond, + isl_ast_op_select, + isl_ast_op_eq, + isl_ast_op_le, + isl_ast_op_lt, + isl_ast_op_ge, + isl_ast_op_gt, + isl_ast_op_call, + isl_ast_op_access, + isl_ast_op_member, + isl_ast_op_address_of, + """, + "isl_ast_expr_type": """ + isl_ast_expr_error, + isl_ast_expr_op, + isl_ast_expr_id, + isl_ast_expr_int, + """, + "isl_ast_node_type": """ + isl_ast_node_error, + isl_ast_node_for, + isl_ast_node_if, + isl_ast_node_block, + isl_ast_node_mark, + isl_ast_node_user, + """, + "isl_ast_loop_type": """ + isl_ast_loop_error, + isl_ast_loop_default, + isl_ast_loop_atomic, + isl_ast_loop_unroll, + isl_ast_loop_separate, + """, + + # polynomial_type.h + "isl_fold": """ + isl_fold_min, + isl_fold_max, + isl_fold_list, + """, + + # printer.h + "isl_format": """ + ISL_FORMAT_ISL, + ISL_FORMAT_POLYLIB, + ISL_FORMAT_POLYLIB_CONSTRAINTS, + ISL_FORMAT_OMEGA, + ISL_FORMAT_C, + ISL_FORMAT_LATEX, + ISL_FORMAT_EXT_POLYLIB, + """, + + "isl_yaml_style": """ + ISL_YAML_STYLE_BLOCK, + ISL_YAML_STYLE_FLOW, + """, + + # options.h + + "isl_bound": """ + ISL_BOUND_BERNSTEIN, + ISL_BOUND_RANGE, + """, + + "isl_on_error": """ + ISL_ON_ERROR_WARN, + ISL_ON_ERROR_CONTINUE, + ISL_ON_ERROR_ABORT, + """, -SAFE_TYPES = ENUMS + ["int", "unsigned", "uint32_t", "size_t", "double", - "long", "unsigned long"] + "isl_schedule_algorithm": """ + ISL_SCHEDULE_ALGORITHM_ISL, + ISL_SCHEDULE_ALGORITHM_FEAUTRIER, + """, + } + +TYPEDEFD_ENUMS = ["isl_stat", "isl_bool"] +MACRO_ENUMS = [ + "isl_format", "isl_yaml_style", + "isl_bound", "isl_on_error", "isl_schedule_algorithm", + ] + +# }}} + +SAFE_TYPES = list(ENUMS) + ["int", "unsigned", "uint32_t", "size_t", "double", + "long", "unsigned long", "isl_size"] SAFE_IN_TYPES = SAFE_TYPES + ["const char *", "char *"] # {{{ parser DECL_RE = re.compile(r""" + (?:__isl_overload\s*)? ((?:\w+\s+)*) (\**) \s* (?# return type) (\w+) (?# func name) \( @@ -170,6 +362,11 @@ FUNC_PTR_RE = re.compile(r""" STRUCT_DECL_RE = re.compile(r"(__isl_export\s+)?struct\s+([a-z_A-Z0-9]+)\s*;") ARG_RE = re.compile(r"^((?:\w+)\s+)+(\**)\s*(\w+)$") INLINE_SEMICOLON_RE = re.compile(r"\;[ \t]*(?=\w)") +SUBCLASS_RE = re.compile( + r"__isl_subclass\s*" + r"\(\s*" + "[0-9a-zA-Z_]+" + r"\s*\)") def filter_semantics(words): @@ -279,13 +476,52 @@ def parse_arg(arg): ptr=arg_match.group(2).strip()) +def preprocess_with_macros(macro_header_contents, code): + try: + from pcpp.preprocessor import ( + Preprocessor as PreprocessorBase, OutputDirective, Action) + except ImportError: + raise RuntimeError("pcpp was not found. Please install pcpp before " + "installing islpy. 'pip install pcpp' should do the job.") + + class MacroExpandingCPreprocessor(PreprocessorBase): + def on_directive_handle(self, directive, toks, ifpassthru, precedingtoks): + if directive.value == "include": + raise OutputDirective(action=Action.IgnoreAndPassThrough) + elif directive.value == "define": + assert toks + macro_name = toks[0].value + if macro_name in ISL_SEM_TO_SEM: + raise OutputDirective(action=Action.IgnoreAndRemove) + + return super(MacroExpandingCPreprocessor, self).on_directive_handle( + directive, toks, ifpassthru, precedingtoks) + + cpp = MacroExpandingCPreprocessor() + if sys.version_info < (3,): + from StringIO import StringIO + else: + from io import StringIO + + # read macro definitions, but don't output resulting code + for macro_header in macro_header_contents: + cpp.parse(macro_header) + cpp.write(StringIO()) + + sio_output = StringIO() + cpp.parse(code) + cpp.write(sio_output) + + return sio_output.getvalue() + + class FunctionData: def __init__(self, include_dirs): self.classes_to_methods = {} self.include_dirs = include_dirs self.seen_c_names = set() - def read_header(self, fname): + def get_header_contents(self, fname): from os.path import join success = False for inc_dir in self.include_dirs: @@ -301,57 +537,115 @@ class FunctionData: raise RuntimeError("header '%s' not found" % fname) try: - lines = inf.readlines() + return inf.read() finally: inf.close() - # split at semicolons + def get_header_hashes(self, fnames): + import hashlib + h = hashlib.sha256() + h.update(b"v1-") + for fname in fnames: + h.update(self.get_header_contents(fname).encode()) + return h.hexdigest() + + preprocessed_dir = "preproc-headers" + macro_headers = ["isl/multi.h", "isl/list.h"] + + def get_preprocessed_header(self, fname): + header_hash = self.get_header_hashes( + self.macro_headers + [fname]) + + # cache preprocessed headers to avoid install-time + # dependency on pcpp + import errno + try: + os.mkdir(self.preprocessed_dir) + except OSError as err: + if err.errno == errno.EEXIST: + pass + else: + raise + + prepro_fname = join(self.preprocessed_dir, header_hash) + try: + with open(prepro_fname, "rt") as inf: + return inf.read() + except OSError: + pass + + print("preprocessing %s..." % fname) + macro_header_contents = [ + self.get_header_contents(mh) + for mh in self.macro_headers] + + prepro_header = preprocess_with_macros( + macro_header_contents, self.get_header_contents(fname)) + + with open(prepro_fname, "wt") as outf: + outf.write(prepro_header) + + return prepro_header + + def read_header(self, fname): + lines = self.get_preprocessed_header(fname).split("\n") + + # heed continuations, split at semicolons new_lines = [] - for l in lines: - l = INLINE_SEMICOLON_RE.sub(";\n", l) - new_lines.extend(l.split("\n")) + i = 0 + while i < len(lines): + my_line = lines[i].strip() + i += 1 + + my_line, _ = SUBCLASS_RE.subn("", my_line) + while my_line.endswith("\\"): + my_line = my_line[:-1] + lines[i].strip() + i += 1 + + if not my_line.strip().startswith("#"): + my_line = INLINE_SEMICOLON_RE.sub(";\n", my_line) + new_lines.extend(my_line.split("\n")) lines = new_lines i = 0 while i < len(lines): - l = lines[i].strip() - - if (not l - or l.startswith("#") - or l.startswith("extern") - or STRUCT_DECL_RE.search(l) - or l.startswith("typedef") - or l == "}"): + line = lines[i].strip() + + if (not line + or line.startswith("extern") + or STRUCT_DECL_RE.search(line) + or line.startswith("typedef") + or line == "}"): i += 1 - elif "/*" in l: + elif "/*" in line: while True: - if "*/" in l: + if "*/" in line: i += 1 break i += 1 - l = lines[i].strip() - elif l.endswith("{"): + line = lines[i].strip() + elif line.endswith("{"): while True: - if "}" in l: + if "}" in line: i += 1 break i += 1 - l = lines[i].strip() + line = lines[i].strip() - elif not l: + elif not line: i += 1 else: decl = "" while True: - decl = decl + l + decl = decl + line if decl: decl += " " i += 1 @@ -362,7 +656,7 @@ class FunctionData: close_par_count = sum(1 for i in decl if i == ")") if open_par_count and open_par_count == close_par_count: break - l = lines[i].strip() + line = lines[i].strip() if not STRUCT_DECL_RE.search(decl): self.parse_decl(decl) @@ -374,20 +668,40 @@ class FunctionData: return return_base_type = decl_match.group(1) + return_base_type = return_base_type.replace("ISL_DEPRECATED", "").strip() + return_ptr = decl_match.group(2) c_name = decl_match.group(3) args = [i.strip() for i in split_at_unparenthesized_commas(decl_match.group(4))] + if args == ["void"]: + args = [] + if c_name in [ "ISL_ARG_DECL", "ISL_DECLARE_LIST", "ISL_DECLARE_LIST_FN", "isl_ast_op_type_print_macro", "ISL_DECLARE_MULTI", + "ISL_DECLARE_MULTI_CMP", "ISL_DECLARE_MULTI_NEG", "ISL_DECLARE_MULTI_DIMS", "ISL_DECLARE_MULTI_WITH_DOMAIN", + "ISL_DECLARE_EXPORTED_LIST_FN", + "ISL_DECLARE_MULTI_IDENTITY", + "ISL_DECLARE_MULTI_ARITH", + "ISL_DECLARE_MULTI_ZERO", + "ISL_DECLARE_MULTI_NAN", + "ISL_DECLARE_MULTI_DIM_ID", + "ISL_DECLARE_MULTI_TUPLE_ID", + "ISL_DECLARE_MULTI_BIND_DOMAIN", + "ISL_DECLARE_MULTI_PARAM", + "ISL_DECLARE_MULTI_DROP_DIMS", + "isl_malloc_or_die", + "isl_calloc_or_die", + "isl_realloc_or_die", + "isl_handle_error", ]: return @@ -398,11 +712,9 @@ class FunctionData: for cls in CLASSES: if name.startswith(cls): found_class = True + name = name[len(cls)+1:] break - if found_class: - name = name[len(cls)+1:] - # Don't be tempted to chop off "_val"--the "_val" versions of # some methods are incompatible with the isl_int ones. # @@ -414,10 +726,23 @@ class FunctionData: # names are carried over to the Python level. if not found_class: - for fake_cls, cls in CLASS_MAP.items(): - if name.startswith(fake_cls): - found_class = True - break + # for fake_cls, cls in CLASS_MAP.items(): + # if name.startswith(fake_cls): + # found_class = True + # break + if name.startswith("bool_"): + return + if name.startswith("options_"): + found_class = True + cls = "ctx" + name = name[len("options_"):] + elif name.startswith("equality_") or name.startswith("inequality_"): + found_class = True + cls = "constraint" + elif name == "ast_op_type_set_print_name": + found_class = True + cls = "printer" + name = "ast_op_type_set_print_name" assert found_class, name @@ -434,7 +759,7 @@ class FunctionData: name = name + "_" if cls == "options": - assert name.startswith("set_") or name.startswith("get_") + assert name.startswith("set_") or name.startswith("get_"), (name, c_name) name = name[:4]+"option_"+name[4:] words = return_base_type.split() @@ -466,6 +791,8 @@ class FunctionData: # }}} +# {{{ get_callback + def get_callback(cb_name, cb): body = [] passed_args = [] @@ -485,7 +812,7 @@ def get_callback(cb_name, cb): passed_args.append("arg_%s" % arg.name) body.append(""" - std::auto_ptr<%(arg_cls)s> wrapped_arg_%(name)s( + std::unique_ptr<%(arg_cls)s> wrapped_arg_%(name)s( new %(arg_cls)s(c_arg_%(name)s)); py::object arg_%(name)s( handle_from_new_ptr(wrapped_arg_%(name)s.get())); @@ -515,9 +842,9 @@ def get_callback(cb_name, cb): #endif } else - return py::extract<%(ret_type)s>(retval); + return py::cast<%(ret_type)s>(retval); } - catch (py::error_already_set) + catch (py::error_already_set &err) { std::cout << "[islpy warning] A Python exception occurred in " "a call back function, ignoring:" << std::endl; @@ -550,6 +877,8 @@ def get_callback(cb_name, cb): body="\n".join(body), passed_args=", ".join(passed_args)) +# }}} + # {{{ wrapper generator @@ -576,7 +905,6 @@ def write_wrapper(outf, meth): if arg.return_base_type not in SAFE_IN_TYPES or arg.return_ptr: raise SignatureNotSupported("non-int callback") - arg_names.pop() arg_idx += 1 if meth.args[arg_idx].name != "user": raise SignatureNotSupported("unexpected callback signature") @@ -630,71 +958,52 @@ def write_wrapper(outf, meth): arg_descr = ":param %s: :class:`Val`" % arg.name input_args.append("py::object py_%s" % arg.name) checks.append(""" - std::auto_ptr auto_arg_%(name)s; - py::extract ex_%(name)s(py_%(name)s); + std::unique_ptr unique_arg_%(name)s; isl_ctx *ctx_for_%(name)s = %(first_arg_base_type)s_get_ctx(arg_%(first_arg)s.m_data); - if (ex_%(name)s.check()) + try { - val *arg_%(name)s = ex_%(name)s(); - if (!auto_arg_%(name)s->is_valid()) - throw isl::error( - "passed invalid val for %(name)s"); - - isl_val *tmp_ptr = isl_val_copy(arg_%(name)s->m_data); - if (!tmp_ptr) - throw isl::error("failed to copy arg %(name)s"); - auto_arg_%(name)s = std::auto_ptr(new val(tmp_ptr)); + val *arg_%(name)s = py::cast(py_%(name)s); + isl_val *tmp_ptr = isl_val_copy(arg_%(name)s->m_data); + if (!tmp_ptr) + throw isl::error("failed to copy arg %(name)s"); + unique_arg_%(name)s = std::unique_ptr(new val(tmp_ptr)); } - else if (PyLong_Check(py_%(name)s.ptr())) + catch (py::cast_error &err) { - long value = PyLong_AsLong(py_%(name)s.ptr()); - if (PyErr_Occurred()) - throw py::error_already_set(); - - isl_val *tmp_ptr = isl_val_int_from_si(ctx_for_%(name)s, value); - if (!tmp_ptr) - throw isl::error("failed to create arg %(name)s from integer"); - auto_arg_%(name)s = std::auto_ptr(new val(tmp_ptr)); + // fall through to next case } - """ % dict( - name=arg.name, - first_arg_base_type=meth.args[0].base_type, - first_arg=meth.args[0].name, - )) - if sys.version_info < (3,): - checks.append(""" - else if (PyInt_Check(py_%(name)s.ptr())) + try + { + if (!unique_arg_%(name)s.get()) { - isl_val *tmp_ptr = isl_val_int_from_si(ctx_for_%(name)s, - PyInt_AsLong(py_%(name)s.ptr())); - if (!tmp_ptr) - throw isl::error("failed to create arg " - "%(name)s from integer"); - auto_arg_%(name)s = std::auto_ptr(new val(tmp_ptr)); + isl_val *tmp_ptr = isl_val_int_from_si(ctx_for_%(name)s, + py::cast(py_%(name)s)); + if (!tmp_ptr) + throw isl::error("failed to create arg " + "%(name)s from integer"); + unique_arg_%(name)s = std::unique_ptr(new val(tmp_ptr)); } - """ % dict( - name=arg.name, - )) - - checks.append(""" - else + } + catch (py::cast_error &err) { - throw isl::error("unrecognized argument for %(name)s"); + throw isl::error("unrecognized argument for %(name)s"); } """ % dict( name=arg.name, + first_arg_base_type=meth.args[0].base_type, + first_arg=meth.args[0].name, )) if arg.semantics is None and arg.base_type != "isl_ctx": raise Undocumented(meth) if arg.semantics is SEM_TAKE: - post_call.append("auto_arg_%s.release();" % arg.name) + post_call.append("unique_arg_%s.release();" % arg.name) - passed_args.append("auto_arg_%s->m_data" % arg.name) + passed_args.append("unique_arg_%s->m_data" % arg.name) docs.append(arg_descr) # }}} @@ -723,14 +1032,14 @@ def write_wrapper(outf, meth): if (!arg_%(name)s.is_valid()) throw isl::error( "passed invalid arg to isl_%(meth)s for %(name)s"); - std::auto_ptr<%(cls)s> auto_arg_%(name)s; + std::unique_ptr<%(cls)s> auto_arg_%(name)s; { isl_%(cls)s *tmp_ptr = isl_%(cls)s_copy(arg_%(name)s.m_data); if (!tmp_ptr) throw isl::error("failed to copy arg " "%(name)s on entry to %(meth)s"); - auto_arg_%(name)s = std::auto_ptr<%(cls)s>( + auto_arg_%(name)s = std::unique_ptr<%(cls)s>( new %(cls)s(tmp_ptr)); } """ % dict( @@ -781,7 +1090,7 @@ def write_wrapper(outf, meth): py::object py_ret_%(name)s; if (ret_%(name)s) { - std::auto_ptr<%(ret_cls)s> auto_ret_%(name)s( + std::unique_ptr<%(ret_cls)s> auto_ret_%(name)s( new %(ret_cls)s(ret_%(name)s)); py_ret_%(name)s = py::object( handle_from_new_ptr(auto_ret_%(name)s.get())); @@ -867,9 +1176,6 @@ def write_wrapper(outf, meth): body.append("return result;") elif meth.return_base_type == "isl_bool" and not meth.return_ptr: - if extra_ret_vals: - raise NotImplementedError("extra ret val with isl_bool") - body.append(""" if (result == isl_bool_error) { @@ -879,7 +1185,17 @@ def write_wrapper(outf, meth): processed_return_type = "bool" ret_descr = "bool" - body.append("return result;") + if extra_ret_vals: + if len(extra_ret_vals) == 1: + processed_return_type = "py::object" + body.append("return py::object(%s);" % extra_ret_vals[0]) + ret_descr = extra_ret_descrs[0] + else: + processed_return_type = "py::object" + body.append("return py::make_tuple(%s);" % ", ".join(extra_ret_vals)) + ret_descr = "tuple: (%s)" % (", ".join(extra_ret_descrs)) + else: + body.append("return result;") elif meth.return_base_type in SAFE_TYPES and not meth.return_ptr: if extra_ret_vals: @@ -951,9 +1267,9 @@ def write_wrapper(outf, meth): processed_return_type = "py::object" body.append(""" if (result) - return py::object(std::string(result)); + return py::cast(std::string(result)); else - return py::object(); + return py::none(); """) if meth.return_semantics is SEM_GIVE: body.append("free(result);") @@ -965,7 +1281,7 @@ def write_wrapper(outf, meth): and meth.name == "get_user"): body.append(""" - return py::object(py::handle<>(py::borrowed((PyObject *) result))); + return py::reinterpret_borrow((PyObject *) result); """) ret_descr = "a user-specified python object" processed_return_type = "py::object" @@ -1012,12 +1328,17 @@ def write_wrapper(outf, meth): # {{{ exposer generator -def write_exposer(outf, meth, arg_names, doc_str, static_decls): +def write_exposer(outf, meth, arg_names, doc_str): func_name = "isl::%s_%s" % (meth.cls, meth.name) py_name = meth.name - args_str = (", py::args(%s)" - % ", ".join('"%s"' % arg_name for arg_name in arg_names)) + nonself_arg_names = arg_names + if not meth.is_static: + nonself_arg_names = nonself_arg_names[1:] + args_str = ", ".join('py::arg("%s")' % arg_name + for arg_name in nonself_arg_names) + if args_str: + args_str = ", %s" % args_str if meth.name == "size" and len(meth.args) == 1: py_name = "__len__" @@ -1034,23 +1355,22 @@ def write_exposer(outf, meth, arg_names, doc_str, static_decls): extra_stuff = args_str+doc_str_arg if meth.is_mutator: + # FIXME + raise NotImplementedError extra_stuff = extra_stuff+", py::return_self<>()" wrap_class = CLASS_MAP.get(meth.cls, meth.cls) for exp_py_name in [py_name]+extra_py_names: - outf.write("wrap_%s.def(\"%s\", %s%s);\n" % ( - wrap_class, exp_py_name, func_name, extra_stuff)) - if meth.is_static: - static_decls.append("wrap_%s.staticmethod(\"%s\");\n" % ( - wrap_class, exp_py_name)) + outf.write("wrap_%s.def%s(\"%s\", %s%s);\n" % ( + wrap_class, "_static" if meth.is_static else "", + exp_py_name, func_name, extra_stuff)) # }}} def write_wrappers(expf, wrapf, methods): undoc = [] - static_decls = [] for meth in methods: #print "TRY_WRAP:", meth @@ -1073,12 +1393,12 @@ def write_wrappers(expf, wrapf, methods): try: arg_names, doc_str = write_wrapper(wrapf, meth) - write_exposer(expf, meth, arg_names, doc_str, static_decls) + write_exposer(expf, meth, arg_names, doc_str) except Undocumented: undoc.append(str(meth)) except Retry: arg_names, doc_str = write_wrapper(wrapf, meth) - write_exposer(expf, meth, arg_names, doc_str, static_decls) + write_exposer(expf, meth, arg_names, doc_str) except SignatureNotSupported: _, e, _ = sys.exc_info() print("SKIP (sig not supported: %s): %s" % (e, meth)) @@ -1086,9 +1406,6 @@ def write_wrappers(expf, wrapf, methods): #print "WRAPPED:", meth pass - for static_decl in static_decls: - expf.write(static_decl) - print("SKIP (%d undocumented methods): %s" % (len(undoc), ", ".join(undoc))) @@ -1103,15 +1420,11 @@ ADD_VERSIONS = { def gen_wrapper(include_dirs, include_barvinok=False, isl_version=None): fdata = FunctionData(["."] + include_dirs) - if isl_version is None: - fdata.read_header("isl_declaration_macros_expanded.h") - else: - fdata.read_header("isl_declaration_macros_expanded_v%d.h" - % isl_version) fdata.read_header("isl/id.h") fdata.read_header("isl/space.h") fdata.read_header("isl/set.h") fdata.read_header("isl/map.h") + fdata.read_header("isl/map_type.h") fdata.read_header("isl/local_space.h") fdata.read_header("isl/aff.h") fdata.read_header("isl/polynomial.h") @@ -1124,12 +1437,14 @@ def gen_wrapper(include_dirs, include_barvinok=False, isl_version=None): fdata.read_header("isl/val.h") fdata.read_header("isl/vec.h") fdata.read_header("isl/mat.h") - fdata.read_header("isl/band.h") fdata.read_header("isl/schedule.h") + fdata.read_header("isl/schedule_node.h") fdata.read_header("isl/flow.h") fdata.read_header("isl/options.h") fdata.read_header("isl/ast.h") fdata.read_header("isl/ast_build.h") + fdata.read_header("isl/ast_type.h") + fdata.read_header("isl/ilp.h") if include_barvinok: fdata.read_header("barvinok/isl.h") diff --git a/isl b/isl index 2c1b685..86d64c0 160000 --- a/isl +++ b/isl @@ -1 +1 @@ -Subproject commit 2c1b68581916666fb2bcc94c7bf8779807ed42d9 +Subproject commit 86d64c07cfbb41cee88e2f778b77d043bad5c2ed diff --git a/isl_declaration_macros.h b/isl_declaration_macros.h deleted file mode 100644 index 1e638b1..0000000 --- a/isl_declaration_macros.h +++ /dev/null @@ -1,32 +0,0 @@ -#undef __isl_keep -#undef __isl_take -#undef __isl_give -#define __isl_keep __islpy_keep -#define __isl_take __islpy_take -#define __isl_give __islpy_give - -// matches order in src/wrapper/wrap_isl.hpp -ISL_DECLARE_LIST(id) - -ISL_DECLARE_LIST(val) -ISL_DECLARE_LIST(aff) -ISL_DECLARE_LIST(pw_aff) -ISL_DECLARE_LIST(constraint) - -ISL_DECLARE_LIST(basic_set) -#if ISLPY_ISL_VERSION >= 15 -ISL_DECLARE_LIST(basic_map) -#endif -ISL_DECLARE_LIST(set) -#if ISLPY_ISL_VERSION >= 15 -ISL_DECLARE_LIST(map) -ISL_DECLARE_LIST(union_set) -#endif - -ISL_DECLARE_LIST(ast_expr) -ISL_DECLARE_LIST(ast_node) -ISL_DECLARE_LIST(band) - -ISL_DECLARE_MULTI(aff) -ISL_DECLARE_MULTI(pw_aff) -ISL_DECLARE_MULTI(val) diff --git a/isl_declaration_macros_expanded_v14.h b/isl_declaration_macros_expanded_v14.h deleted file mode 100644 index 1775cf7..0000000 --- a/isl_declaration_macros_expanded_v14.h +++ /dev/null @@ -1,2429 +0,0 @@ -# 1 "isl_declaration_macros.h" -# 1 "" -# 1 "" -# 1 "/home/andreas/pool/include/isl/list.h" 1 -# 13 "/home/andreas/pool/include/isl/list.h" -# 1 "/home/andreas/pool/include/isl/ctx.h" 1 -# 13 "/home/andreas/pool/include/isl/ctx.h" -# 1 "/usr/include/stdio.h" 1 3 4 -# 27 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/features.h" 1 3 4 -# 352 "/usr/include/features.h" 3 4 -# 1 "/usr/include/stdc-predef.h" 1 3 4 -# 353 "/usr/include/features.h" 2 3 4 -# 374 "/usr/include/features.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 1 3 4 -# 385 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 386 "/usr/include/x86_64-linux-gnu/sys/cdefs.h" 2 3 4 -# 375 "/usr/include/features.h" 2 3 4 -# 398 "/usr/include/features.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 1 3 4 -# 10 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/gnu/stubs-64.h" 1 3 4 -# 11 "/usr/include/x86_64-linux-gnu/gnu/stubs.h" 2 3 4 -# 399 "/usr/include/features.h" 2 3 4 -# 28 "/usr/include/stdio.h" 2 3 4 - - - - - -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 212 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 - -# 34 "/usr/include/stdio.h" 2 3 4 - -# 1 "/usr/include/x86_64-linux-gnu/bits/types.h" 1 3 4 -# 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - -# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 -# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 36 "/usr/include/stdio.h" 2 3 4 -# 44 "/usr/include/stdio.h" 3 4 - - - - - - - - - - -# 64 "/usr/include/stdio.h" 3 4 - -# 74 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/libio.h" 1 3 4 -# 31 "/usr/include/libio.h" 3 4 -# 1 "/usr/include/_G_config.h" 1 3 4 -# 15 "/usr/include/_G_config.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 16 "/usr/include/_G_config.h" 2 3 4 - - - - -# 1 "/usr/include/wchar.h" 1 3 4 -# 82 "/usr/include/wchar.h" 3 4 - - - - - - - - - - - - - -# 21 "/usr/include/_G_config.h" 2 3 4 - - - - - - - - - - -# 32 "/usr/include/libio.h" 2 3 4 -# 49 "/usr/include/libio.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 1 3 4 -# 40 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 3 4 - -# 50 "/usr/include/libio.h" 2 3 4 -# 144 "/usr/include/libio.h" 3 4 - -# 154 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - -# 177 "/usr/include/libio.h" 3 4 - - - - - - - - - - -# 245 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 293 "/usr/include/libio.h" 3 4 - -# 302 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 338 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 390 "/usr/include/libio.h" 3 4 - - - -# 434 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - -# 464 "/usr/include/libio.h" 3 4 - - - - - - - - - - - -# 75 "/usr/include/stdio.h" 2 3 4 - - - - - -# 90 "/usr/include/stdio.h" 3 4 - -# 102 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 164 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 -# 165 "/usr/include/stdio.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 209 "/usr/include/stdio.h" 3 4 - - - - - - - -# 227 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - -# 252 "/usr/include/stdio.h" 3 4 - -# 266 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - -# 295 "/usr/include/stdio.h" 3 4 - -# 306 "/usr/include/stdio.h" 3 4 - -# 319 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 412 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - -# 443 "/usr/include/stdio.h" 3 4 - - - - - - - - -# 463 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - -# 494 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 522 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - -# 550 "/usr/include/stdio.h" 3 4 - - -# 561 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 594 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 638 "/usr/include/stdio.h" 3 4 - - - -# 665 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 737 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - -# 773 "/usr/include/stdio.h" 3 4 - - - - - - -# 792 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - -# 815 "/usr/include/stdio.h" 3 4 - -# 824 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 -# 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 - - -# 854 "/usr/include/stdio.h" 2 3 4 - - - - - - - - - - -# 873 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 913 "/usr/include/stdio.h" 3 4 - - - - - - - - -# 943 "/usr/include/stdio.h" 3 4 - -# 14 "/home/andreas/pool/include/isl/ctx.h" 2 -# 1 "/usr/include/stdlib.h" 1 3 4 -# 32 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 324 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 - -# 33 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 -# 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 - - - - - - -# 42 "/usr/include/stdlib.h" 2 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 -# 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 -# 1 "/usr/include/endian.h" 1 3 4 -# 36 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 -# 37 "/usr/include/endian.h" 2 3 4 -# 60 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 -# 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4 -# 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 -# 44 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 - - - - - -# 108 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 - - - - - -# 61 "/usr/include/endian.h" 2 3 4 -# 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 43 "/usr/include/stdlib.h" 2 3 4 -# 67 "/usr/include/stdlib.h" 3 4 - - - - - -# 95 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 139 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 305 "/usr/include/stdlib.h" 3 4 - - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 -# 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - -# 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - -# 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - -# 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/time.h" 1 3 4 -# 57 "/usr/include/time.h" 3 4 - - - - - - -# 73 "/usr/include/time.h" 3 4 - - - - - - -# 91 "/usr/include/time.h" 3 4 - -# 103 "/usr/include/time.h" 3 4 - -# 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 -# 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - - - - -# 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - -# 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 -# 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 -# 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - -# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4 - - - - - - - - - -# 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - - - - - - - - -# 1 "/usr/include/time.h" 1 3 4 -# 120 "/usr/include/time.h" 3 4 - - - - - -# 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - -# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 -# 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 - - - - - -# 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - - - - - - - - -# 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - - - - - - - - - - - - - - - - -# 96 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - -# 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - -# 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - - -# 131 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - -# 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - -# 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 -# 24 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 - - - - - - - - - - - - -# 58 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 - -# 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - -# 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 -# 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 -# 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - -# 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - -# 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - -# 315 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/alloca.h" 1 3 4 -# 24 "/usr/include/alloca.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 25 "/usr/include/alloca.h" 2 3 4 - - - - - - - - - - - - - - -# 493 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - - - - - -# 513 "/usr/include/stdlib.h" 3 4 - - - - - - - -# 530 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 578 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - -# 606 "/usr/include/stdlib.h" 3 4 - -# 620 "/usr/include/stdlib.h" 3 4 - -# 642 "/usr/include/stdlib.h" 3 4 - -# 663 "/usr/include/stdlib.h" 3 4 - -# 712 "/usr/include/stdlib.h" 3 4 - - - - - - - -# 734 "/usr/include/stdlib.h" 3 4 - - - - - - - - - -# 752 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - -# 775 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - -# 812 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 899 "/usr/include/stdlib.h" 3 4 - - - - -# 951 "/usr/include/stdlib.h" 3 4 - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 -# 956 "/usr/include/stdlib.h" 2 3 4 -# 968 "/usr/include/stdlib.h" 3 4 - -# 15 "/home/andreas/pool/include/isl/ctx.h" 2 - -# 1 "/home/andreas/pool/include/isl/arg.h" 1 -# 13 "/home/andreas/pool/include/isl/arg.h" -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 147 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 - -# 14 "/home/andreas/pool/include/isl/arg.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 280 "/home/andreas/pool/include/isl/arg.h" - - - - -# 17 "/home/andreas/pool/include/isl/ctx.h" 2 -# 1 "/home/andreas/pool/include/isl/hash.h" 1 -# 14 "/home/andreas/pool/include/isl/hash.h" -# 1 "/home/andreas/pool/include/isl/stdint.h" 1 - - - - - - -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4 -# 9 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 3 4 -# 1 "/usr/include/stdint.h" 1 3 4 -# 26 "/usr/include/stdint.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 -# 27 "/usr/include/stdint.h" 2 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 28 "/usr/include/stdint.h" 2 3 4 -# 48 "/usr/include/stdint.h" 3 4 - - - - - - - - -# 65 "/usr/include/stdint.h" 3 4 - - - - - - - - - - - - - - - - -# 90 "/usr/include/stdint.h" 3 4 - - - - - -# 103 "/usr/include/stdint.h" 3 4 - - - - - -# 119 "/usr/include/stdint.h" 3 4 - - - - -# 134 "/usr/include/stdint.h" 3 4 - - -# 10 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4 -# 8 "/home/andreas/pool/include/isl/stdint.h" 2 -# 15 "/home/andreas/pool/include/isl/hash.h" 2 -# 38 "/home/andreas/pool/include/isl/hash.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 18 "/home/andreas/pool/include/isl/ctx.h" 2 -# 69 "/home/andreas/pool/include/isl/ctx.h" - - - - - - - - - - - - - - - -# 103 "/home/andreas/pool/include/isl/ctx.h" - - - -# 127 "/home/andreas/pool/include/isl/ctx.h" - - -# 143 "/home/andreas/pool/include/isl/ctx.h" - - - - - - - - - - - - - - - - - - -# 238 "/home/andreas/pool/include/isl/ctx.h" - - - -# 14 "/home/andreas/pool/include/isl/list.h" 2 -# 1 "/home/andreas/pool/include/isl/printer.h" 1 -# 11 "/home/andreas/pool/include/isl/printer.h" - - - - - - - - - - - - - - - - -# 35 "/home/andreas/pool/include/isl/printer.h" - - - - - - - - - - - - - - - - - - - - - - -# 15 "/home/andreas/pool/include/isl/list.h" 2 -# 1 "" 2 -# 1 "/home/andreas/pool/include/isl/multi.h" 1 - - - -# 1 "/home/andreas/pool/include/isl/space.h" 1 -# 14 "/home/andreas/pool/include/isl/space.h" -# 1 "/home/andreas/pool/include/isl/id.h" 1 - - - - -# 1 "/home/andreas/pool/include/isl/list.h" 1 -# 6 "/home/andreas/pool/include/isl/id.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 15 "/home/andreas/pool/include/isl/space.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 5 "/home/andreas/pool/include/isl/multi.h" 2 - -# 1 "/home/andreas/pool/include/isl/set_type.h" 1 - - - -# 1 "/home/andreas/pool/include/isl/map_type.h" 1 -# 11 "/home/andreas/pool/include/isl/map_type.h" - - - - - - - - - - - - - - - - - - - -# 5 "/home/andreas/pool/include/isl/set_type.h" 2 -# 7 "/home/andreas/pool/include/isl/multi.h" 2 -# 1 "" 2 -# 1 "isl_declaration_macros.h" -# 9 "isl_declaration_macros.h" -struct isl_id; struct isl_id_list; typedef struct isl_id_list isl_id_list; isl_ctx *isl_id_list_get_ctx(__islpy_keep isl_id_list *list); __islpy_give isl_id_list *isl_id_list_from_id( __islpy_take struct isl_id *el); __islpy_give isl_id_list *isl_id_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_id_list *isl_id_list_copy( __islpy_keep isl_id_list *list); isl_id_list *isl_id_list_free( __islpy_take isl_id_list *list); __islpy_give isl_id_list *isl_id_list_add( __islpy_take isl_id_list *list, __islpy_take struct isl_id *el); __islpy_give isl_id_list *isl_id_list_insert( __islpy_take isl_id_list *list, unsigned pos, __islpy_take struct isl_id *el); __islpy_give isl_id_list *isl_id_list_drop( __islpy_take isl_id_list *list, unsigned first, unsigned n); __islpy_give isl_id_list *isl_id_list_concat( __islpy_take isl_id_list *list1, __islpy_take isl_id_list *list2); int isl_id_list_n_id(__islpy_keep isl_id_list *list); __islpy_give struct isl_id *isl_id_list_get_id( __islpy_keep isl_id_list *list, int index); __islpy_give struct isl_id_list *isl_id_list_set_id( __islpy_take struct isl_id_list *list, int index, __islpy_take struct isl_id *el); int isl_id_list_foreach(__islpy_keep isl_id_list *list, int (*fn)(__islpy_take struct isl_id *el, void *user), void *user); __islpy_give isl_id_list *isl_id_list_sort( __islpy_take isl_id_list *list, int (*cmp)(__islpy_keep struct isl_id *a, __islpy_keep struct isl_id *b, void *user), void *user); int isl_id_list_foreach_scc(__islpy_keep isl_id_list *list, int (*follows)(__islpy_keep struct isl_id *a, __islpy_keep struct isl_id *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_id_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_id_list( __islpy_take isl_printer *p, __islpy_keep isl_id_list *list); void isl_id_list_dump(__islpy_keep isl_id_list *list); - -struct isl_val; struct isl_val_list; typedef struct isl_val_list isl_val_list; isl_ctx *isl_val_list_get_ctx(__islpy_keep isl_val_list *list); __islpy_give isl_val_list *isl_val_list_from_val( __islpy_take struct isl_val *el); __islpy_give isl_val_list *isl_val_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_val_list *isl_val_list_copy( __islpy_keep isl_val_list *list); isl_val_list *isl_val_list_free( __islpy_take isl_val_list *list); __islpy_give isl_val_list *isl_val_list_add( __islpy_take isl_val_list *list, __islpy_take struct isl_val *el); __islpy_give isl_val_list *isl_val_list_insert( __islpy_take isl_val_list *list, unsigned pos, __islpy_take struct isl_val *el); __islpy_give isl_val_list *isl_val_list_drop( __islpy_take isl_val_list *list, unsigned first, unsigned n); __islpy_give isl_val_list *isl_val_list_concat( __islpy_take isl_val_list *list1, __islpy_take isl_val_list *list2); int isl_val_list_n_val(__islpy_keep isl_val_list *list); __islpy_give struct isl_val *isl_val_list_get_val( __islpy_keep isl_val_list *list, int index); __islpy_give struct isl_val_list *isl_val_list_set_val( __islpy_take struct isl_val_list *list, int index, __islpy_take struct isl_val *el); int isl_val_list_foreach(__islpy_keep isl_val_list *list, int (*fn)(__islpy_take struct isl_val *el, void *user), void *user); __islpy_give isl_val_list *isl_val_list_sort( __islpy_take isl_val_list *list, int (*cmp)(__islpy_keep struct isl_val *a, __islpy_keep struct isl_val *b, void *user), void *user); int isl_val_list_foreach_scc(__islpy_keep isl_val_list *list, int (*follows)(__islpy_keep struct isl_val *a, __islpy_keep struct isl_val *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_val_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_val_list( __islpy_take isl_printer *p, __islpy_keep isl_val_list *list); void isl_val_list_dump(__islpy_keep isl_val_list *list); -struct isl_aff; struct isl_aff_list; typedef struct isl_aff_list isl_aff_list; isl_ctx *isl_aff_list_get_ctx(__islpy_keep isl_aff_list *list); __islpy_give isl_aff_list *isl_aff_list_from_aff( __islpy_take struct isl_aff *el); __islpy_give isl_aff_list *isl_aff_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_aff_list *isl_aff_list_copy( __islpy_keep isl_aff_list *list); isl_aff_list *isl_aff_list_free( __islpy_take isl_aff_list *list); __islpy_give isl_aff_list *isl_aff_list_add( __islpy_take isl_aff_list *list, __islpy_take struct isl_aff *el); __islpy_give isl_aff_list *isl_aff_list_insert( __islpy_take isl_aff_list *list, unsigned pos, __islpy_take struct isl_aff *el); __islpy_give isl_aff_list *isl_aff_list_drop( __islpy_take isl_aff_list *list, unsigned first, unsigned n); __islpy_give isl_aff_list *isl_aff_list_concat( __islpy_take isl_aff_list *list1, __islpy_take isl_aff_list *list2); int isl_aff_list_n_aff(__islpy_keep isl_aff_list *list); __islpy_give struct isl_aff *isl_aff_list_get_aff( __islpy_keep isl_aff_list *list, int index); __islpy_give struct isl_aff_list *isl_aff_list_set_aff( __islpy_take struct isl_aff_list *list, int index, __islpy_take struct isl_aff *el); int isl_aff_list_foreach(__islpy_keep isl_aff_list *list, int (*fn)(__islpy_take struct isl_aff *el, void *user), void *user); __islpy_give isl_aff_list *isl_aff_list_sort( __islpy_take isl_aff_list *list, int (*cmp)(__islpy_keep struct isl_aff *a, __islpy_keep struct isl_aff *b, void *user), void *user); int isl_aff_list_foreach_scc(__islpy_keep isl_aff_list *list, int (*follows)(__islpy_keep struct isl_aff *a, __islpy_keep struct isl_aff *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_aff_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_aff_list( __islpy_take isl_printer *p, __islpy_keep isl_aff_list *list); void isl_aff_list_dump(__islpy_keep isl_aff_list *list); -struct isl_pw_aff; struct isl_pw_aff_list; typedef struct isl_pw_aff_list isl_pw_aff_list; isl_ctx *isl_pw_aff_list_get_ctx(__islpy_keep isl_pw_aff_list *list); __islpy_give isl_pw_aff_list *isl_pw_aff_list_from_pw_aff( __islpy_take struct isl_pw_aff *el); __islpy_give isl_pw_aff_list *isl_pw_aff_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_pw_aff_list *isl_pw_aff_list_copy( __islpy_keep isl_pw_aff_list *list); isl_pw_aff_list *isl_pw_aff_list_free( __islpy_take isl_pw_aff_list *list); __islpy_give isl_pw_aff_list *isl_pw_aff_list_add( __islpy_take isl_pw_aff_list *list, __islpy_take struct isl_pw_aff *el); __islpy_give isl_pw_aff_list *isl_pw_aff_list_insert( __islpy_take isl_pw_aff_list *list, unsigned pos, __islpy_take struct isl_pw_aff *el); __islpy_give isl_pw_aff_list *isl_pw_aff_list_drop( __islpy_take isl_pw_aff_list *list, unsigned first, unsigned n); __islpy_give isl_pw_aff_list *isl_pw_aff_list_concat( __islpy_take isl_pw_aff_list *list1, __islpy_take isl_pw_aff_list *list2); int isl_pw_aff_list_n_pw_aff(__islpy_keep isl_pw_aff_list *list); __islpy_give struct isl_pw_aff *isl_pw_aff_list_get_pw_aff( __islpy_keep isl_pw_aff_list *list, int index); __islpy_give struct isl_pw_aff_list *isl_pw_aff_list_set_pw_aff( __islpy_take struct isl_pw_aff_list *list, int index, __islpy_take struct isl_pw_aff *el); int isl_pw_aff_list_foreach(__islpy_keep isl_pw_aff_list *list, int (*fn)(__islpy_take struct isl_pw_aff *el, void *user), void *user); __islpy_give isl_pw_aff_list *isl_pw_aff_list_sort( __islpy_take isl_pw_aff_list *list, int (*cmp)(__islpy_keep struct isl_pw_aff *a, __islpy_keep struct isl_pw_aff *b, void *user), void *user); int isl_pw_aff_list_foreach_scc(__islpy_keep isl_pw_aff_list *list, int (*follows)(__islpy_keep struct isl_pw_aff *a, __islpy_keep struct isl_pw_aff *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_pw_aff_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_pw_aff_list( __islpy_take isl_printer *p, __islpy_keep isl_pw_aff_list *list); void isl_pw_aff_list_dump(__islpy_keep isl_pw_aff_list *list); -struct isl_constraint; struct isl_constraint_list; typedef struct isl_constraint_list isl_constraint_list; isl_ctx *isl_constraint_list_get_ctx(__islpy_keep isl_constraint_list *list); __islpy_give isl_constraint_list *isl_constraint_list_from_constraint( __islpy_take struct isl_constraint *el); __islpy_give isl_constraint_list *isl_constraint_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_constraint_list *isl_constraint_list_copy( __islpy_keep isl_constraint_list *list); isl_constraint_list *isl_constraint_list_free( __islpy_take isl_constraint_list *list); __islpy_give isl_constraint_list *isl_constraint_list_add( __islpy_take isl_constraint_list *list, __islpy_take struct isl_constraint *el); __islpy_give isl_constraint_list *isl_constraint_list_insert( __islpy_take isl_constraint_list *list, unsigned pos, __islpy_take struct isl_constraint *el); __islpy_give isl_constraint_list *isl_constraint_list_drop( __islpy_take isl_constraint_list *list, unsigned first, unsigned n); __islpy_give isl_constraint_list *isl_constraint_list_concat( __islpy_take isl_constraint_list *list1, __islpy_take isl_constraint_list *list2); int isl_constraint_list_n_constraint(__islpy_keep isl_constraint_list *list); __islpy_give struct isl_constraint *isl_constraint_list_get_constraint( __islpy_keep isl_constraint_list *list, int index); __islpy_give struct isl_constraint_list *isl_constraint_list_set_constraint( __islpy_take struct isl_constraint_list *list, int index, __islpy_take struct isl_constraint *el); int isl_constraint_list_foreach(__islpy_keep isl_constraint_list *list, int (*fn)(__islpy_take struct isl_constraint *el, void *user), void *user); __islpy_give isl_constraint_list *isl_constraint_list_sort( __islpy_take isl_constraint_list *list, int (*cmp)(__islpy_keep struct isl_constraint *a, __islpy_keep struct isl_constraint *b, void *user), void *user); int isl_constraint_list_foreach_scc(__islpy_keep isl_constraint_list *list, int (*follows)(__islpy_keep struct isl_constraint *a, __islpy_keep struct isl_constraint *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_constraint_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_constraint_list( __islpy_take isl_printer *p, __islpy_keep isl_constraint_list *list); void isl_constraint_list_dump(__islpy_keep isl_constraint_list *list); - -struct isl_basic_set; struct isl_basic_set_list; typedef struct isl_basic_set_list isl_basic_set_list; isl_ctx *isl_basic_set_list_get_ctx(__islpy_keep isl_basic_set_list *list); __islpy_give isl_basic_set_list *isl_basic_set_list_from_basic_set( __islpy_take struct isl_basic_set *el); __islpy_give isl_basic_set_list *isl_basic_set_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_basic_set_list *isl_basic_set_list_copy( __islpy_keep isl_basic_set_list *list); isl_basic_set_list *isl_basic_set_list_free( __islpy_take isl_basic_set_list *list); __islpy_give isl_basic_set_list *isl_basic_set_list_add( __islpy_take isl_basic_set_list *list, __islpy_take struct isl_basic_set *el); __islpy_give isl_basic_set_list *isl_basic_set_list_insert( __islpy_take isl_basic_set_list *list, unsigned pos, __islpy_take struct isl_basic_set *el); __islpy_give isl_basic_set_list *isl_basic_set_list_drop( __islpy_take isl_basic_set_list *list, unsigned first, unsigned n); __islpy_give isl_basic_set_list *isl_basic_set_list_concat( __islpy_take isl_basic_set_list *list1, __islpy_take isl_basic_set_list *list2); int isl_basic_set_list_n_basic_set(__islpy_keep isl_basic_set_list *list); __islpy_give struct isl_basic_set *isl_basic_set_list_get_basic_set( __islpy_keep isl_basic_set_list *list, int index); __islpy_give struct isl_basic_set_list *isl_basic_set_list_set_basic_set( __islpy_take struct isl_basic_set_list *list, int index, __islpy_take struct isl_basic_set *el); int isl_basic_set_list_foreach(__islpy_keep isl_basic_set_list *list, int (*fn)(__islpy_take struct isl_basic_set *el, void *user), void *user); __islpy_give isl_basic_set_list *isl_basic_set_list_sort( __islpy_take isl_basic_set_list *list, int (*cmp)(__islpy_keep struct isl_basic_set *a, __islpy_keep struct isl_basic_set *b, void *user), void *user); int isl_basic_set_list_foreach_scc(__islpy_keep isl_basic_set_list *list, int (*follows)(__islpy_keep struct isl_basic_set *a, __islpy_keep struct isl_basic_set *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_basic_set_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_basic_set_list( __islpy_take isl_printer *p, __islpy_keep isl_basic_set_list *list); void isl_basic_set_list_dump(__islpy_keep isl_basic_set_list *list); - - - -struct isl_set; struct isl_set_list; typedef struct isl_set_list isl_set_list; isl_ctx *isl_set_list_get_ctx(__islpy_keep isl_set_list *list); __islpy_give isl_set_list *isl_set_list_from_set( __islpy_take struct isl_set *el); __islpy_give isl_set_list *isl_set_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_set_list *isl_set_list_copy( __islpy_keep isl_set_list *list); isl_set_list *isl_set_list_free( __islpy_take isl_set_list *list); __islpy_give isl_set_list *isl_set_list_add( __islpy_take isl_set_list *list, __islpy_take struct isl_set *el); __islpy_give isl_set_list *isl_set_list_insert( __islpy_take isl_set_list *list, unsigned pos, __islpy_take struct isl_set *el); __islpy_give isl_set_list *isl_set_list_drop( __islpy_take isl_set_list *list, unsigned first, unsigned n); __islpy_give isl_set_list *isl_set_list_concat( __islpy_take isl_set_list *list1, __islpy_take isl_set_list *list2); int isl_set_list_n_set(__islpy_keep isl_set_list *list); __islpy_give struct isl_set *isl_set_list_get_set( __islpy_keep isl_set_list *list, int index); __islpy_give struct isl_set_list *isl_set_list_set_set( __islpy_take struct isl_set_list *list, int index, __islpy_take struct isl_set *el); int isl_set_list_foreach(__islpy_keep isl_set_list *list, int (*fn)(__islpy_take struct isl_set *el, void *user), void *user); __islpy_give isl_set_list *isl_set_list_sort( __islpy_take isl_set_list *list, int (*cmp)(__islpy_keep struct isl_set *a, __islpy_keep struct isl_set *b, void *user), void *user); int isl_set_list_foreach_scc(__islpy_keep isl_set_list *list, int (*follows)(__islpy_keep struct isl_set *a, __islpy_keep struct isl_set *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_set_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_set_list( __islpy_take isl_printer *p, __islpy_keep isl_set_list *list); void isl_set_list_dump(__islpy_keep isl_set_list *list); - - - - - -struct isl_ast_expr; struct isl_ast_expr_list; typedef struct isl_ast_expr_list isl_ast_expr_list; isl_ctx *isl_ast_expr_list_get_ctx(__islpy_keep isl_ast_expr_list *list); __islpy_give isl_ast_expr_list *isl_ast_expr_list_from_ast_expr( __islpy_take struct isl_ast_expr *el); __islpy_give isl_ast_expr_list *isl_ast_expr_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_ast_expr_list *isl_ast_expr_list_copy( __islpy_keep isl_ast_expr_list *list); isl_ast_expr_list *isl_ast_expr_list_free( __islpy_take isl_ast_expr_list *list); __islpy_give isl_ast_expr_list *isl_ast_expr_list_add( __islpy_take isl_ast_expr_list *list, __islpy_take struct isl_ast_expr *el); __islpy_give isl_ast_expr_list *isl_ast_expr_list_insert( __islpy_take isl_ast_expr_list *list, unsigned pos, __islpy_take struct isl_ast_expr *el); __islpy_give isl_ast_expr_list *isl_ast_expr_list_drop( __islpy_take isl_ast_expr_list *list, unsigned first, unsigned n); __islpy_give isl_ast_expr_list *isl_ast_expr_list_concat( __islpy_take isl_ast_expr_list *list1, __islpy_take isl_ast_expr_list *list2); int isl_ast_expr_list_n_ast_expr(__islpy_keep isl_ast_expr_list *list); __islpy_give struct isl_ast_expr *isl_ast_expr_list_get_ast_expr( __islpy_keep isl_ast_expr_list *list, int index); __islpy_give struct isl_ast_expr_list *isl_ast_expr_list_set_ast_expr( __islpy_take struct isl_ast_expr_list *list, int index, __islpy_take struct isl_ast_expr *el); int isl_ast_expr_list_foreach(__islpy_keep isl_ast_expr_list *list, int (*fn)(__islpy_take struct isl_ast_expr *el, void *user), void *user); __islpy_give isl_ast_expr_list *isl_ast_expr_list_sort( __islpy_take isl_ast_expr_list *list, int (*cmp)(__islpy_keep struct isl_ast_expr *a, __islpy_keep struct isl_ast_expr *b, void *user), void *user); int isl_ast_expr_list_foreach_scc(__islpy_keep isl_ast_expr_list *list, int (*follows)(__islpy_keep struct isl_ast_expr *a, __islpy_keep struct isl_ast_expr *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_ast_expr_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_ast_expr_list( __islpy_take isl_printer *p, __islpy_keep isl_ast_expr_list *list); void isl_ast_expr_list_dump(__islpy_keep isl_ast_expr_list *list); -struct isl_ast_node; struct isl_ast_node_list; typedef struct isl_ast_node_list isl_ast_node_list; isl_ctx *isl_ast_node_list_get_ctx(__islpy_keep isl_ast_node_list *list); __islpy_give isl_ast_node_list *isl_ast_node_list_from_ast_node( __islpy_take struct isl_ast_node *el); __islpy_give isl_ast_node_list *isl_ast_node_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_ast_node_list *isl_ast_node_list_copy( __islpy_keep isl_ast_node_list *list); isl_ast_node_list *isl_ast_node_list_free( __islpy_take isl_ast_node_list *list); __islpy_give isl_ast_node_list *isl_ast_node_list_add( __islpy_take isl_ast_node_list *list, __islpy_take struct isl_ast_node *el); __islpy_give isl_ast_node_list *isl_ast_node_list_insert( __islpy_take isl_ast_node_list *list, unsigned pos, __islpy_take struct isl_ast_node *el); __islpy_give isl_ast_node_list *isl_ast_node_list_drop( __islpy_take isl_ast_node_list *list, unsigned first, unsigned n); __islpy_give isl_ast_node_list *isl_ast_node_list_concat( __islpy_take isl_ast_node_list *list1, __islpy_take isl_ast_node_list *list2); int isl_ast_node_list_n_ast_node(__islpy_keep isl_ast_node_list *list); __islpy_give struct isl_ast_node *isl_ast_node_list_get_ast_node( __islpy_keep isl_ast_node_list *list, int index); __islpy_give struct isl_ast_node_list *isl_ast_node_list_set_ast_node( __islpy_take struct isl_ast_node_list *list, int index, __islpy_take struct isl_ast_node *el); int isl_ast_node_list_foreach(__islpy_keep isl_ast_node_list *list, int (*fn)(__islpy_take struct isl_ast_node *el, void *user), void *user); __islpy_give isl_ast_node_list *isl_ast_node_list_sort( __islpy_take isl_ast_node_list *list, int (*cmp)(__islpy_keep struct isl_ast_node *a, __islpy_keep struct isl_ast_node *b, void *user), void *user); int isl_ast_node_list_foreach_scc(__islpy_keep isl_ast_node_list *list, int (*follows)(__islpy_keep struct isl_ast_node *a, __islpy_keep struct isl_ast_node *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_ast_node_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_ast_node_list( __islpy_take isl_printer *p, __islpy_keep isl_ast_node_list *list); void isl_ast_node_list_dump(__islpy_keep isl_ast_node_list *list); -struct isl_band; struct isl_band_list; typedef struct isl_band_list isl_band_list; isl_ctx *isl_band_list_get_ctx(__islpy_keep isl_band_list *list); __islpy_give isl_band_list *isl_band_list_from_band( __islpy_take struct isl_band *el); __islpy_give isl_band_list *isl_band_list_alloc(isl_ctx *ctx, int n); __islpy_give isl_band_list *isl_band_list_copy( __islpy_keep isl_band_list *list); isl_band_list *isl_band_list_free( __islpy_take isl_band_list *list); __islpy_give isl_band_list *isl_band_list_add( __islpy_take isl_band_list *list, __islpy_take struct isl_band *el); __islpy_give isl_band_list *isl_band_list_insert( __islpy_take isl_band_list *list, unsigned pos, __islpy_take struct isl_band *el); __islpy_give isl_band_list *isl_band_list_drop( __islpy_take isl_band_list *list, unsigned first, unsigned n); __islpy_give isl_band_list *isl_band_list_concat( __islpy_take isl_band_list *list1, __islpy_take isl_band_list *list2); int isl_band_list_n_band(__islpy_keep isl_band_list *list); __islpy_give struct isl_band *isl_band_list_get_band( __islpy_keep isl_band_list *list, int index); __islpy_give struct isl_band_list *isl_band_list_set_band( __islpy_take struct isl_band_list *list, int index, __islpy_take struct isl_band *el); int isl_band_list_foreach(__islpy_keep isl_band_list *list, int (*fn)(__islpy_take struct isl_band *el, void *user), void *user); __islpy_give isl_band_list *isl_band_list_sort( __islpy_take isl_band_list *list, int (*cmp)(__islpy_keep struct isl_band *a, __islpy_keep struct isl_band *b, void *user), void *user); int isl_band_list_foreach_scc(__islpy_keep isl_band_list *list, int (*follows)(__islpy_keep struct isl_band *a, __islpy_keep struct isl_band *b, void *user), void *follows_user, int (*fn)(__islpy_take isl_band_list *scc, void *user), void *fn_user); __islpy_give isl_printer *isl_printer_print_band_list( __islpy_take isl_printer *p, __islpy_keep isl_band_list *list); void isl_band_list_dump(__islpy_keep isl_band_list *list); - -unsigned isl_multi_aff_dim(__islpy_keep isl_multi_aff *multi, enum isl_dim_type type); isl_ctx *isl_multi_aff_get_ctx( __islpy_keep isl_multi_aff *multi); __islpy_give isl_space *isl_multi_aff_get_space( __islpy_keep isl_multi_aff *multi); __islpy_give isl_space *isl_multi_aff_get_domain_space( __islpy_keep isl_multi_aff *multi); __islpy_give isl_multi_aff *isl_multi_aff_from_aff_list( __islpy_take isl_space *space, __islpy_take isl_aff_list *list); __islpy_give isl_multi_aff *isl_multi_aff_zero( __islpy_take isl_space *space); __islpy_give isl_multi_aff *isl_multi_aff_copy( __islpy_keep isl_multi_aff *multi); isl_multi_aff *isl_multi_aff_free( __islpy_take isl_multi_aff *multi); int isl_multi_aff_plain_is_equal( __islpy_keep isl_multi_aff *multi1, __islpy_keep isl_multi_aff *multi2); int isl_multi_aff_find_dim_by_id( __islpy_keep isl_multi_aff *multi, enum isl_dim_type type, __islpy_keep isl_id *id); __islpy_give isl_id *isl_multi_aff_get_dim_id( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned pos); __islpy_give isl_multi_aff *isl_multi_aff_set_dim_name( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned pos, const char *s); __islpy_give isl_multi_aff *isl_multi_aff_set_dim_id( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned pos, __islpy_take isl_id *id); const char *isl_multi_aff_get_tuple_name( __islpy_keep isl_multi_aff *multi, enum isl_dim_type type); int isl_multi_aff_has_tuple_id(__islpy_keep isl_multi_aff *multi, enum isl_dim_type type); __islpy_give isl_id *isl_multi_aff_get_tuple_id( __islpy_keep isl_multi_aff *multi, enum isl_dim_type type); __islpy_give isl_multi_aff *isl_multi_aff_set_tuple_name( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, const char *s); __islpy_give isl_multi_aff *isl_multi_aff_set_tuple_id( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, __islpy_take isl_id *id); __islpy_give isl_multi_aff *isl_multi_aff_reset_tuple_id( __islpy_take isl_multi_aff *multi, enum isl_dim_type type); __islpy_give isl_multi_aff *isl_multi_aff_reset_user( __islpy_take isl_multi_aff *multi); int isl_multi_aff_involves_dims( __islpy_keep isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_aff *isl_multi_aff_insert_dims( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_aff *isl_multi_aff_add_dims( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned n); __islpy_give isl_multi_aff *isl_multi_aff_drop_dims( __islpy_take isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_aff *isl_multi_aff_get_aff( __islpy_keep isl_multi_aff *multi, int pos); __islpy_give isl_multi_aff *isl_multi_aff_set_aff( __islpy_take isl_multi_aff *multi, int pos, __islpy_take isl_aff *el); __islpy_give isl_multi_aff *isl_multi_aff_range_splice( __islpy_take isl_multi_aff *multi1, unsigned pos, __islpy_take isl_multi_aff *multi2); __islpy_give isl_multi_aff *isl_multi_aff_splice( __islpy_take isl_multi_aff *multi1, unsigned in_pos, unsigned out_pos, __islpy_take isl_multi_aff *multi2); __islpy_give isl_multi_aff *isl_multi_aff_flat_range_product( __islpy_take isl_multi_aff *multi1, __islpy_take isl_multi_aff *multi2); __islpy_give isl_multi_aff *isl_multi_aff_range_product( __islpy_take isl_multi_aff *multi1, __islpy_take isl_multi_aff *multi2); __islpy_give isl_multi_aff *isl_multi_aff_product( __islpy_take isl_multi_aff *multi1, __islpy_take isl_multi_aff *multi2); int isl_multi_aff_range_is_wrapping( __islpy_keep isl_multi_aff *multi); __islpy_give isl_multi_aff *isl_multi_aff_range_factor_domain( __islpy_take isl_multi_aff *multi); __islpy_give isl_multi_aff *isl_multi_aff_range_factor_range( __islpy_take isl_multi_aff *multi); __islpy_give isl_multi_aff *isl_multi_aff_scale_val( __islpy_take isl_multi_aff *multi, __islpy_take isl_val *v); __islpy_give isl_multi_aff *isl_multi_aff_scale_multi_val( __islpy_take isl_multi_aff *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_aff *isl_multi_aff_scale_down_multi_val( __islpy_take isl_multi_aff *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_aff *isl_multi_aff_align_params( __islpy_take isl_multi_aff *multi, __islpy_take isl_space *model); __islpy_give isl_multi_aff *isl_multi_aff_from_range( __islpy_take isl_multi_aff *multi); -unsigned isl_multi_pw_aff_dim(__islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type); isl_ctx *isl_multi_pw_aff_get_ctx( __islpy_keep isl_multi_pw_aff *multi); __islpy_give isl_space *isl_multi_pw_aff_get_space( __islpy_keep isl_multi_pw_aff *multi); __islpy_give isl_space *isl_multi_pw_aff_get_domain_space( __islpy_keep isl_multi_pw_aff *multi); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_aff_list( __islpy_take isl_space *space, __islpy_take isl_pw_aff_list *list); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_zero( __islpy_take isl_space *space); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_copy( __islpy_keep isl_multi_pw_aff *multi); isl_multi_pw_aff *isl_multi_pw_aff_free( __islpy_take isl_multi_pw_aff *multi); int isl_multi_pw_aff_plain_is_equal( __islpy_keep isl_multi_pw_aff *multi1, __islpy_keep isl_multi_pw_aff *multi2); int isl_multi_pw_aff_find_dim_by_id( __islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type, __islpy_keep isl_id *id); __islpy_give isl_id *isl_multi_pw_aff_get_dim_id( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_set_dim_name( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos, const char *s); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_set_dim_id( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos, __islpy_take isl_id *id); const char *isl_multi_pw_aff_get_tuple_name( __islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type); int isl_multi_pw_aff_has_tuple_id(__islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type); __islpy_give isl_id *isl_multi_pw_aff_get_tuple_id( __islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_set_tuple_name( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, const char *s); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_set_tuple_id( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, __islpy_take isl_id *id); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_reset_tuple_id( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_reset_user( __islpy_take isl_multi_pw_aff *multi); int isl_multi_pw_aff_involves_dims( __islpy_keep isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_insert_dims( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_add_dims( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned n); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_drop_dims( __islpy_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_pw_aff *isl_multi_pw_aff_get_pw_aff( __islpy_keep isl_multi_pw_aff *multi, int pos); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_set_pw_aff( __islpy_take isl_multi_pw_aff *multi, int pos, __islpy_take isl_pw_aff *el); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_range_splice( __islpy_take isl_multi_pw_aff *multi1, unsigned pos, __islpy_take isl_multi_pw_aff *multi2); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_splice( __islpy_take isl_multi_pw_aff *multi1, unsigned in_pos, unsigned out_pos, __islpy_take isl_multi_pw_aff *multi2); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_flat_range_product( __islpy_take isl_multi_pw_aff *multi1, __islpy_take isl_multi_pw_aff *multi2); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_range_product( __islpy_take isl_multi_pw_aff *multi1, __islpy_take isl_multi_pw_aff *multi2); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_product( __islpy_take isl_multi_pw_aff *multi1, __islpy_take isl_multi_pw_aff *multi2); int isl_multi_pw_aff_range_is_wrapping( __islpy_keep isl_multi_pw_aff *multi); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_range_factor_domain( __islpy_take isl_multi_pw_aff *multi); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_range_factor_range( __islpy_take isl_multi_pw_aff *multi); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_scale_val( __islpy_take isl_multi_pw_aff *multi, __islpy_take isl_val *v); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_scale_multi_val( __islpy_take isl_multi_pw_aff *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_scale_down_multi_val( __islpy_take isl_multi_pw_aff *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_align_params( __islpy_take isl_multi_pw_aff *multi, __islpy_take isl_space *model); __islpy_give isl_multi_pw_aff *isl_multi_pw_aff_from_range( __islpy_take isl_multi_pw_aff *multi); -unsigned isl_multi_val_dim(__islpy_keep isl_multi_val *multi, enum isl_dim_type type); isl_ctx *isl_multi_val_get_ctx( __islpy_keep isl_multi_val *multi); __islpy_give isl_space *isl_multi_val_get_space( __islpy_keep isl_multi_val *multi); __islpy_give isl_space *isl_multi_val_get_domain_space( __islpy_keep isl_multi_val *multi); __islpy_give isl_multi_val *isl_multi_val_from_val_list( __islpy_take isl_space *space, __islpy_take isl_val_list *list); __islpy_give isl_multi_val *isl_multi_val_zero( __islpy_take isl_space *space); __islpy_give isl_multi_val *isl_multi_val_copy( __islpy_keep isl_multi_val *multi); isl_multi_val *isl_multi_val_free( __islpy_take isl_multi_val *multi); int isl_multi_val_plain_is_equal( __islpy_keep isl_multi_val *multi1, __islpy_keep isl_multi_val *multi2); int isl_multi_val_find_dim_by_id( __islpy_keep isl_multi_val *multi, enum isl_dim_type type, __islpy_keep isl_id *id); __islpy_give isl_id *isl_multi_val_get_dim_id( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned pos); __islpy_give isl_multi_val *isl_multi_val_set_dim_name( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned pos, const char *s); __islpy_give isl_multi_val *isl_multi_val_set_dim_id( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned pos, __islpy_take isl_id *id); const char *isl_multi_val_get_tuple_name( __islpy_keep isl_multi_val *multi, enum isl_dim_type type); int isl_multi_val_has_tuple_id(__islpy_keep isl_multi_val *multi, enum isl_dim_type type); __islpy_give isl_id *isl_multi_val_get_tuple_id( __islpy_keep isl_multi_val *multi, enum isl_dim_type type); __islpy_give isl_multi_val *isl_multi_val_set_tuple_name( __islpy_take isl_multi_val *multi, enum isl_dim_type type, const char *s); __islpy_give isl_multi_val *isl_multi_val_set_tuple_id( __islpy_take isl_multi_val *multi, enum isl_dim_type type, __islpy_take isl_id *id); __islpy_give isl_multi_val *isl_multi_val_reset_tuple_id( __islpy_take isl_multi_val *multi, enum isl_dim_type type); __islpy_give isl_multi_val *isl_multi_val_reset_user( __islpy_take isl_multi_val *multi); int isl_multi_val_involves_dims( __islpy_keep isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_val *isl_multi_val_insert_dims( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_multi_val *isl_multi_val_add_dims( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned n); __islpy_give isl_multi_val *isl_multi_val_drop_dims( __islpy_take isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); __islpy_give isl_val *isl_multi_val_get_val( __islpy_keep isl_multi_val *multi, int pos); __islpy_give isl_multi_val *isl_multi_val_set_val( __islpy_take isl_multi_val *multi, int pos, __islpy_take isl_val *el); __islpy_give isl_multi_val *isl_multi_val_range_splice( __islpy_take isl_multi_val *multi1, unsigned pos, __islpy_take isl_multi_val *multi2); __islpy_give isl_multi_val *isl_multi_val_splice( __islpy_take isl_multi_val *multi1, unsigned in_pos, unsigned out_pos, __islpy_take isl_multi_val *multi2); __islpy_give isl_multi_val *isl_multi_val_flat_range_product( __islpy_take isl_multi_val *multi1, __islpy_take isl_multi_val *multi2); __islpy_give isl_multi_val *isl_multi_val_range_product( __islpy_take isl_multi_val *multi1, __islpy_take isl_multi_val *multi2); __islpy_give isl_multi_val *isl_multi_val_product( __islpy_take isl_multi_val *multi1, __islpy_take isl_multi_val *multi2); int isl_multi_val_range_is_wrapping( __islpy_keep isl_multi_val *multi); __islpy_give isl_multi_val *isl_multi_val_range_factor_domain( __islpy_take isl_multi_val *multi); __islpy_give isl_multi_val *isl_multi_val_range_factor_range( __islpy_take isl_multi_val *multi); __islpy_give isl_multi_val *isl_multi_val_scale_val( __islpy_take isl_multi_val *multi, __islpy_take isl_val *v); __islpy_give isl_multi_val *isl_multi_val_scale_multi_val( __islpy_take isl_multi_val *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_val *isl_multi_val_scale_down_multi_val( __islpy_take isl_multi_val *multi, __islpy_take isl_multi_val *mv); __islpy_give isl_multi_val *isl_multi_val_align_params( __islpy_take isl_multi_val *multi, __islpy_take isl_space *model); __islpy_give isl_multi_val *isl_multi_val_from_range( __islpy_take isl_multi_val *multi); diff --git a/islpy/version.py b/islpy/version.py index e532a40..82ea6fb 100644 --- a/islpy/version.py +++ b/islpy/version.py @@ -1,2 +1,2 @@ -VERSION = (2015, 1, 1) +VERSION = (2020, 2) VERSION_TEXT = ".".join(str(i) for i in VERSION) diff --git a/preproc-headers/00acdddc7f2724521ea27b609bef79bab7d128cffd9241099e9b3741bb54dced b/preproc-headers/00acdddc7f2724521ea27b609bef79bab7d128cffd9241099e9b3741bb54dced new file mode 100644 index 0000000..5f2397d --- /dev/null +++ b/preproc-headers/00acdddc7f2724521ea27b609bef79bab7d128cffd9241099e9b3741bb54dced @@ -0,0 +1,168 @@ + + + +#include +#include +#include +#include +#include +#include + + + + + +isl_ctx *isl_multi_val_get_ctx( __isl_keep isl_multi_val *multi); __isl_export __isl_give isl_space *isl_multi_val_get_space( __isl_keep isl_multi_val *multi); __isl_give isl_space *isl_multi_val_get_domain_space( __isl_keep isl_multi_val *multi); __isl_constructor __isl_give isl_multi_val *isl_multi_val_from_val_list( __isl_take isl_space *space, __isl_take isl_val_list *list); __isl_give isl_multi_val *isl_multi_val_copy( __isl_keep isl_multi_val *multi); __isl_null isl_multi_val *isl_multi_val_free( __isl_take isl_multi_val *multi); __isl_export isl_bool isl_multi_val_plain_is_equal( __isl_keep isl_multi_val *multi1, __isl_keep isl_multi_val *multi2); __isl_give isl_multi_val *isl_multi_val_reset_user( __isl_take isl_multi_val *multi); __isl_export isl_size isl_multi_val_size(__isl_keep isl_multi_val *multi); __isl_export __isl_give isl_val *isl_multi_val_get_at( __isl_keep isl_multi_val *multi, int pos); __isl_give isl_val *isl_multi_val_get_val( __isl_keep isl_multi_val *multi, int pos); __isl_export __isl_give isl_multi_val *isl_multi_val_set_at( __isl_take isl_multi_val *multi, int pos, __isl_take isl_val *el); __isl_give isl_multi_val *isl_multi_val_set_val( __isl_take isl_multi_val *multi, int pos, __isl_take isl_val *el); __isl_give isl_multi_val *isl_multi_val_range_splice( __isl_take isl_multi_val *multi1, unsigned pos, __isl_take isl_multi_val *multi2); __isl_give isl_multi_val *isl_multi_val_flatten_range( __isl_take isl_multi_val *multi); __isl_export __isl_give isl_multi_val *isl_multi_val_flat_range_product( __isl_take isl_multi_val *multi1, __isl_take isl_multi_val *multi2); __isl_export __isl_give isl_multi_val *isl_multi_val_range_product( __isl_take isl_multi_val *multi1, __isl_take isl_multi_val *multi2); __isl_give isl_multi_val *isl_multi_val_factor_range( __isl_take isl_multi_val *multi); isl_bool isl_multi_val_range_is_wrapping( __isl_keep isl_multi_val *multi); __isl_give isl_multi_val *isl_multi_val_range_factor_domain( __isl_take isl_multi_val *multi); __isl_give isl_multi_val *isl_multi_val_range_factor_range( __isl_take isl_multi_val *multi); __isl_give isl_multi_val *isl_multi_val_align_params( __isl_take isl_multi_val *multi, __isl_take isl_space *model); __isl_give isl_multi_val *isl_multi_val_from_range( __isl_take isl_multi_val *multi); +__isl_overload __isl_give isl_multi_val *isl_multi_val_scale_val( __isl_take isl_multi_val *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_val *isl_multi_val_scale_down_val( __isl_take isl_multi_val *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_val *isl_multi_val_scale_multi_val( __isl_take isl_multi_val *multi, __isl_take isl_multi_val *mv); __isl_overload __isl_give isl_multi_val *isl_multi_val_scale_down_multi_val( __isl_take isl_multi_val *multi, __isl_take isl_multi_val *mv); __isl_give isl_multi_val *isl_multi_val_mod_multi_val( __isl_take isl_multi_val *multi, __isl_take isl_multi_val *mv); __isl_export __isl_give isl_multi_val *isl_multi_val_add( __isl_take isl_multi_val *multi1, __isl_take isl_multi_val *multi2); __isl_export __isl_give isl_multi_val *isl_multi_val_sub( __isl_take isl_multi_val *multi1, __isl_take isl_multi_val *multi2); __isl_export __isl_give isl_multi_val *isl_multi_val_neg( __isl_take isl_multi_val *multi); +__isl_export __isl_give isl_multi_val *isl_multi_val_zero( __isl_take isl_space *space); +isl_bool isl_multi_val_involves_nan( __isl_keep isl_multi_val *multi); +isl_size isl_multi_val_dim(__isl_keep isl_multi_val *multi, enum isl_dim_type type); __isl_give isl_multi_val *isl_multi_val_drop_dims( __isl_take isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); isl_bool isl_multi_val_involves_dims( __isl_keep isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_val *isl_multi_val_insert_dims( __isl_take isl_multi_val *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_val *isl_multi_val_add_dims( __isl_take isl_multi_val *multi, enum isl_dim_type type, unsigned n); __isl_give isl_multi_val * isl_multi_val_project_domain_on_params( __isl_take isl_multi_val *multi); +int isl_multi_val_find_dim_by_name( __isl_keep isl_multi_val *multi, enum isl_dim_type type, const char *name); int isl_multi_val_find_dim_by_id( __isl_keep isl_multi_val *multi, enum isl_dim_type type, __isl_keep isl_id *id); __isl_give isl_id *isl_multi_val_get_dim_id( __isl_keep isl_multi_val *multi, enum isl_dim_type type, unsigned pos); __isl_give isl_multi_val *isl_multi_val_set_dim_name( __isl_take isl_multi_val *multi, enum isl_dim_type type, unsigned pos, const char *s); __isl_give isl_multi_val *isl_multi_val_set_dim_id( __isl_take isl_multi_val *multi, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +const char *isl_multi_val_get_tuple_name( __isl_keep isl_multi_val *multi, enum isl_dim_type type); isl_bool isl_multi_val_has_tuple_id( __isl_keep isl_multi_val *multi, enum isl_dim_type type); __isl_give isl_id *isl_multi_val_get_tuple_id( __isl_keep isl_multi_val *multi, enum isl_dim_type type); __isl_give isl_multi_val *isl_multi_val_set_tuple_name( __isl_take isl_multi_val *multi, enum isl_dim_type type, const char *s); __isl_give isl_multi_val *isl_multi_val_set_tuple_id( __isl_take isl_multi_val *multi, enum isl_dim_type type, __isl_take isl_id *id); __isl_give isl_multi_val *isl_multi_val_reset_tuple_id( __isl_take isl_multi_val *multi, enum isl_dim_type type); +__isl_export __isl_give isl_multi_val *isl_multi_val_product( __isl_take isl_multi_val *multi1, __isl_take isl_multi_val *multi2); __isl_give isl_multi_val *isl_multi_val_splice( __isl_take isl_multi_val *multi1, unsigned in_pos, unsigned out_pos, __isl_take isl_multi_val *multi2); + +__isl_export +__isl_give isl_val *isl_val_zero(isl_ctx *ctx); +__isl_export +__isl_give isl_val *isl_val_one(isl_ctx *ctx); +__isl_export +__isl_give isl_val *isl_val_negone(isl_ctx *ctx); +__isl_export +__isl_give isl_val *isl_val_nan(isl_ctx *ctx); +__isl_export +__isl_give isl_val *isl_val_infty(isl_ctx *ctx); +__isl_export +__isl_give isl_val *isl_val_neginfty(isl_ctx *ctx); +__isl_constructor +__isl_give isl_val *isl_val_int_from_si(isl_ctx *ctx, long i); +__isl_give isl_val *isl_val_int_from_ui(isl_ctx *ctx, unsigned long u); +__isl_give isl_val *isl_val_int_from_chunks(isl_ctx *ctx, size_t n, + size_t size, const void *chunks); + +__isl_give isl_val *isl_val_copy(__isl_keep isl_val *v); +__isl_null isl_val *isl_val_free(__isl_take isl_val *v); + +isl_ctx *isl_val_get_ctx(__isl_keep isl_val *val); +uint32_t isl_val_get_hash(__isl_keep isl_val *val); +__isl_export +long isl_val_get_num_si(__isl_keep isl_val *v); +__isl_export +long isl_val_get_den_si(__isl_keep isl_val *v); +__isl_give isl_val *isl_val_get_den_val(__isl_keep isl_val *v); +double isl_val_get_d(__isl_keep isl_val *v); +isl_size isl_val_n_abs_num_chunks(__isl_keep isl_val *v, size_t size); +isl_stat isl_val_get_abs_num_chunks(__isl_keep isl_val *v, size_t size, + void *chunks); + +__isl_give isl_val *isl_val_set_si(__isl_take isl_val *v, long i); + +__isl_export +__isl_give isl_val *isl_val_abs(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_neg(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_inv(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_floor(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_ceil(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_trunc(__isl_take isl_val *v); +__isl_give isl_val *isl_val_2exp(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_pow2(__isl_take isl_val *v); +__isl_export +__isl_give isl_val *isl_val_min(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_export +__isl_give isl_val *isl_val_max(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_export +__isl_give isl_val *isl_val_add(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_add_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_export +__isl_give isl_val *isl_val_sub(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_sub_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_export +__isl_give isl_val *isl_val_mul(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_mul_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_export +__isl_give isl_val *isl_val_div(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_div_ui(__isl_take isl_val *v1, unsigned long v2); +__isl_export +__isl_give isl_val *isl_val_mod(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_export +__isl_give isl_val *isl_val_gcd(__isl_take isl_val *v1, __isl_take isl_val *v2); +__isl_give isl_val *isl_val_gcdext(__isl_take isl_val *v1, + __isl_take isl_val *v2, __isl_give isl_val **x, __isl_give isl_val **y); + +__isl_export +int isl_val_sgn(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_zero(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_one(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_negone(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_nonneg(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_nonpos(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_pos(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_neg(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_int(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_rat(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_nan(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_infty(__isl_keep isl_val *v); +__isl_export +isl_bool isl_val_is_neginfty(__isl_keep isl_val *v); + +__isl_export +int isl_val_cmp_si(__isl_keep isl_val *v, long i); + +__isl_export +isl_bool isl_val_lt(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +__isl_export +isl_bool isl_val_le(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +__isl_export +isl_bool isl_val_gt(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +isl_bool isl_val_gt_si(__isl_keep isl_val *v, long i); +__isl_export +isl_bool isl_val_ge(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +__isl_export +isl_bool isl_val_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +__isl_export +isl_bool isl_val_ne(__isl_keep isl_val *v1, __isl_keep isl_val *v2); +__isl_export +isl_bool isl_val_abs_eq(__isl_keep isl_val *v1, __isl_keep isl_val *v2); + +__isl_export +isl_bool isl_val_is_divisible_by(__isl_keep isl_val *v1, + __isl_keep isl_val *v2); + +__isl_constructor +__isl_give isl_val *isl_val_read_from_str(isl_ctx *ctx, const char *str); +__isl_give isl_printer *isl_printer_print_val(__isl_take isl_printer *p, + __isl_keep isl_val *v); +void isl_val_dump(__isl_keep isl_val *v); +__isl_give char *isl_val_to_str(__isl_keep isl_val *v); + +__isl_overload +__isl_give isl_multi_val *isl_multi_val_add_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v); +__isl_give isl_multi_val *isl_multi_val_mod_val(__isl_take isl_multi_val *mv, + __isl_take isl_val *v); + +__isl_constructor +__isl_give isl_multi_val *isl_multi_val_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_printer *isl_printer_print_multi_val(__isl_take isl_printer *p, + __isl_keep isl_multi_val *mv); +void isl_multi_val_dump(__isl_keep isl_multi_val *mv); +__isl_give char *isl_multi_val_to_str(__isl_keep isl_multi_val *mv); + +isl_ctx *isl_val_list_get_ctx(__isl_keep isl_val_list *list); __isl_constructor __isl_give isl_val_list *isl_val_list_from_val( __isl_take isl_val *el); __isl_constructor __isl_give isl_val_list *isl_val_list_alloc(isl_ctx *ctx, int n); __isl_give isl_val_list *isl_val_list_copy( __isl_keep isl_val_list *list); __isl_null isl_val_list *isl_val_list_free( __isl_take isl_val_list *list); __isl_export __isl_give isl_val_list *isl_val_list_add( __isl_take isl_val_list *list, __isl_take isl_val *el); __isl_give isl_val_list *isl_val_list_insert( __isl_take isl_val_list *list, unsigned pos, __isl_take struct isl_val *el); __isl_give isl_val_list *isl_val_list_drop( __isl_take isl_val_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_val_list *isl_val_list_clear( __isl_take isl_val_list *list); __isl_give isl_val_list *isl_val_list_swap( __isl_take isl_val_list *list, unsigned pos1, unsigned pos2); __isl_give isl_val_list *isl_val_list_reverse( __isl_take isl_val_list *list); __isl_export __isl_give isl_val_list *isl_val_list_concat( __isl_take isl_val_list *list1, __isl_take isl_val_list *list2); __isl_export isl_size isl_val_list_size(__isl_keep isl_val_list *list); isl_size isl_val_list_n_val(__isl_keep isl_val_list *list); __isl_export __isl_give isl_val *isl_val_list_get_at( __isl_keep isl_val_list *list, int index); __isl_give struct isl_val *isl_val_list_get_val( __isl_keep isl_val_list *list, int index); __isl_give struct isl_val_list *isl_val_list_set_val( __isl_take struct isl_val_list *list, int index, __isl_take struct isl_val *el); __isl_export isl_stat isl_val_list_foreach(__isl_keep isl_val_list *list, isl_stat (*fn)(__isl_take isl_val *el, void *user), void *user); __isl_give isl_val_list *isl_val_list_map( __isl_take isl_val_list *list, __isl_give isl_val * (*fn)(__isl_take isl_val *el, void *user), void *user); __isl_give isl_val_list *isl_val_list_sort( __isl_take isl_val_list *list, int (*cmp)(__isl_keep struct isl_val *a, __isl_keep struct isl_val *b, void *user), void *user); isl_stat isl_val_list_foreach_scc(__isl_keep isl_val_list *list, isl_bool (*follows)(__isl_keep struct isl_val *a, __isl_keep struct isl_val *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_val_list *scc, void *user), void *fn_user); __isl_give char *isl_val_list_to_str( __isl_keep isl_val_list *list); __isl_give isl_printer *isl_printer_print_val_list( __isl_take isl_printer *p, __isl_keep isl_val_list *list); void isl_val_list_dump(__isl_keep isl_val_list *list); diff --git a/preproc-headers/07210d6c7da99014318baad4ec58e4b1a2e0b84532f1ef64fafa71a5f9a2c524 b/preproc-headers/07210d6c7da99014318baad4ec58e4b1a2e0b84532f1ef64fafa71a5f9a2c524 new file mode 100644 index 0000000..cc31cd0 --- /dev/null +++ b/preproc-headers/07210d6c7da99014318baad4ec58e4b1a2e0b84532f1ef64fafa71a5f9a2c524 @@ -0,0 +1,47 @@ + + + +#include +#include +#include +#include +#include +#include + + + + + +isl_ctx *isl_id_list_get_ctx(__isl_keep isl_id_list *list); __isl_constructor __isl_give isl_id_list *isl_id_list_from_id( __isl_take isl_id *el); __isl_constructor __isl_give isl_id_list *isl_id_list_alloc(isl_ctx *ctx, int n); __isl_give isl_id_list *isl_id_list_copy( __isl_keep isl_id_list *list); __isl_null isl_id_list *isl_id_list_free( __isl_take isl_id_list *list); __isl_export __isl_give isl_id_list *isl_id_list_add( __isl_take isl_id_list *list, __isl_take isl_id *el); __isl_give isl_id_list *isl_id_list_insert( __isl_take isl_id_list *list, unsigned pos, __isl_take struct isl_id *el); __isl_give isl_id_list *isl_id_list_drop( __isl_take isl_id_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_id_list *isl_id_list_clear( __isl_take isl_id_list *list); __isl_give isl_id_list *isl_id_list_swap( __isl_take isl_id_list *list, unsigned pos1, unsigned pos2); __isl_give isl_id_list *isl_id_list_reverse( __isl_take isl_id_list *list); __isl_export __isl_give isl_id_list *isl_id_list_concat( __isl_take isl_id_list *list1, __isl_take isl_id_list *list2); __isl_export isl_size isl_id_list_size(__isl_keep isl_id_list *list); isl_size isl_id_list_n_id(__isl_keep isl_id_list *list); __isl_export __isl_give isl_id *isl_id_list_get_at( __isl_keep isl_id_list *list, int index); __isl_give struct isl_id *isl_id_list_get_id( __isl_keep isl_id_list *list, int index); __isl_give struct isl_id_list *isl_id_list_set_id( __isl_take struct isl_id_list *list, int index, __isl_take struct isl_id *el); __isl_export isl_stat isl_id_list_foreach(__isl_keep isl_id_list *list, isl_stat (*fn)(__isl_take isl_id *el, void *user), void *user); __isl_give isl_id_list *isl_id_list_map( __isl_take isl_id_list *list, __isl_give isl_id * (*fn)(__isl_take isl_id *el, void *user), void *user); __isl_give isl_id_list *isl_id_list_sort( __isl_take isl_id_list *list, int (*cmp)(__isl_keep struct isl_id *a, __isl_keep struct isl_id *b, void *user), void *user); isl_stat isl_id_list_foreach_scc(__isl_keep isl_id_list *list, isl_bool (*follows)(__isl_keep struct isl_id *a, __isl_keep struct isl_id *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_id_list *scc, void *user), void *fn_user); __isl_give char *isl_id_list_to_str( __isl_keep isl_id_list *list); __isl_give isl_printer *isl_printer_print_id_list( __isl_take isl_printer *p, __isl_keep isl_id_list *list); void isl_id_list_dump(__isl_keep isl_id_list *list); + +isl_ctx *isl_multi_id_get_ctx( __isl_keep isl_multi_id *multi); __isl_export __isl_give isl_space *isl_multi_id_get_space( __isl_keep isl_multi_id *multi); __isl_give isl_space *isl_multi_id_get_domain_space( __isl_keep isl_multi_id *multi); __isl_constructor __isl_give isl_multi_id *isl_multi_id_from_id_list( __isl_take isl_space *space, __isl_take isl_id_list *list); __isl_give isl_multi_id *isl_multi_id_copy( __isl_keep isl_multi_id *multi); __isl_null isl_multi_id *isl_multi_id_free( __isl_take isl_multi_id *multi); __isl_export isl_bool isl_multi_id_plain_is_equal( __isl_keep isl_multi_id *multi1, __isl_keep isl_multi_id *multi2); __isl_give isl_multi_id *isl_multi_id_reset_user( __isl_take isl_multi_id *multi); __isl_export isl_size isl_multi_id_size(__isl_keep isl_multi_id *multi); __isl_export __isl_give isl_id *isl_multi_id_get_at( __isl_keep isl_multi_id *multi, int pos); __isl_give isl_id *isl_multi_id_get_id( __isl_keep isl_multi_id *multi, int pos); __isl_export __isl_give isl_multi_id *isl_multi_id_set_at( __isl_take isl_multi_id *multi, int pos, __isl_take isl_id *el); __isl_give isl_multi_id *isl_multi_id_set_id( __isl_take isl_multi_id *multi, int pos, __isl_take isl_id *el); __isl_give isl_multi_id *isl_multi_id_range_splice( __isl_take isl_multi_id *multi1, unsigned pos, __isl_take isl_multi_id *multi2); __isl_give isl_multi_id *isl_multi_id_flatten_range( __isl_take isl_multi_id *multi); __isl_export __isl_give isl_multi_id *isl_multi_id_flat_range_product( __isl_take isl_multi_id *multi1, __isl_take isl_multi_id *multi2); __isl_export __isl_give isl_multi_id *isl_multi_id_range_product( __isl_take isl_multi_id *multi1, __isl_take isl_multi_id *multi2); __isl_give isl_multi_id *isl_multi_id_factor_range( __isl_take isl_multi_id *multi); isl_bool isl_multi_id_range_is_wrapping( __isl_keep isl_multi_id *multi); __isl_give isl_multi_id *isl_multi_id_range_factor_domain( __isl_take isl_multi_id *multi); __isl_give isl_multi_id *isl_multi_id_range_factor_range( __isl_take isl_multi_id *multi); __isl_give isl_multi_id *isl_multi_id_align_params( __isl_take isl_multi_id *multi, __isl_take isl_space *model); __isl_give isl_multi_id *isl_multi_id_from_range( __isl_take isl_multi_id *multi); + +isl_ctx *isl_id_get_ctx(__isl_keep isl_id *id); +uint32_t isl_id_get_hash(__isl_keep isl_id *id); + +__isl_give isl_id *isl_id_alloc(isl_ctx *ctx, + __isl_keep const char *name, void *user); +__isl_give isl_id *isl_id_copy(isl_id *id); +__isl_null isl_id *isl_id_free(__isl_take isl_id *id); + +void *isl_id_get_user(__isl_keep isl_id *id); +__isl_export +__isl_keep const char *isl_id_get_name(__isl_keep isl_id *id); + +__isl_give isl_id *isl_id_set_free_user(__isl_take isl_id *id, + void (*free_user)(void *user)); + +__isl_constructor +__isl_give isl_id *isl_id_read_from_str(isl_ctx *ctx, const char *str); +__isl_give char *isl_id_to_str(__isl_keep isl_id *id); +__isl_give isl_printer *isl_printer_print_id(__isl_take isl_printer *p, + __isl_keep isl_id *id); +void isl_id_dump(__isl_keep isl_id *id); + +__isl_constructor +__isl_give isl_multi_id *isl_multi_id_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_printer *isl_printer_print_multi_id(__isl_take isl_printer *p, + __isl_keep isl_multi_id *mi); +void isl_multi_id_dump(__isl_keep isl_multi_id *mi); +__isl_give char *isl_multi_id_to_str(__isl_keep isl_multi_id *mi); diff --git a/preproc-headers/0ebe8d452f8098e326bcae1aeee83177046221b027b407c1f6e3dfb8fce8fee5 b/preproc-headers/0ebe8d452f8098e326bcae1aeee83177046221b027b407c1f6e3dfb8fce8fee5 new file mode 100644 index 0000000..c6b10f2 --- /dev/null +++ b/preproc-headers/0ebe8d452f8098e326bcae1aeee83177046221b027b407c1f6e3dfb8fce8fee5 @@ -0,0 +1,63 @@ +#line 13 +#include + +#include +#include +#include + + + + + +struct isl_vec; +typedef struct isl_vec isl_vec; + +__isl_give isl_vec *isl_vec_alloc(isl_ctx *ctx, unsigned size); +__isl_give isl_vec *isl_vec_zero(isl_ctx *ctx, unsigned size); +__isl_give isl_vec *isl_vec_copy(__isl_keep isl_vec *vec); +__isl_null isl_vec *isl_vec_free(__isl_take isl_vec *vec); + +isl_ctx *isl_vec_get_ctx(__isl_keep isl_vec *vec); + +isl_size isl_vec_size(__isl_keep isl_vec *vec); +__isl_give isl_val *isl_vec_get_element_val(__isl_keep isl_vec *vec, int pos); +__isl_give isl_vec *isl_vec_set_element_si(__isl_take isl_vec *vec, + int pos, int v); +__isl_give isl_vec *isl_vec_set_element_val(__isl_take isl_vec *vec, + int pos, __isl_take isl_val *v); + +isl_bool isl_vec_is_equal(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2); +int isl_vec_cmp_element(__isl_keep isl_vec *vec1, __isl_keep isl_vec *vec2, + int pos); + +void isl_vec_dump(__isl_keep isl_vec *vec); +__isl_give isl_printer *isl_printer_print_vec(__isl_take isl_printer *printer, + __isl_keep isl_vec *vec); + +__isl_give isl_vec *isl_vec_ceil(__isl_take isl_vec *vec); +struct isl_vec *isl_vec_normalize(struct isl_vec *vec); +__isl_give isl_vec *isl_vec_set_si(__isl_take isl_vec *vec, int v); +__isl_give isl_vec *isl_vec_set_val(__isl_take isl_vec *vec, + __isl_take isl_val *v); +__isl_give isl_vec *isl_vec_clr(__isl_take isl_vec *vec); +__isl_give isl_vec *isl_vec_neg(__isl_take isl_vec *vec); +__isl_give isl_vec *isl_vec_add(__isl_take isl_vec *vec1, + __isl_take isl_vec *vec2); +__isl_give isl_vec *isl_vec_extend(__isl_take isl_vec *vec, unsigned size); +__isl_give isl_vec *isl_vec_zero_extend(__isl_take isl_vec *vec, unsigned size); +__isl_give isl_vec *isl_vec_concat(__isl_take isl_vec *vec1, + __isl_take isl_vec *vec2); + +__isl_give isl_vec *isl_vec_sort(__isl_take isl_vec *vec); + +__isl_give isl_vec *isl_vec_read_from_file(isl_ctx *ctx, FILE *input); + +__isl_give isl_vec *isl_vec_drop_els(__isl_take isl_vec *vec, + unsigned pos, unsigned n); +__isl_give isl_vec *isl_vec_add_els(__isl_take isl_vec *vec, unsigned n); +__isl_give isl_vec *isl_vec_insert_els(__isl_take isl_vec *vec, + unsigned pos, unsigned n); +__isl_give isl_vec *isl_vec_insert_zero_els(__isl_take isl_vec *vec, + unsigned pos, unsigned n); +__isl_give isl_vec *isl_vec_move_els(__isl_take isl_vec *vec, + unsigned dst_col, unsigned src_col, unsigned n); diff --git a/preproc-headers/198b62646817de1f144aa8d60fa5689a99f6d3907a384e6d5d62ba603e094d17 b/preproc-headers/198b62646817de1f144aa8d60fa5689a99f6d3907a384e6d5d62ba603e094d17 new file mode 100644 index 0000000..0e27376 --- /dev/null +++ b/preproc-headers/198b62646817de1f144aa8d60fa5689a99f6d3907a384e6d5d62ba603e094d17 @@ -0,0 +1,39 @@ +#line 13 +#include +#include + + + + + +struct isl_options; + +ISL_ARG_DECL(isl_options, struct isl_options, isl_options_args) + + + +isl_stat isl_options_set_bound(isl_ctx *ctx, int val); +int isl_options_get_bound(isl_ctx *ctx); + + + + +isl_stat isl_options_set_on_error(isl_ctx *ctx, int val); +int isl_options_get_on_error(isl_ctx *ctx); + +isl_stat isl_options_set_gbr_only_first(isl_ctx *ctx, int val); +int isl_options_get_gbr_only_first(isl_ctx *ctx); + + + +isl_stat isl_options_set_schedule_algorithm(isl_ctx *ctx, int val); +int isl_options_get_schedule_algorithm(isl_ctx *ctx); + +isl_stat isl_options_set_pip_symmetry(isl_ctx *ctx, int val); +int isl_options_get_pip_symmetry(isl_ctx *ctx); + +isl_stat isl_options_set_coalesce_bounded_wrapping(isl_ctx *ctx, int val); +int isl_options_get_coalesce_bounded_wrapping(isl_ctx *ctx); + +isl_stat isl_options_set_coalesce_preserve_locals(isl_ctx *ctx, int val); +int isl_options_get_coalesce_preserve_locals(isl_ctx *ctx); diff --git a/preproc-headers/1af5b88ab98c657d7b972e03cd32b4ba1587f891072403771288d5fe7d3be74f b/preproc-headers/1af5b88ab98c657d7b972e03cd32b4ba1587f891072403771288d5fe7d3be74f new file mode 100644 index 0000000..106553f --- /dev/null +++ b/preproc-headers/1af5b88ab98c657d7b972e03cd32b4ba1587f891072403771288d5fe7d3be74f @@ -0,0 +1,71 @@ + + + +#include +#include +#include +#include + + + + + +__isl_give isl_printer *isl_printer_to_file(isl_ctx *ctx, FILE *file); +__isl_give isl_printer *isl_printer_to_str(isl_ctx *ctx); +__isl_null isl_printer *isl_printer_free(__isl_take isl_printer *printer); + +isl_ctx *isl_printer_get_ctx(__isl_keep isl_printer *printer); +FILE *isl_printer_get_file(__isl_keep isl_printer *printer); + +__isl_give char *isl_printer_get_str(__isl_keep isl_printer *printer); + +__isl_give isl_printer *isl_printer_set_indent(__isl_take isl_printer *p, + int indent); +__isl_give isl_printer *isl_printer_indent(__isl_take isl_printer *p, + int indent); +#line 34 +__isl_give isl_printer *isl_printer_set_output_format(__isl_take isl_printer *p, + int output_format); +int isl_printer_get_output_format(__isl_keep isl_printer *p); + + + +__isl_give isl_printer *isl_printer_set_yaml_style(__isl_take isl_printer *p, + int yaml_style); +int isl_printer_get_yaml_style(__isl_keep isl_printer *p); + +__isl_give isl_printer *isl_printer_set_indent_prefix(__isl_take isl_printer *p, + const char *prefix); +__isl_give isl_printer *isl_printer_set_prefix(__isl_take isl_printer *p, + const char *prefix); +__isl_give isl_printer *isl_printer_set_suffix(__isl_take isl_printer *p, + const char *suffix); +__isl_give isl_printer *isl_printer_set_isl_int_width(__isl_take isl_printer *p, + int width); + +isl_bool isl_printer_has_note(__isl_keep isl_printer *p, + __isl_keep isl_id *id); +__isl_give isl_id *isl_printer_get_note(__isl_keep isl_printer *p, + __isl_take isl_id *id); +__isl_give isl_printer *isl_printer_set_note(__isl_take isl_printer *p, + __isl_take isl_id *id, __isl_take isl_id *note); + +__isl_give isl_printer *isl_printer_start_line(__isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_end_line(__isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_print_double(__isl_take isl_printer *p, + double d); +__isl_give isl_printer *isl_printer_print_int(__isl_take isl_printer *p, int i); +__isl_give isl_printer *isl_printer_print_str(__isl_take isl_printer *p, + const char *s); + +__isl_give isl_printer *isl_printer_yaml_start_mapping( + __isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_yaml_end_mapping( + __isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_yaml_start_sequence( + __isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_yaml_end_sequence( + __isl_take isl_printer *p); +__isl_give isl_printer *isl_printer_yaml_next(__isl_take isl_printer *p); + +__isl_give isl_printer *isl_printer_flush(__isl_take isl_printer *p); diff --git a/preproc-headers/1b4e45a0179e87945fa630ec5c67e8aeee48891a4d7bbfaebecd4f9612af76f1 b/preproc-headers/1b4e45a0179e87945fa630ec5c67e8aeee48891a4d7bbfaebecd4f9612af76f1 new file mode 100644 index 0000000..ad9ef1e --- /dev/null +++ b/preproc-headers/1b4e45a0179e87945fa630ec5c67e8aeee48891a4d7bbfaebecd4f9612af76f1 @@ -0,0 +1,41 @@ + + + +#include +#include + + + + + +struct isl_external_vertex; +typedef struct isl_external_vertex isl_vertex; + +struct isl_cell; +typedef struct isl_cell isl_cell; + +struct isl_vertices; +typedef struct isl_vertices isl_vertices; + +isl_ctx *isl_vertex_get_ctx(__isl_keep isl_vertex *vertex); +isl_size isl_vertex_get_id(__isl_keep isl_vertex *vertex); +__isl_give isl_basic_set *isl_vertex_get_domain(__isl_keep isl_vertex *vertex); +__isl_give isl_multi_aff *isl_vertex_get_expr(__isl_keep isl_vertex *vertex); +__isl_null isl_vertex *isl_vertex_free(__isl_take isl_vertex *vertex); + +__isl_give isl_vertices *isl_basic_set_compute_vertices( + __isl_keep isl_basic_set *bset); +isl_ctx *isl_vertices_get_ctx(__isl_keep isl_vertices *vertices); +isl_size isl_vertices_get_n_vertices(__isl_keep isl_vertices *vertices); +isl_stat isl_vertices_foreach_vertex(__isl_keep isl_vertices *vertices, + isl_stat (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); +__isl_null isl_vertices *isl_vertices_free(__isl_take isl_vertices *vertices); + +isl_ctx *isl_cell_get_ctx(__isl_keep isl_cell *cell); +__isl_give isl_basic_set *isl_cell_get_domain(__isl_keep isl_cell *cell); +isl_stat isl_cell_foreach_vertex(__isl_keep isl_cell *cell, + isl_stat (*fn)(__isl_take isl_vertex *vertex, void *user), void *user); +__isl_null isl_cell *isl_cell_free(__isl_take isl_cell *cell); + +isl_stat isl_vertices_foreach_cell(__isl_keep isl_vertices *vertices, + isl_stat (*fn)(__isl_take isl_cell *cell, void *user), void *user); diff --git a/preproc-headers/2e56e4449bd63e4ce362b3f87bcb4cc76f24b361f764292dcd25befafc749905 b/preproc-headers/2e56e4449bd63e4ce362b3f87bcb4cc76f24b361f764292dcd25befafc749905 new file mode 100644 index 0000000..e6a8560 --- /dev/null +++ b/preproc-headers/2e56e4449bd63e4ce362b3f87bcb4cc76f24b361f764292dcd25befafc749905 @@ -0,0 +1,38 @@ + + + +#include +#include +#include + + + + + +struct __isl_subclass(isl_basic_set) isl_point; +typedef struct isl_point isl_point; + +isl_ctx *isl_point_get_ctx(__isl_keep isl_point *pnt); +__isl_give isl_space *isl_point_get_space(__isl_keep isl_point *pnt); + +__isl_give isl_point *isl_point_zero(__isl_take isl_space *space); +__isl_give isl_point *isl_point_copy(__isl_keep isl_point *pnt); +__isl_null isl_point *isl_point_free(__isl_take isl_point *pnt); + +__isl_give isl_val *isl_point_get_coordinate_val(__isl_keep isl_point *pnt, + enum isl_dim_type type, int pos); +__isl_give isl_point *isl_point_set_coordinate_val(__isl_take isl_point *pnt, + enum isl_dim_type type, int pos, __isl_take isl_val *v); + +__isl_give isl_point *isl_point_add_ui(__isl_take isl_point *pnt, + enum isl_dim_type type, int pos, unsigned val); +__isl_give isl_point *isl_point_sub_ui(__isl_take isl_point *pnt, + enum isl_dim_type type, int pos, unsigned val); + +__isl_give isl_point *isl_point_void(__isl_take isl_space *space); +isl_bool isl_point_is_void(__isl_keep isl_point *pnt); + +__isl_give isl_printer *isl_printer_print_point( + __isl_take isl_printer *printer, __isl_keep isl_point *pnt); +__isl_give char *isl_point_to_str(__isl_keep isl_point *pnt); +void isl_point_dump(__isl_keep isl_point *pnt); diff --git a/preproc-headers/440a7ec726aae68823966faa0a891da59b34c30ba660fedda0c14cc4c339e14c b/preproc-headers/440a7ec726aae68823966faa0a891da59b34c30ba660fedda0c14cc4c339e14c new file mode 100644 index 0000000..52e1c74 --- /dev/null +++ b/preproc-headers/440a7ec726aae68823966faa0a891da59b34c30ba660fedda0c14cc4c339e14c @@ -0,0 +1,338 @@ + + + +#include +#include +#include +#include +#include +#include +#include + + + + + +isl_size isl_union_map_dim(__isl_keep isl_union_map *umap, + enum isl_dim_type type); +isl_bool isl_union_map_involves_dims(__isl_keep isl_union_map *umap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_id *isl_union_map_get_dim_id(__isl_keep isl_union_map *umap, + enum isl_dim_type type, unsigned pos); + +__isl_constructor +__isl_give isl_union_map *isl_union_map_from_basic_map( + __isl_take isl_basic_map *bmap); +__isl_constructor +__isl_give isl_union_map *isl_union_map_from_map(__isl_take isl_map *map); +__isl_overload +__isl_give isl_union_map *isl_union_map_empty_ctx(isl_ctx *ctx); +__isl_give isl_union_map *isl_union_map_empty_space( + __isl_take isl_space *space); +__isl_give isl_union_map *isl_union_map_empty(__isl_take isl_space *space); +__isl_give isl_union_map *isl_union_map_copy(__isl_keep isl_union_map *umap); +__isl_null isl_union_map *isl_union_map_free(__isl_take isl_union_map *umap); + +isl_ctx *isl_union_map_get_ctx(__isl_keep isl_union_map *umap); +__isl_export +__isl_give isl_space *isl_union_map_get_space(__isl_keep isl_union_map *umap); + +__isl_give isl_union_map *isl_union_map_reset_user( + __isl_take isl_union_map *umap); + +int isl_union_map_find_dim_by_name(__isl_keep isl_union_map *umap, + enum isl_dim_type type, const char *name); + +__isl_export +__isl_give isl_union_map *isl_union_map_universe( + __isl_take isl_union_map *umap); +__isl_give isl_set *isl_union_map_params(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_set *isl_union_map_domain(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_set *isl_union_map_range(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_domain_map( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_map_domain_map_union_pw_multi_aff( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_range_map( + __isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_set_wrapped_domain_map( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_map *isl_union_map_from_domain( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_map *isl_union_map_from_range( + __isl_take isl_union_set *uset); + +__isl_export +__isl_give isl_union_map *isl_union_map_affine_hull( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_polyhedral_hull( + __isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_remove_redundancies( + __isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_simple_hull( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_coalesce( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_compute_divs( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_lexmin(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_lexmax(__isl_take isl_union_map *umap); + +__isl_give isl_union_map *isl_union_map_add_map(__isl_take isl_union_map *umap, + __isl_take isl_map *map); +__isl_export +__isl_give isl_union_map *isl_union_map_union(__isl_take isl_union_map *umap1, + __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_subtract( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_intersect( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_intersect_params( + __isl_take isl_union_map *umap, __isl_take isl_set *set); +__isl_export +__isl_give isl_union_map *isl_union_map_product(__isl_take isl_union_map *umap1, + __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_domain_product( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_flat_domain_product( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_range_product( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_flat_range_product( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_domain_factor_domain( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_domain_factor_range( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_range_factor_domain( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_range_factor_range( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_factor_domain( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_factor_range( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_gist(__isl_take isl_union_map *umap, + __isl_take isl_union_map *context); +__isl_export +__isl_give isl_union_map *isl_union_map_gist_params( + __isl_take isl_union_map *umap, __isl_take isl_set *set); +__isl_export +__isl_give isl_union_map *isl_union_map_gist_domain( + __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_map *isl_union_map_gist_range( + __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); + +__isl_export +__isl_give isl_union_map *isl_union_map_intersect_domain( + __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_map *isl_union_map_intersect_range( + __isl_take isl_union_map *umap, __isl_take isl_union_set *uset); +__isl_give isl_union_map *isl_union_map_intersect_domain_factor_range( + __isl_take isl_union_map *umap, __isl_take isl_union_map *factor); +__isl_give isl_union_map *isl_union_map_intersect_range_factor_domain( + __isl_take isl_union_map *umap, __isl_take isl_union_map *factor); +__isl_give isl_union_map *isl_union_map_intersect_range_factor_range( + __isl_take isl_union_map *umap, __isl_take isl_union_map *factor); + +__isl_export +__isl_give isl_union_map *isl_union_map_subtract_domain( + __isl_take isl_union_map *umap, __isl_take isl_union_set *dom); +__isl_export +__isl_give isl_union_map *isl_union_map_subtract_range( + __isl_take isl_union_map *umap, __isl_take isl_union_set *dom); + +__isl_export +__isl_give isl_union_map *isl_union_map_apply_domain( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_export +__isl_give isl_union_map *isl_union_map_apply_range( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_domain_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_range_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_domain_pw_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_range_pw_multi_aff( + __isl_take isl_union_map *umap, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_domain_multi_pw_aff( + __isl_take isl_union_map *umap, __isl_take isl_multi_pw_aff *mpa); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_domain_union_pw_multi_aff( + __isl_take isl_union_map *umap, + __isl_take isl_union_pw_multi_aff *upma); +__isl_overload +__isl_give isl_union_map *isl_union_map_preimage_range_union_pw_multi_aff( + __isl_take isl_union_map *umap, + __isl_take isl_union_pw_multi_aff *upma); +__isl_export +__isl_give isl_union_map *isl_union_map_reverse(__isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_range_reverse( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_from_domain_and_range( + __isl_take isl_union_set *domain, __isl_take isl_union_set *range); + +__isl_export +__isl_give isl_union_map *isl_union_map_detect_equalities( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_set *isl_union_map_deltas(__isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_deltas_map( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_set_identity(__isl_take isl_union_set *uset); + +__isl_give isl_union_map *isl_union_map_project_out( + __isl_take isl_union_map *umap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_export +__isl_give isl_union_map *isl_union_map_project_out_all_params( + __isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_remove_divs( + __isl_take isl_union_map *bmap); + +__isl_export +__isl_give isl_union_set *isl_union_map_bind_range( + __isl_take isl_union_map *umap, __isl_take isl_multi_id *tuple); + +isl_bool isl_union_map_plain_is_empty(__isl_keep isl_union_map *umap); +__isl_export +isl_bool isl_union_map_is_empty(__isl_keep isl_union_map *umap); +__isl_export +isl_bool isl_union_map_is_single_valued(__isl_keep isl_union_map *umap); +isl_bool isl_union_map_plain_is_injective(__isl_keep isl_union_map *umap); +__isl_export +isl_bool isl_union_map_is_injective(__isl_keep isl_union_map *umap); +__isl_export +isl_bool isl_union_map_is_bijective(__isl_keep isl_union_map *umap); +isl_bool isl_union_map_is_identity(__isl_keep isl_union_map *umap); + +__isl_export +isl_bool isl_union_map_is_subset(__isl_keep isl_union_map *umap1, + __isl_keep isl_union_map *umap2); +__isl_export +isl_bool isl_union_map_is_equal(__isl_keep isl_union_map *umap1, + __isl_keep isl_union_map *umap2); +__isl_export +isl_bool isl_union_map_is_disjoint(__isl_keep isl_union_map *umap1, + __isl_keep isl_union_map *umap2); +__isl_export +isl_bool isl_union_map_is_strict_subset(__isl_keep isl_union_map *umap1, + __isl_keep isl_union_map *umap2); + +uint32_t isl_union_map_get_hash(__isl_keep isl_union_map *umap); + +isl_size isl_union_map_n_map(__isl_keep isl_union_map *umap); +__isl_export +isl_stat isl_union_map_foreach_map(__isl_keep isl_union_map *umap, + isl_stat (*fn)(__isl_take isl_map *map, void *user), void *user); +__isl_give isl_map_list *isl_union_map_get_map_list( + __isl_keep isl_union_map *umap); +__isl_export +isl_bool isl_union_map_every_map(__isl_keep isl_union_map *umap, + isl_bool (*test)(__isl_keep isl_map *map, void *user), void *user); +__isl_give isl_union_map *isl_union_map_remove_map_if( + __isl_take isl_union_map *umap, + isl_bool (*fn)(__isl_keep isl_map *map, void *user), void *user); +isl_bool isl_union_map_contains(__isl_keep isl_union_map *umap, + __isl_keep isl_space *space); +__isl_export +__isl_give isl_map *isl_union_map_extract_map(__isl_keep isl_union_map *umap, + __isl_take isl_space *dim); +__isl_export +isl_bool isl_union_map_isa_map(__isl_keep isl_union_map *umap); +__isl_give isl_map *isl_map_from_union_map(__isl_take isl_union_map *umap); + +__isl_give isl_basic_map *isl_union_map_sample(__isl_take isl_union_map *umap); + +__isl_overload +__isl_give isl_union_map *isl_union_map_fixed_power_val( + __isl_take isl_union_map *umap, __isl_take isl_val *exp); +__isl_give isl_union_map *isl_union_map_power(__isl_take isl_union_map *umap, + isl_bool *exact); +__isl_give isl_union_map *isl_union_map_transitive_closure( + __isl_take isl_union_map *umap, isl_bool *exact); + +__isl_give isl_union_map *isl_union_map_lex_lt_union_map( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_lex_le_union_map( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_lex_gt_union_map( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); +__isl_give isl_union_map *isl_union_map_lex_ge_union_map( + __isl_take isl_union_map *umap1, __isl_take isl_union_map *umap2); + +__isl_overload +__isl_give isl_union_map *isl_union_map_eq_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa); +__isl_give isl_union_map *isl_union_map_lex_lt_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa); +__isl_give isl_union_map *isl_union_map_lex_gt_at_multi_union_pw_aff( + __isl_take isl_union_map *umap, + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_give isl_union_map *isl_union_map_read_from_file(isl_ctx *ctx, + FILE *input); +__isl_constructor +__isl_give isl_union_map *isl_union_map_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give char *isl_union_map_to_str(__isl_keep isl_union_map *umap); +__isl_give isl_printer *isl_printer_print_union_map(__isl_take isl_printer *p, + __isl_keep isl_union_map *umap); +void isl_union_map_dump(__isl_keep isl_union_map *umap); + +__isl_export +__isl_give isl_union_set *isl_union_map_wrap(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_set_unwrap(__isl_take isl_union_set *uset); + +__isl_export +__isl_give isl_union_map *isl_union_map_zip(__isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_curry(__isl_take isl_union_map *umap); +__isl_give isl_union_map *isl_union_map_range_curry( + __isl_take isl_union_map *umap); +__isl_export +__isl_give isl_union_map *isl_union_map_uncurry(__isl_take isl_union_map *umap); + +__isl_give isl_union_map *isl_union_map_align_params( + __isl_take isl_union_map *umap, __isl_take isl_space *model); +__isl_give isl_union_set *isl_union_set_align_params( + __isl_take isl_union_set *uset, __isl_take isl_space *model); + +isl_ctx *isl_union_map_list_get_ctx(__isl_keep isl_union_map_list *list); __isl_give isl_union_map_list *isl_union_map_list_from_union_map( __isl_take isl_union_map *el); __isl_give isl_union_map_list *isl_union_map_list_alloc(isl_ctx *ctx, int n); __isl_give isl_union_map_list *isl_union_map_list_copy( __isl_keep isl_union_map_list *list); __isl_null isl_union_map_list *isl_union_map_list_free( __isl_take isl_union_map_list *list); __isl_give isl_union_map_list *isl_union_map_list_add( __isl_take isl_union_map_list *list, __isl_take isl_union_map *el); __isl_give isl_union_map_list *isl_union_map_list_insert( __isl_take isl_union_map_list *list, unsigned pos, __isl_take struct isl_union_map *el); __isl_give isl_union_map_list *isl_union_map_list_drop( __isl_take isl_union_map_list *list, unsigned first, unsigned n); __isl_give isl_union_map_list *isl_union_map_list_clear( __isl_take isl_union_map_list *list); __isl_give isl_union_map_list *isl_union_map_list_swap( __isl_take isl_union_map_list *list, unsigned pos1, unsigned pos2); __isl_give isl_union_map_list *isl_union_map_list_reverse( __isl_take isl_union_map_list *list); __isl_give isl_union_map_list *isl_union_map_list_concat( __isl_take isl_union_map_list *list1, __isl_take isl_union_map_list *list2); isl_size isl_union_map_list_size(__isl_keep isl_union_map_list *list); isl_size isl_union_map_list_n_union_map(__isl_keep isl_union_map_list *list); __isl_give isl_union_map *isl_union_map_list_get_at( __isl_keep isl_union_map_list *list, int index); __isl_give struct isl_union_map *isl_union_map_list_get_union_map( __isl_keep isl_union_map_list *list, int index); __isl_give struct isl_union_map_list *isl_union_map_list_set_union_map( __isl_take struct isl_union_map_list *list, int index, __isl_take struct isl_union_map *el); isl_stat isl_union_map_list_foreach(__isl_keep isl_union_map_list *list, isl_stat (*fn)(__isl_take isl_union_map *el, void *user), void *user); __isl_give isl_union_map_list *isl_union_map_list_map( __isl_take isl_union_map_list *list, __isl_give isl_union_map * (*fn)(__isl_take isl_union_map *el, void *user), void *user); __isl_give isl_union_map_list *isl_union_map_list_sort( __isl_take isl_union_map_list *list, int (*cmp)(__isl_keep struct isl_union_map *a, __isl_keep struct isl_union_map *b, void *user), void *user); isl_stat isl_union_map_list_foreach_scc(__isl_keep isl_union_map_list *list, isl_bool (*follows)(__isl_keep struct isl_union_map *a, __isl_keep struct isl_union_map *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_union_map_list *scc, void *user), void *fn_user); __isl_give char *isl_union_map_list_to_str( __isl_keep isl_union_map_list *list); __isl_give isl_printer *isl_printer_print_union_map_list( __isl_take isl_printer *p, __isl_keep isl_union_map_list *list); void isl_union_map_list_dump(__isl_keep isl_union_map_list *list); diff --git a/preproc-headers/72f4cb515f999eec5245f22e09553463ba74ba6d7c0f73a6d60398b5394e95c8 b/preproc-headers/72f4cb515f999eec5245f22e09553463ba74ba6d7c0f73a6d60398b5394e95c8 new file mode 100644 index 0000000..c8c90d8 --- /dev/null +++ b/preproc-headers/72f4cb515f999eec5245f22e09553463ba74ba6d7c0f73a6d60398b5394e95c8 @@ -0,0 +1,102 @@ +#line 13 +#include + +#include +#include +#include + + + + + +struct isl_mat; +typedef struct isl_mat isl_mat; + +isl_ctx *isl_mat_get_ctx(__isl_keep isl_mat *mat); + +__isl_give isl_mat *isl_mat_alloc(isl_ctx *ctx, + unsigned n_row, unsigned n_col); +struct isl_mat *isl_mat_extend(struct isl_mat *mat, + unsigned n_row, unsigned n_col); +struct isl_mat *isl_mat_identity(struct isl_ctx *ctx, unsigned n_row); +__isl_give isl_mat *isl_mat_copy(__isl_keep isl_mat *mat); +__isl_null isl_mat *isl_mat_free(__isl_take isl_mat *mat); + +isl_size isl_mat_rows(__isl_keep isl_mat *mat); +isl_size isl_mat_cols(__isl_keep isl_mat *mat); +__isl_give isl_val *isl_mat_get_element_val(__isl_keep isl_mat *mat, + int row, int col); +__isl_give isl_mat *isl_mat_set_element_si(__isl_take isl_mat *mat, + int row, int col, int v); +__isl_give isl_mat *isl_mat_set_element_val(__isl_take isl_mat *mat, + int row, int col, __isl_take isl_val *v); + +__isl_give isl_mat *isl_mat_swap_cols(__isl_take isl_mat *mat, + unsigned i, unsigned j); +__isl_give isl_mat *isl_mat_swap_rows(__isl_take isl_mat *mat, + unsigned i, unsigned j); + +__isl_give isl_vec *isl_mat_vec_product(__isl_take isl_mat *mat, + __isl_take isl_vec *vec); +__isl_give isl_vec *isl_vec_mat_product(__isl_take isl_vec *vec, + __isl_take isl_mat *mat); +__isl_give isl_vec *isl_mat_vec_inverse_product(__isl_take isl_mat *mat, + __isl_take isl_vec *vec); +__isl_give isl_mat *isl_mat_aff_direct_sum(__isl_take isl_mat *left, + __isl_take isl_mat *right); +__isl_give isl_mat *isl_mat_diagonal(__isl_take isl_mat *mat1, + __isl_take isl_mat *mat2); +__isl_give isl_mat *isl_mat_left_hermite(__isl_take isl_mat *M, int neg, + __isl_give isl_mat **U, __isl_give isl_mat **Q); +__isl_give isl_mat *isl_mat_lin_to_aff(__isl_take isl_mat *mat); +__isl_give isl_mat *isl_mat_inverse_product(__isl_take isl_mat *left, + __isl_take isl_mat *right); +__isl_give isl_mat *isl_mat_product(__isl_take isl_mat *left, + __isl_take isl_mat *right); +__isl_give isl_mat *isl_mat_transpose(__isl_take isl_mat *mat); +__isl_give isl_mat *isl_mat_right_inverse(__isl_take isl_mat *mat); +__isl_give isl_mat *isl_mat_right_kernel(__isl_take isl_mat *mat); + +__isl_give isl_mat *isl_mat_normalize(__isl_take isl_mat *mat); +__isl_give isl_mat *isl_mat_normalize_row(__isl_take isl_mat *mat, int row); + +__isl_give isl_mat *isl_mat_drop_cols(__isl_take isl_mat *mat, + unsigned col, unsigned n); +__isl_give isl_mat *isl_mat_drop_rows(__isl_take isl_mat *mat, + unsigned row, unsigned n); +__isl_give isl_mat *isl_mat_insert_cols(__isl_take isl_mat *mat, + unsigned col, unsigned n); +__isl_give isl_mat *isl_mat_insert_rows(__isl_take isl_mat *mat, + unsigned row, unsigned n); +__isl_give isl_mat *isl_mat_move_cols(__isl_take isl_mat *mat, + unsigned dst_col, unsigned src_col, unsigned n); +__isl_give isl_mat *isl_mat_add_rows(__isl_take isl_mat *mat, unsigned n); +__isl_give isl_mat *isl_mat_insert_zero_cols(__isl_take isl_mat *mat, + unsigned first, unsigned n); +__isl_give isl_mat *isl_mat_add_zero_cols(__isl_take isl_mat *mat, unsigned n); +__isl_give isl_mat *isl_mat_insert_zero_rows(__isl_take isl_mat *mat, + unsigned row, unsigned n); +__isl_give isl_mat *isl_mat_add_zero_rows(__isl_take isl_mat *mat, unsigned n); + +void isl_mat_col_add(__isl_keep isl_mat *mat, int dst_col, int src_col); + +__isl_give isl_mat *isl_mat_unimodular_complete(__isl_take isl_mat *M, int row); +__isl_give isl_mat *isl_mat_row_basis(__isl_take isl_mat *mat); +__isl_give isl_mat *isl_mat_row_basis_extension( + __isl_take isl_mat *mat1, __isl_take isl_mat *mat2); + +__isl_give isl_mat *isl_mat_from_row_vec(__isl_take isl_vec *vec); +__isl_give isl_mat *isl_mat_concat(__isl_take isl_mat *top, + __isl_take isl_mat *bot); +__isl_give isl_mat *isl_mat_vec_concat(__isl_take isl_mat *top, + __isl_take isl_vec *bot); + +isl_bool isl_mat_is_equal(__isl_keep isl_mat *mat1, __isl_keep isl_mat *mat2); +isl_bool isl_mat_has_linearly_independent_rows(__isl_keep isl_mat *mat1, + __isl_keep isl_mat *mat2); + +isl_size isl_mat_rank(__isl_keep isl_mat *mat); +int isl_mat_initial_non_zero_cols(__isl_keep isl_mat *mat); + +void isl_mat_print_internal(__isl_keep isl_mat *mat, FILE *out, int indent); +void isl_mat_dump(__isl_keep isl_mat *mat); diff --git a/isl_declaration_macros_expanded.h b/preproc-headers/75bdd384d9793d0adb0e1e3dbf44e2fba07f582322a93781f1cb8278717e26a2 similarity index 94% rename from isl_declaration_macros_expanded.h rename to preproc-headers/75bdd384d9793d0adb0e1e3dbf44e2fba07f582322a93781f1cb8278717e26a2 index f83fe63..389c9d0 100644 --- a/isl_declaration_macros_expanded.h +++ b/preproc-headers/75bdd384d9793d0adb0e1e3dbf44e2fba07f582322a93781f1cb8278717e26a2 @@ -38,2325 +38,458 @@ # 27 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 # 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 # 28 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 +#line 67 +# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 +# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 +#line 138 +# 36 "/usr/include/stdio.h" 2 3 4 +# 44 "/usr/include/stdio.h" 3 4 +#line 150 +# 64 "/usr/include/stdio.h" 3 4 +# 74 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/libio.h" 1 3 4 +# 31 "/usr/include/libio.h" 3 4 +# 1 "/usr/include/_G_config.h" 1 3 4 +# 15 "/usr/include/_G_config.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 +# 16 "/usr/include/_G_config.h" 2 3 4 +# 1 "/usr/include/wchar.h" 1 3 4 +# 82 "/usr/include/wchar.h" 3 4 +#line 178 +# 21 "/usr/include/_G_config.h" 2 3 4 +#line 189 +# 32 "/usr/include/libio.h" 2 3 4 +# 49 "/usr/include/libio.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 1 3 4 +# 40 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 3 4 +# 50 "/usr/include/libio.h" 2 3 4 +# 144 "/usr/include/libio.h" 3 4 +# 154 "/usr/include/libio.h" 3 4 +#line 211 +# 177 "/usr/include/libio.h" 3 4 +#line 222 +# 245 "/usr/include/libio.h" 3 4 +#line 263 +# 293 "/usr/include/libio.h" 3 4 +# 302 "/usr/include/libio.h" 3 4 +#line 287 +# 338 "/usr/include/libio.h" 3 4 +#line 309 +# 390 "/usr/include/libio.h" 3 4 +# 434 "/usr/include/libio.h" 3 4 +#line 328 +# 464 "/usr/include/libio.h" 3 4 +#line 340 +# 75 "/usr/include/stdio.h" 2 3 4 +# 90 "/usr/include/stdio.h" 3 4 +# 102 "/usr/include/stdio.h" 3 4 +#line 362 +# 164 "/usr/include/stdio.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 +# 165 "/usr/include/stdio.h" 2 3 4 +#line 396 +# 209 "/usr/include/stdio.h" 3 4 +#line 404 +# 227 "/usr/include/stdio.h" 3 4 +#line 422 +# 252 "/usr/include/stdio.h" 3 4 +# 266 "/usr/include/stdio.h" 3 4 +#line 440 +# 295 "/usr/include/stdio.h" 3 4 +# 306 "/usr/include/stdio.h" 3 4 +# 319 "/usr/include/stdio.h" 3 4 +#line 520 +# 412 "/usr/include/stdio.h" 3 4 +#line 544 +# 443 "/usr/include/stdio.h" 3 4 +#line 553 +# 463 "/usr/include/stdio.h" 3 4 +#line 577 +# 494 "/usr/include/stdio.h" 3 4 +#line 591 +# 522 "/usr/include/stdio.h" 3 4 +#line 610 +# 550 "/usr/include/stdio.h" 3 4 +# 561 "/usr/include/stdio.h" 3 4 +#line 635 +# 594 "/usr/include/stdio.h" 3 4 +#line 666 +# 638 "/usr/include/stdio.h" 3 4 - -# 121 "/usr/include/x86_64-linux-gnu/bits/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/typesizes.h" 1 3 4 -# 122 "/usr/include/x86_64-linux-gnu/bits/types.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 36 "/usr/include/stdio.h" 2 3 4 -# 44 "/usr/include/stdio.h" 3 4 - - - - - - - - - - -# 64 "/usr/include/stdio.h" 3 4 - -# 74 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/libio.h" 1 3 4 -# 31 "/usr/include/libio.h" 3 4 -# 1 "/usr/include/_G_config.h" 1 3 4 -# 15 "/usr/include/_G_config.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 16 "/usr/include/_G_config.h" 2 3 4 - - - - -# 1 "/usr/include/wchar.h" 1 3 4 -# 82 "/usr/include/wchar.h" 3 4 - - - - - - - - - - - - - -# 21 "/usr/include/_G_config.h" 2 3 4 - - - - - - - - - - -# 32 "/usr/include/libio.h" 2 3 4 -# 49 "/usr/include/libio.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 1 3 4 -# 40 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdarg.h" 3 4 - -# 50 "/usr/include/libio.h" 2 3 4 -# 144 "/usr/include/libio.h" 3 4 - -# 154 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - -# 177 "/usr/include/libio.h" 3 4 - - - - - - - - - - -# 245 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 293 "/usr/include/libio.h" 3 4 - -# 302 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 338 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 390 "/usr/include/libio.h" 3 4 - - - -# 434 "/usr/include/libio.h" 3 4 - - - - - - - - - - - - - - -# 464 "/usr/include/libio.h" 3 4 - - - - - - - - - - - -# 75 "/usr/include/stdio.h" 2 3 4 - - - - - -# 90 "/usr/include/stdio.h" 3 4 - -# 102 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 164 "/usr/include/stdio.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/stdio_lim.h" 1 3 4 -# 165 "/usr/include/stdio.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 209 "/usr/include/stdio.h" 3 4 - - - - - - - -# 227 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - -# 252 "/usr/include/stdio.h" 3 4 - -# 266 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - -# 295 "/usr/include/stdio.h" 3 4 - -# 306 "/usr/include/stdio.h" 3 4 - -# 319 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 412 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - -# 443 "/usr/include/stdio.h" 3 4 - - - - - - - - -# 463 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - -# 494 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 522 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - -# 550 "/usr/include/stdio.h" 3 4 - - -# 561 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 594 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 638 "/usr/include/stdio.h" 3 4 - - - -# 665 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 737 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - -# 773 "/usr/include/stdio.h" 3 4 - - - - - - -# 792 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - -# 815 "/usr/include/stdio.h" 3 4 - -# 824 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 -# 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 - - -# 854 "/usr/include/stdio.h" 2 3 4 - - - - - - - - - - -# 873 "/usr/include/stdio.h" 3 4 - - - - - - - - - - - - - -# 913 "/usr/include/stdio.h" 3 4 - - - - - - - - -# 943 "/usr/include/stdio.h" 3 4 - -# 14 "isl/include/isl/ctx.h" 2 -# 1 "/usr/include/stdlib.h" 1 3 4 -# 32 "/usr/include/stdlib.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 324 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 - -# 33 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 -# 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 - - - - - - -# 42 "/usr/include/stdlib.h" 2 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 -# 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 -# 1 "/usr/include/endian.h" 1 3 4 -# 36 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 -# 37 "/usr/include/endian.h" 2 3 4 -# 60 "/usr/include/endian.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 -# 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4 -# 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 -# 44 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 - - - - - -# 108 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 - - - - - -# 61 "/usr/include/endian.h" 2 3 4 -# 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 43 "/usr/include/stdlib.h" 2 3 4 -# 67 "/usr/include/stdlib.h" 3 4 - - - - - -# 95 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 139 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 305 "/usr/include/stdlib.h" 3 4 - - - - - - - - - -# 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 -# 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - -# 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - - - - - - - - - - -# 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - -# 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - -# 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/time.h" 1 3 4 -# 57 "/usr/include/time.h" 3 4 - - - - - - -# 73 "/usr/include/time.h" 3 4 - - - - - - -# 91 "/usr/include/time.h" 3 4 - -# 103 "/usr/include/time.h" 3 4 - -# 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 -# 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - - - - -# 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 - - - - - - - - - - - - -# 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 -# 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 -# 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - -# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4 - - - - - - - - - -# 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - - - - - - - - -# 1 "/usr/include/time.h" 1 3 4 -# 120 "/usr/include/time.h" 3 4 - - - - - -# 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - -# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 -# 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 - - - - - -# 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - - - - - - - - - -# 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - - - - - - - - - - - - - - - - -# 96 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - -# 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - -# 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - - - - - -# 131 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 - -# 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - -# 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 -# 24 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 - - - - - - - - - - - - -# 58 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 - -# 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - -# 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 -# 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 -# 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - -# 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - -# 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - -# 315 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 1 "/usr/include/alloca.h" 1 3 4 -# 24 "/usr/include/alloca.h" 3 4 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 25 "/usr/include/alloca.h" 2 3 4 - - - - - - - - - - - - - - -# 493 "/usr/include/stdlib.h" 2 3 4 - - - - - - - - - - - - -# 513 "/usr/include/stdlib.h" 3 4 - - - - - - - -# 530 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 578 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - -# 606 "/usr/include/stdlib.h" 3 4 - -# 620 "/usr/include/stdlib.h" 3 4 - -# 642 "/usr/include/stdlib.h" 3 4 - -# 663 "/usr/include/stdlib.h" 3 4 - -# 712 "/usr/include/stdlib.h" 3 4 - - - - - - - -# 734 "/usr/include/stdlib.h" 3 4 - - - - - - - - - -# 752 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - -# 775 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - -# 812 "/usr/include/stdlib.h" 3 4 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 899 "/usr/include/stdlib.h" 3 4 - - - - -# 951 "/usr/include/stdlib.h" 3 4 - - - - -# 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 -# 956 "/usr/include/stdlib.h" 2 3 4 -# 968 "/usr/include/stdlib.h" 3 4 - -# 15 "isl/include/isl/ctx.h" 2 - -# 1 "isl/include/isl/arg.h" 1 -# 13 "isl/include/isl/arg.h" -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 -# 147 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 - -# 14 "isl/include/isl/arg.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 290 "isl/include/isl/arg.h" - - - - -# 17 "isl/include/isl/ctx.h" 2 -# 68 "isl/include/isl/ctx.h" - - - - - - - - - - - - - - - - - - - - - - - - -# 111 "isl/include/isl/ctx.h" - - - -# 135 "isl/include/isl/ctx.h" - - -# 151 "isl/include/isl/ctx.h" - - - - - - - - - - - - - - - - - - -# 246 "isl/include/isl/ctx.h" - - - -# 14 "./isl/include/isl/list.h" 2 -# 1 "isl/include/isl/printer.h" 1 -# 11 "isl/include/isl/printer.h" - - - - - - - - - - - - - - - - -# 35 "isl/include/isl/printer.h" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 15 "./isl/include/isl/list.h" 2 -# 1 "" 2 -# 1 "./isl/include/isl/multi.h" 1 - - - -# 1 "isl/include/isl/space.h" 1 -# 14 "isl/include/isl/space.h" -# 1 "isl/include/isl/id.h" 1 - - - - -# 1 "isl/include/isl/list.h" 1 -# 6 "isl/include/isl/id.h" 2 - -# 1 "isl-supplementary/isl/stdint.h" 1 -# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4 -# 9 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 3 4 -# 1 "/usr/include/stdint.h" 1 3 4 -# 26 "/usr/include/stdint.h" 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 -# 27 "/usr/include/stdint.h" 2 3 4 -# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 -# 28 "/usr/include/stdint.h" 2 3 4 -# 48 "/usr/include/stdint.h" 3 4 - - - - - - - - -# 65 "/usr/include/stdint.h" 3 4 - - - - - - - - - - - - - - - - -# 90 "/usr/include/stdint.h" 3 4 - - - - - -# 103 "/usr/include/stdint.h" 3 4 - - - - - -# 119 "/usr/include/stdint.h" 3 4 - - - - -# 134 "/usr/include/stdint.h" 3 4 - - -# 10 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4 -# 1 "isl-supplementary/isl/stdint.h" 2 -# 8 "isl/include/isl/id.h" 2 - - - - - - - - - - - - - - - - - - - - - - - - - - - -# 15 "isl/include/isl/space.h" 2 - - - - - +# 665 "/usr/include/stdio.h" 3 4 +#line 724 +# 737 "/usr/include/stdio.h" 3 4 +#line 749 +# 773 "/usr/include/stdio.h" 3 4 +# 792 "/usr/include/stdio.h" 3 4 +#line 769 +# 815 "/usr/include/stdio.h" 3 4 +# 824 "/usr/include/stdio.h" 3 4 +#line 801 +# 1 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 1 3 4 +# 26 "/usr/include/x86_64-linux-gnu/bits/sys_errlist.h" 3 4 +# 854 "/usr/include/stdio.h" 2 3 4 +#line 816 +# 873 "/usr/include/stdio.h" 3 4 +#line 830 +# 913 "/usr/include/stdio.h" 3 4 +#line 839 +# 943 "/usr/include/stdio.h" 3 4 +# 14 "isl/include/isl/ctx.h" 2 +# 1 "/usr/include/stdlib.h" 1 3 4 +# 32 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 +# 324 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 +# 33 "/usr/include/stdlib.h" 2 3 4 +#line 856 +# 1 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 1 3 4 +# 50 "/usr/include/x86_64-linux-gnu/bits/waitflags.h" 3 4 - - +# 42 "/usr/include/stdlib.h" 2 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 1 3 4 +# 64 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 3 4 +# 1 "/usr/include/endian.h" 1 3 4 +# 36 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/endian.h" 1 3 4 +# 37 "/usr/include/endian.h" 2 3 4 +# 60 "/usr/include/endian.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 1 3 4 +# 28 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 +# 29 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/byteswap-16.h" 1 3 4 +# 36 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 2 3 4 +# 44 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 +# 108 "/usr/include/x86_64-linux-gnu/bits/byteswap.h" 3 4 - +# 61 "/usr/include/endian.h" 2 3 4 +# 65 "/usr/include/x86_64-linux-gnu/bits/waitstatus.h" 2 3 4 +#line 931 +# 43 "/usr/include/stdlib.h" 2 3 4 +# 67 "/usr/include/stdlib.h" 3 4 +# 95 "/usr/include/stdlib.h" 3 4 +#line 968 +# 139 "/usr/include/stdlib.h" 3 4 +#line 1048 +# 305 "/usr/include/stdlib.h" 3 4 +#line 1058 +# 1 "/usr/include/x86_64-linux-gnu/sys/types.h" 1 3 4 +# 27 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +#line 1082 +# 60 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +#line 1104 +# 98 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +#line 1112 +# 115 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +#line 1121 +# 132 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +# 1 "/usr/include/time.h" 1 3 4 +# 57 "/usr/include/time.h" 3 4 +# 73 "/usr/include/time.h" 3 4 +# 91 "/usr/include/time.h" 3 4 +# 103 "/usr/include/time.h" 3 4 +# 133 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 +# 146 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 +# 147 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 - - - - +# 194 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +#line 1164 +# 219 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/sys/select.h" 1 3 4 +# 30 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/select.h" 1 3 4 +# 22 "/usr/include/x86_64-linux-gnu/bits/select.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 +# 23 "/usr/include/x86_64-linux-gnu/bits/select.h" 2 3 4 +# 31 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 - +# 1 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 1 3 4 +# 22 "/usr/include/x86_64-linux-gnu/bits/sigset.h" 3 4 +#line 1185 +# 34 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 +#line 1195 +# 1 "/usr/include/time.h" 1 3 4 +# 120 "/usr/include/time.h" 3 4 +# 44 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/time.h" 1 3 4 +# 30 "/usr/include/x86_64-linux-gnu/bits/time.h" 3 4 +# 46 "/usr/include/x86_64-linux-gnu/sys/select.h" 2 3 4 +#line 1221 +# 64 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +#line 1241 +# 96 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +# 106 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +# 118 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +# 131 "/usr/include/x86_64-linux-gnu/sys/select.h" 3 4 +# 220 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 +# 1 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 1 3 4 +# 24 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 +#line 1273 +# 58 "/usr/include/x86_64-linux-gnu/sys/sysmacros.h" 3 4 +# 223 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 +#line 1297 +# 270 "/usr/include/x86_64-linux-gnu/sys/types.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 1 3 4 +# 21 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 +# 22 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 2 3 4 +# 60 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 +#line 1323 +# 90 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 +#line 1341 +# 124 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 +#line 1411 +# 211 "/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h" 3 4 +#line 1442 +# 271 "/usr/include/x86_64-linux-gnu/sys/types.h" 2 3 4 +# 315 "/usr/include/stdlib.h" 2 3 4 +#line 1624 +# 1 "/usr/include/alloca.h" 1 3 4 +# 24 "/usr/include/alloca.h" 3 4 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 +# 25 "/usr/include/alloca.h" 2 3 4 +#line 1642 +# 493 "/usr/include/stdlib.h" 2 3 4 +#line 1655 +# 513 "/usr/include/stdlib.h" 3 4 +#line 1663 +# 530 "/usr/include/stdlib.h" 3 4 +#line 1700 +# 578 "/usr/include/stdlib.h" 3 4 +#line 1719 +# 606 "/usr/include/stdlib.h" 3 4 - +# 620 "/usr/include/stdlib.h" 3 4 - +# 642 "/usr/include/stdlib.h" 3 4 +# 663 "/usr/include/stdlib.h" 3 4 +# 712 "/usr/include/stdlib.h" 3 4 +#line 1735 +# 734 "/usr/include/stdlib.h" 3 4 +#line 1745 +# 752 "/usr/include/stdlib.h" 3 4 +#line 1761 +# 775 "/usr/include/stdlib.h" 3 4 +#line 1788 +# 812 "/usr/include/stdlib.h" 3 4 +#line 1866 +# 899 "/usr/include/stdlib.h" 3 4 +# 951 "/usr/include/stdlib.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/stdlib-float.h" 1 3 4 +# 956 "/usr/include/stdlib.h" 2 3 4 +# 968 "/usr/include/stdlib.h" 3 4 +# 15 "isl/include/isl/ctx.h" 2 +# 1 "isl/include/isl/arg.h" 1 +# 13 "isl/include/isl/arg.h" +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 1 3 4 +# 147 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h" 3 4 +# 14 "isl/include/isl/arg.h" 2 +#line 1985 +# 290 "isl/include/isl/arg.h" +# 17 "isl/include/isl/ctx.h" 2 +# 68 "isl/include/isl/ctx.h" +#line 2016 +# 111 "isl/include/isl/ctx.h" +# 135 "isl/include/isl/ctx.h" +# 151 "isl/include/isl/ctx.h" +#line 2042 +# 246 "isl/include/isl/ctx.h" +# 14 "./isl/include/isl/list.h" 2 +# 1 "isl/include/isl/printer.h" 1 +# 11 "isl/include/isl/printer.h" +#line 2065 +# 35 "isl/include/isl/printer.h" +#line 2104 +# 15 "./isl/include/isl/list.h" 2 +# 1 "" 2 +# 1 "./isl/include/isl/multi.h" 1 +# 1 "isl/include/isl/space.h" 1 +# 14 "isl/include/isl/space.h" +# 1 "isl/include/isl/id.h" 1 +# 1 "isl/include/isl/list.h" 1 +# 6 "isl/include/isl/id.h" 2 +# 1 "isl-supplementary/isl/stdint.h" 1 +# 1 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 1 3 4 +# 9 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 3 4 +# 1 "/usr/include/stdint.h" 1 3 4 +# 26 "/usr/include/stdint.h" 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/wchar.h" 1 3 4 +# 27 "/usr/include/stdint.h" 2 3 4 +# 1 "/usr/include/x86_64-linux-gnu/bits/wordsize.h" 1 3 4 +# 28 "/usr/include/stdint.h" 2 3 4 +# 48 "/usr/include/stdint.h" 3 4 +#line 2138 +# 65 "/usr/include/stdint.h" 3 4 +#line 2155 +# 90 "/usr/include/stdint.h" 3 4 +# 103 "/usr/include/stdint.h" 3 4 +# 119 "/usr/include/stdint.h" 3 4 +# 134 "/usr/include/stdint.h" 3 4 +# 10 "/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stdint.h" 2 3 4 +# 1 "isl-supplementary/isl/stdint.h" 2 +# 8 "isl/include/isl/id.h" 2 +#line 2205 +# 15 "isl/include/isl/space.h" 2 +#line 2360 # 5 "./isl/include/isl/multi.h" 2 # 1 "isl/include/isl/set_type.h" 1 @@ -2365,27 +498,7 @@ # 1 "isl/include/isl/map_type.h" 1 # 11 "isl/include/isl/map_type.h" - - - - - - - - - - - - - - - - - - - - - +#line 2389 # 5 "isl/include/isl/set_type.h" 2 # 7 "./isl/include/isl/multi.h" 2 # 1 "" 2 diff --git a/preproc-headers/85990c7737ab3ff3557bc2b34a397c31e0b3711a5b79ead5be3c43f4ccdbcded b/preproc-headers/85990c7737ab3ff3557bc2b34a397c31e0b3711a5b79ead5be3c43f4ccdbcded new file mode 100644 index 0000000..818b848 --- /dev/null +++ b/preproc-headers/85990c7737ab3ff3557bc2b34a397c31e0b3711a5b79ead5be3c43f4ccdbcded @@ -0,0 +1,694 @@ +#line 13 +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + + +isl_size isl_basic_map_total_dim(__isl_keep const isl_basic_map *bmap); +isl_size isl_basic_map_dim(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type); + +isl_size isl_map_dim(__isl_keep isl_map *map, enum isl_dim_type type); + +isl_ctx *isl_basic_map_get_ctx(__isl_keep isl_basic_map *bmap); +isl_ctx *isl_map_get_ctx(__isl_keep isl_map *map); +__isl_give isl_space *isl_basic_map_get_space(__isl_keep isl_basic_map *bmap); +__isl_export +__isl_give isl_space *isl_map_get_space(__isl_keep isl_map *map); + +__isl_give isl_aff *isl_basic_map_get_div(__isl_keep isl_basic_map *bmap, + int pos); + +__isl_give isl_local_space *isl_basic_map_get_local_space( + __isl_keep isl_basic_map *bmap); + +__isl_give isl_basic_map *isl_basic_map_set_tuple_name( + __isl_take isl_basic_map *bmap, enum isl_dim_type type, const char *s); +const char *isl_basic_map_get_tuple_name(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type); +isl_bool isl_map_has_tuple_name(__isl_keep isl_map *map, + enum isl_dim_type type); +const char *isl_map_get_tuple_name(__isl_keep isl_map *map, + enum isl_dim_type type); +__isl_give isl_map *isl_map_set_tuple_name(__isl_take isl_map *map, + enum isl_dim_type type, const char *s); +const char *isl_basic_map_get_dim_name(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos); +isl_bool isl_map_has_dim_name(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); +const char *isl_map_get_dim_name(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); +__isl_give isl_basic_map *isl_basic_map_set_dim_name( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, const char *s); +__isl_give isl_map *isl_map_set_dim_name(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, const char *s); + +__isl_give isl_basic_map *isl_basic_map_set_tuple_id( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_map *isl_map_set_dim_id(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +isl_bool isl_basic_map_has_dim_id(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos); +isl_bool isl_map_has_dim_id(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_map_get_dim_id(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); +__isl_give isl_map *isl_map_set_tuple_id(__isl_take isl_map *map, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_map *isl_map_reset_tuple_id(__isl_take isl_map *map, + enum isl_dim_type type); +isl_bool isl_map_has_tuple_id(__isl_keep isl_map *map, enum isl_dim_type type); +__isl_give isl_id *isl_map_get_tuple_id(__isl_keep isl_map *map, + enum isl_dim_type type); +__isl_give isl_map *isl_map_reset_user(__isl_take isl_map *map); + +int isl_basic_map_find_dim_by_name(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type, const char *name); +int isl_map_find_dim_by_id(__isl_keep isl_map *map, enum isl_dim_type type, + __isl_keep isl_id *id); +int isl_map_find_dim_by_name(__isl_keep isl_map *map, enum isl_dim_type type, + const char *name); + +isl_bool isl_basic_map_is_rational(__isl_keep isl_basic_map *bmap); + +__isl_give isl_basic_map *isl_basic_map_identity(__isl_take isl_space *space); +__isl_null isl_basic_map *isl_basic_map_free(__isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_copy(__isl_keep isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_equal( + __isl_take isl_space *space, unsigned n_equal); +__isl_give isl_basic_map *isl_basic_map_less_at(__isl_take isl_space *space, + unsigned pos); +__isl_give isl_basic_map *isl_basic_map_more_at(__isl_take isl_space *space, + unsigned pos); +__isl_give isl_basic_map *isl_basic_map_empty(__isl_take isl_space *space); +__isl_give isl_basic_map *isl_basic_map_universe(__isl_take isl_space *space); +__isl_give isl_basic_map *isl_basic_map_nat_universe( + __isl_take isl_space *space); +__isl_give isl_basic_map *isl_basic_map_remove_redundancies( + __isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_remove_redundancies(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_map_simple_hull(__isl_take isl_map *map); +__isl_export +__isl_give isl_basic_map *isl_map_unshifted_simple_hull( + __isl_take isl_map *map); +__isl_give isl_basic_map *isl_map_plain_unshifted_simple_hull( + __isl_take isl_map *map); +__isl_give isl_basic_map *isl_map_unshifted_simple_hull_from_map_list( + __isl_take isl_map *map, __isl_take isl_map_list *list); + +__isl_export +__isl_give isl_basic_map *isl_basic_map_intersect_domain( + __isl_take isl_basic_map *bmap, + __isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_basic_map *isl_basic_map_intersect_range( + __isl_take isl_basic_map *bmap, + __isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_basic_map *isl_basic_map_intersect( + __isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); +__isl_give isl_basic_map *isl_basic_map_list_intersect( + __isl_take isl_basic_map_list *list); +__isl_export +__isl_give isl_map *isl_basic_map_union( + __isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); +__isl_export +__isl_give isl_basic_map *isl_basic_map_apply_domain( + __isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); +__isl_export +__isl_give isl_basic_map *isl_basic_map_apply_range( + __isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); +__isl_export +__isl_give isl_basic_map *isl_basic_map_affine_hull( + __isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_preimage_domain_multi_aff( + __isl_take isl_basic_map *bmap, __isl_take isl_multi_aff *ma); +__isl_give isl_basic_map *isl_basic_map_preimage_range_multi_aff( + __isl_take isl_basic_map *bmap, __isl_take isl_multi_aff *ma); +__isl_export +__isl_give isl_basic_map *isl_basic_map_reverse(__isl_take isl_basic_map *bmap); +__isl_give isl_basic_set *isl_basic_map_domain(__isl_take isl_basic_map *bmap); +__isl_give isl_basic_set *isl_basic_map_range(__isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_domain_map( + __isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_range_map( + __isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_remove_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_map *isl_basic_map_eliminate( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_export +__isl_give isl_basic_map *isl_basic_map_sample(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_basic_map *isl_basic_map_detect_equalities( + __isl_take isl_basic_map *bmap); +__isl_give isl_basic_map *isl_basic_map_read_from_file(isl_ctx *ctx, + FILE *input); +__isl_constructor +__isl_give isl_basic_map *isl_basic_map_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_map *isl_map_read_from_file(isl_ctx *ctx, FILE *input); +__isl_constructor +__isl_give isl_map *isl_map_read_from_str(isl_ctx *ctx, const char *str); +void isl_basic_map_dump(__isl_keep isl_basic_map *bmap); +void isl_map_dump(__isl_keep isl_map *map); +__isl_give char *isl_basic_map_to_str(__isl_keep isl_basic_map *bmap); +__isl_give isl_printer *isl_printer_print_basic_map( + __isl_take isl_printer *printer, __isl_keep isl_basic_map *bmap); +__isl_give char *isl_map_to_str(__isl_keep isl_map *map); +__isl_give isl_printer *isl_printer_print_map(__isl_take isl_printer *printer, + __isl_keep isl_map *map); +__isl_give isl_basic_map *isl_basic_map_fix_si(__isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_map *isl_basic_map_fix_val(__isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); +__isl_give isl_basic_map *isl_basic_map_lower_bound_si( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_map *isl_basic_map_upper_bound_si( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos, int value); + +__isl_give isl_basic_map *isl_basic_map_sum(__isl_take isl_basic_map *bmap1, + __isl_take isl_basic_map *bmap2); +__isl_give isl_basic_map *isl_basic_map_neg(__isl_take isl_basic_map *bmap); + +__isl_give isl_map *isl_map_sum(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_neg(__isl_take isl_map *map); +__isl_give isl_map *isl_map_floordiv_val(__isl_take isl_map *map, + __isl_take isl_val *d); + +__isl_export +isl_bool isl_basic_map_is_equal(__isl_keep isl_basic_map *bmap1, + __isl_keep isl_basic_map *bmap2); +isl_bool isl_basic_map_is_disjoint(__isl_keep isl_basic_map *bmap1, + __isl_keep isl_basic_map *bmap2); + +__isl_give isl_map *isl_basic_map_partial_lexmax( + __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_map *isl_basic_map_partial_lexmin( + __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_map *isl_map_partial_lexmax( + __isl_take isl_map *map, __isl_take isl_set *dom, + __isl_give isl_set **empty); +__isl_give isl_map *isl_map_partial_lexmin( + __isl_take isl_map *map, __isl_take isl_set *dom, + __isl_give isl_set **empty); +__isl_export +__isl_give isl_map *isl_basic_map_lexmin(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_basic_map_lexmax(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_map_lexmin(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_lexmax(__isl_take isl_map *map); +__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmin_pw_multi_aff( + __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_pw_multi_aff *isl_basic_map_partial_lexmax_pw_multi_aff( + __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_pw_multi_aff *isl_basic_map_lexmin_pw_multi_aff( + __isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_pw_multi_aff *isl_map_lexmin_pw_multi_aff( + __isl_take isl_map *map); +__isl_export +__isl_give isl_pw_multi_aff *isl_map_lexmax_pw_multi_aff( + __isl_take isl_map *map); + +void isl_basic_map_print_internal(__isl_keep isl_basic_map *bmap, + FILE *out, int indent); + +__isl_give isl_val *isl_basic_map_plain_get_val_if_fixed( + __isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned pos); + +isl_bool isl_basic_map_image_is_bounded(__isl_keep isl_basic_map *bmap); +isl_bool isl_basic_map_plain_is_universe(__isl_keep isl_basic_map *bmap); +isl_bool isl_basic_map_is_universe(__isl_keep isl_basic_map *bmap); +isl_bool isl_basic_map_plain_is_empty(__isl_keep isl_basic_map *bmap); +__isl_export +isl_bool isl_basic_map_is_empty(__isl_keep isl_basic_map *bmap); +__isl_export +isl_bool isl_basic_map_is_subset(__isl_keep isl_basic_map *bmap1, + __isl_keep isl_basic_map *bmap2); +isl_bool isl_basic_map_is_strict_subset(__isl_keep isl_basic_map *bmap1, + __isl_keep isl_basic_map *bmap2); + +__isl_export +__isl_give isl_map *isl_map_universe(__isl_take isl_space *space); +__isl_give isl_map *isl_map_nat_universe(__isl_take isl_space *dim); +__isl_export +__isl_give isl_map *isl_map_empty(__isl_take isl_space *space); +__isl_give isl_map *isl_map_identity(__isl_take isl_space *dim); +__isl_give isl_map *isl_map_lex_lt_first(__isl_take isl_space *dim, unsigned n); +__isl_give isl_map *isl_map_lex_le_first(__isl_take isl_space *dim, unsigned n); +__isl_give isl_map *isl_map_lex_lt(__isl_take isl_space *set_dim); +__isl_give isl_map *isl_map_lex_le(__isl_take isl_space *set_dim); +__isl_give isl_map *isl_map_lex_gt_first(__isl_take isl_space *dim, unsigned n); +__isl_give isl_map *isl_map_lex_ge_first(__isl_take isl_space *dim, unsigned n); +__isl_give isl_map *isl_map_lex_gt(__isl_take isl_space *set_dim); +__isl_give isl_map *isl_map_lex_ge(__isl_take isl_space *set_dim); +__isl_null isl_map *isl_map_free(__isl_take isl_map *map); +__isl_give isl_map *isl_map_copy(__isl_keep isl_map *map); +__isl_export +__isl_give isl_map *isl_map_reverse(__isl_take isl_map *map); +__isl_give isl_map *isl_map_range_reverse(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_union( + __isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_union_disjoint( + __isl_take isl_map *map1, __isl_take isl_map *map2); +__isl_export +__isl_give isl_map *isl_map_intersect_domain( + __isl_take isl_map *map, + __isl_take isl_set *set); +__isl_export +__isl_give isl_map *isl_map_intersect_range( + __isl_take isl_map *map, + __isl_take isl_set *set); +__isl_give isl_map *isl_map_intersect_domain_factor_range( + __isl_take isl_map *map, __isl_take isl_map *factor); +__isl_give isl_map *isl_map_intersect_range_factor_domain( + __isl_take isl_map *map, __isl_take isl_map *factor); +__isl_give isl_map *isl_map_intersect_range_factor_range( + __isl_take isl_map *map, __isl_take isl_map *factor); +__isl_export +__isl_give isl_map *isl_map_apply_domain( + __isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_export +__isl_give isl_map *isl_map_apply_range( + __isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_overload +__isl_give isl_map *isl_map_preimage_domain_multi_aff(__isl_take isl_map *map, + __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_map *isl_map_preimage_range_multi_aff(__isl_take isl_map *map, + __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_map *isl_map_preimage_domain_pw_multi_aff( + __isl_take isl_map *map, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_map *isl_map_preimage_range_pw_multi_aff( + __isl_take isl_map *map, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_map *isl_map_preimage_domain_multi_pw_aff( + __isl_take isl_map *map, __isl_take isl_multi_pw_aff *mpa); +__isl_give isl_basic_map *isl_basic_map_product( + __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); +__isl_give isl_map *isl_map_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_basic_map *isl_basic_map_domain_product( + __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); +__isl_give isl_basic_map *isl_basic_map_range_product( + __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); +__isl_export +__isl_give isl_map *isl_map_domain_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_export +__isl_give isl_map *isl_map_range_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_basic_map *isl_basic_map_flat_product( + __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); +__isl_give isl_map *isl_map_flat_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_basic_map *isl_basic_map_flat_range_product( + __isl_take isl_basic_map *bmap1, __isl_take isl_basic_map *bmap2); +__isl_give isl_map *isl_map_flat_domain_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_flat_range_product(__isl_take isl_map *map1, + __isl_take isl_map *map2); +isl_bool isl_map_domain_is_wrapping(__isl_keep isl_map *map); +isl_bool isl_map_range_is_wrapping(__isl_keep isl_map *map); +isl_bool isl_map_is_product(__isl_keep isl_map *map); +__isl_export +__isl_give isl_map *isl_map_factor_domain(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_factor_range(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_domain_factor_domain(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_domain_factor_range(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_range_factor_domain(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_range_factor_range(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_intersect(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_export +__isl_give isl_map *isl_map_intersect_params(__isl_take isl_map *map, + __isl_take isl_set *params); +__isl_export +__isl_give isl_map *isl_map_subtract( + __isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_subtract_domain(__isl_take isl_map *map, + __isl_take isl_set *dom); +__isl_give isl_map *isl_map_subtract_range(__isl_take isl_map *map, + __isl_take isl_set *dom); +__isl_export +__isl_give isl_map *isl_map_complement(__isl_take isl_map *map); +struct isl_map *isl_map_fix_input_si(struct isl_map *map, + unsigned input, int value); +__isl_give isl_map *isl_map_fix_si(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_map *isl_map_fix_val(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); +__isl_give isl_map *isl_map_lower_bound_si(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_map *isl_map_upper_bound_si(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, int value); +__isl_export +__isl_give isl_basic_set *isl_basic_map_deltas(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_set *isl_map_deltas(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_basic_map_deltas_map( + __isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_deltas_map(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_detect_equalities(__isl_take isl_map *map); +__isl_export +__isl_give isl_basic_map *isl_map_affine_hull(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_map_convex_hull(__isl_take isl_map *map); +__isl_export +__isl_give isl_basic_map *isl_map_polyhedral_hull(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_basic_map_add_dims(__isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned n); +__isl_give isl_map *isl_map_add_dims(__isl_take isl_map *map, + enum isl_dim_type type, unsigned n); +__isl_give isl_basic_map *isl_basic_map_insert_dims( + __isl_take isl_basic_map *bmap, enum isl_dim_type type, + unsigned pos, unsigned n); +__isl_give isl_map *isl_map_insert_dims(__isl_take isl_map *map, + enum isl_dim_type type, unsigned pos, unsigned n); +__isl_give isl_basic_map *isl_basic_map_move_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_map *isl_map_move_dims(__isl_take isl_map *map, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_basic_map *isl_basic_map_project_out( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_map *isl_map_project_out(__isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_export +__isl_give isl_map *isl_map_project_out_all_params(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_basic_map_remove_divs( + __isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_remove_unknown_divs(__isl_take isl_map *map); +__isl_give isl_map *isl_map_remove_divs(__isl_take isl_map *map); +__isl_give isl_map *isl_map_eliminate(__isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_map *isl_map_remove_dims(__isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_map *isl_basic_map_remove_divs_involving_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_map *isl_map_remove_divs_involving_dims(__isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); +struct isl_map *isl_map_remove_inputs(struct isl_map *map, + unsigned first, unsigned n); + +__isl_give isl_basic_map *isl_basic_map_equate(__isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_basic_map *isl_basic_map_order_ge(__isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_order_ge(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_order_le(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_equate(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_oppose(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_order_lt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_basic_map *isl_basic_map_order_gt(__isl_take isl_basic_map *bmap, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); +__isl_give isl_map *isl_map_order_gt(__isl_take isl_map *map, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); + +__isl_export +__isl_give isl_map *isl_set_identity(__isl_take isl_set *set); + +__isl_export +isl_bool isl_basic_set_is_wrapping(__isl_keep isl_basic_set *bset); +__isl_export +isl_bool isl_set_is_wrapping(__isl_keep isl_set *set); +__isl_give isl_basic_set *isl_basic_map_wrap(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_set *isl_map_wrap(__isl_take isl_map *map); +__isl_give isl_basic_map *isl_basic_set_unwrap(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_map *isl_set_unwrap(__isl_take isl_set *set); +__isl_export +__isl_give isl_basic_map *isl_basic_map_flatten(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_map_flatten(__isl_take isl_map *map); +__isl_export +__isl_give isl_basic_map *isl_basic_map_flatten_domain( + __isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_basic_map *isl_basic_map_flatten_range( + __isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_map_flatten_domain(__isl_take isl_map *map); +__isl_export +__isl_give isl_map *isl_map_flatten_range(__isl_take isl_map *map); +__isl_export +__isl_give isl_basic_set *isl_basic_set_flatten(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_set *isl_set_flatten(__isl_take isl_set *set); +__isl_give isl_map *isl_set_flatten_map(__isl_take isl_set *set); +__isl_give isl_set *isl_map_params(__isl_take isl_map *map); +__isl_export +__isl_give isl_set *isl_map_domain(__isl_take isl_map *bmap); +__isl_export +__isl_give isl_set *isl_map_range(__isl_take isl_map *map); +__isl_give isl_map *isl_map_domain_map(__isl_take isl_map *map); +__isl_give isl_map *isl_map_range_map(__isl_take isl_map *map); +__isl_give isl_map *isl_set_wrapped_domain_map(__isl_take isl_set *set); +__isl_constructor +__isl_give isl_map *isl_map_from_basic_map(__isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_from_domain(__isl_take isl_set *set); +__isl_give isl_basic_map *isl_basic_map_from_domain( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_map *isl_basic_map_from_range( + __isl_take isl_basic_set *bset); +__isl_give isl_map *isl_map_from_range(__isl_take isl_set *set); +__isl_give isl_basic_map *isl_basic_map_from_domain_and_range( + __isl_take isl_basic_set *domain, __isl_take isl_basic_set *range); +__isl_give isl_map *isl_map_from_domain_and_range(__isl_take isl_set *domain, + __isl_take isl_set *range); +__isl_export +__isl_give isl_basic_map *isl_map_sample(__isl_take isl_map *map); + +__isl_export +__isl_give isl_set *isl_map_bind_domain(__isl_take isl_map *map, + __isl_take isl_multi_id *tuple); +__isl_export +__isl_give isl_set *isl_map_bind_range(__isl_take isl_map *map, + __isl_take isl_multi_id *tuple); + +isl_bool isl_map_plain_is_empty(__isl_keep isl_map *map); +isl_bool isl_map_plain_is_universe(__isl_keep isl_map *map); +__isl_export +isl_bool isl_map_is_empty(__isl_keep isl_map *map); +__isl_export +isl_bool isl_map_is_subset(__isl_keep isl_map *map1, __isl_keep isl_map *map2); +__isl_export +isl_bool isl_map_is_strict_subset(__isl_keep isl_map *map1, + __isl_keep isl_map *map2); +__isl_export +isl_bool isl_map_is_equal(__isl_keep isl_map *map1, __isl_keep isl_map *map2); +__isl_export +isl_bool isl_map_is_disjoint(__isl_keep isl_map *map1, + __isl_keep isl_map *map2); +isl_bool isl_basic_map_is_single_valued(__isl_keep isl_basic_map *bmap); +isl_bool isl_map_plain_is_single_valued(__isl_keep isl_map *map); +__isl_export +isl_bool isl_map_is_single_valued(__isl_keep isl_map *map); +isl_bool isl_map_plain_is_injective(__isl_keep isl_map *map); +__isl_export +isl_bool isl_map_is_injective(__isl_keep isl_map *map); +__isl_export +isl_bool isl_map_is_bijective(__isl_keep isl_map *map); +isl_bool isl_map_is_identity(__isl_keep isl_map *map); +int isl_map_is_translation(__isl_keep isl_map *map); +isl_bool isl_map_has_equal_space(__isl_keep isl_map *map1, + __isl_keep isl_map *map2); + +isl_bool isl_basic_map_can_zip(__isl_keep isl_basic_map *bmap); +isl_bool isl_map_can_zip(__isl_keep isl_map *map); +__isl_give isl_basic_map *isl_basic_map_zip(__isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_zip(__isl_take isl_map *map); + +isl_bool isl_basic_map_can_curry(__isl_keep isl_basic_map *bmap); +isl_bool isl_map_can_curry(__isl_keep isl_map *map); +__isl_give isl_basic_map *isl_basic_map_curry(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_map_curry(__isl_take isl_map *map); + +isl_bool isl_map_can_range_curry(__isl_keep isl_map *map); +__isl_give isl_map *isl_map_range_curry(__isl_take isl_map *map); + +isl_bool isl_basic_map_can_uncurry(__isl_keep isl_basic_map *bmap); +isl_bool isl_map_can_uncurry(__isl_keep isl_map *map); +__isl_give isl_basic_map *isl_basic_map_uncurry(__isl_take isl_basic_map *bmap); +__isl_export +__isl_give isl_map *isl_map_uncurry(__isl_take isl_map *map); + +__isl_give isl_map *isl_map_make_disjoint(__isl_take isl_map *map); +__isl_give isl_map *isl_basic_map_compute_divs(__isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_compute_divs(__isl_take isl_map *map); +ISL_DEPRECATED +__isl_give isl_map *isl_map_align_divs(__isl_take isl_map *map); + +__isl_give isl_basic_map *isl_basic_map_drop_constraints_involving_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_map *isl_basic_map_drop_constraints_not_involving_dims( + __isl_take isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_map *isl_map_drop_constraints_involving_dims( + __isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_map *isl_map_drop_constraints_not_involving_dims( + __isl_take isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); + +isl_bool isl_basic_map_involves_dims(__isl_keep isl_basic_map *bmap, + enum isl_dim_type type, unsigned first, unsigned n); +isl_bool isl_map_involves_dims(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned first, unsigned n); + +void isl_map_print_internal(__isl_keep isl_map *map, FILE *out, int indent); + +__isl_give isl_val *isl_map_plain_get_val_if_fixed(__isl_keep isl_map *map, + enum isl_dim_type type, unsigned pos); + +__isl_give isl_basic_map *isl_basic_map_gist_domain( + __isl_take isl_basic_map *bmap, __isl_take isl_basic_set *context); +__isl_export +__isl_give isl_basic_map *isl_basic_map_gist(__isl_take isl_basic_map *bmap, + __isl_take isl_basic_map *context); +__isl_export +__isl_give isl_map *isl_map_gist(__isl_take isl_map *map, + __isl_take isl_map *context); +__isl_export +__isl_give isl_map *isl_map_gist_domain(__isl_take isl_map *map, + __isl_take isl_set *context); +__isl_give isl_map *isl_map_gist_range(__isl_take isl_map *map, + __isl_take isl_set *context); +__isl_give isl_map *isl_map_gist_params(__isl_take isl_map *map, + __isl_take isl_set *context); +__isl_give isl_map *isl_map_gist_basic_map(__isl_take isl_map *map, + __isl_take isl_basic_map *context); + +__isl_give isl_stride_info *isl_map_get_range_stride_info( + __isl_keep isl_map *map, int pos); +__isl_export +__isl_give isl_fixed_box *isl_map_get_range_simple_fixed_box_hull( + __isl_keep isl_map *map); + +__isl_export +__isl_give isl_map *isl_map_coalesce(__isl_take isl_map *map); + +isl_bool isl_map_plain_is_equal(__isl_keep isl_map *map1, + __isl_keep isl_map *map2); + +uint32_t isl_map_get_hash(__isl_keep isl_map *map); + +isl_size isl_map_n_basic_map(__isl_keep isl_map *map); +__isl_export +isl_stat isl_map_foreach_basic_map(__isl_keep isl_map *map, + isl_stat (*fn)(__isl_take isl_basic_map *bmap, void *user), void *user); +__isl_give isl_basic_map_list *isl_map_get_basic_map_list( + __isl_keep isl_map *map); + +__isl_give isl_map *isl_map_fixed_power_val(__isl_take isl_map *map, + __isl_take isl_val *exp); +__isl_give isl_map *isl_map_power(__isl_take isl_map *map, isl_bool *exact); +__isl_give isl_map *isl_map_reaching_path_lengths(__isl_take isl_map *map, + isl_bool *exact); +__isl_give isl_map *isl_map_transitive_closure(__isl_take isl_map *map, + isl_bool *exact); + +__isl_give isl_map *isl_map_lex_le_map(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_lex_lt_map(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_lex_ge_map(__isl_take isl_map *map1, + __isl_take isl_map *map2); +__isl_give isl_map *isl_map_lex_gt_map(__isl_take isl_map *map1, + __isl_take isl_map *map2); + +__isl_give isl_basic_map *isl_basic_map_align_params( + __isl_take isl_basic_map *bmap, __isl_take isl_space *model); +__isl_give isl_map *isl_map_align_params(__isl_take isl_map *map, + __isl_take isl_space *model); +__isl_give isl_basic_map *isl_basic_map_drop_unused_params( + __isl_take isl_basic_map *bmap); +__isl_give isl_map *isl_map_drop_unused_params(__isl_take isl_map *map); + +__isl_give isl_mat *isl_basic_map_equalities_matrix( + __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, + enum isl_dim_type c4, enum isl_dim_type c5); +__isl_give isl_mat *isl_basic_map_inequalities_matrix( + __isl_keep isl_basic_map *bmap, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, + enum isl_dim_type c4, enum isl_dim_type c5); +__isl_give isl_basic_map *isl_basic_map_from_constraint_matrices( + __isl_take isl_space *dim, + __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, + enum isl_dim_type c4, enum isl_dim_type c5); + +__isl_give isl_basic_map *isl_basic_map_from_aff(__isl_take isl_aff *aff); +__isl_give isl_basic_map *isl_basic_map_from_multi_aff( + __isl_take isl_multi_aff *maff); +__isl_give isl_basic_map *isl_basic_map_from_aff_list( + __isl_take isl_space *domain_space, __isl_take isl_aff_list *list); + +__isl_give isl_map *isl_map_from_aff(__isl_take isl_aff *aff); +__isl_give isl_map *isl_map_from_multi_aff(__isl_take isl_multi_aff *maff); + +__isl_give isl_pw_aff *isl_map_dim_min(__isl_take isl_map *map, int pos); +__isl_give isl_pw_aff *isl_map_dim_max(__isl_take isl_map *map, int pos); + +isl_ctx *isl_basic_map_list_get_ctx(__isl_keep isl_basic_map_list *list); __isl_give isl_basic_map_list *isl_basic_map_list_from_basic_map( __isl_take isl_basic_map *el); __isl_give isl_basic_map_list *isl_basic_map_list_alloc(isl_ctx *ctx, int n); __isl_give isl_basic_map_list *isl_basic_map_list_copy( __isl_keep isl_basic_map_list *list); __isl_null isl_basic_map_list *isl_basic_map_list_free( __isl_take isl_basic_map_list *list); __isl_give isl_basic_map_list *isl_basic_map_list_add( __isl_take isl_basic_map_list *list, __isl_take isl_basic_map *el); __isl_give isl_basic_map_list *isl_basic_map_list_insert( __isl_take isl_basic_map_list *list, unsigned pos, __isl_take struct isl_basic_map *el); __isl_give isl_basic_map_list *isl_basic_map_list_drop( __isl_take isl_basic_map_list *list, unsigned first, unsigned n); __isl_give isl_basic_map_list *isl_basic_map_list_clear( __isl_take isl_basic_map_list *list); __isl_give isl_basic_map_list *isl_basic_map_list_swap( __isl_take isl_basic_map_list *list, unsigned pos1, unsigned pos2); __isl_give isl_basic_map_list *isl_basic_map_list_reverse( __isl_take isl_basic_map_list *list); __isl_give isl_basic_map_list *isl_basic_map_list_concat( __isl_take isl_basic_map_list *list1, __isl_take isl_basic_map_list *list2); isl_size isl_basic_map_list_size(__isl_keep isl_basic_map_list *list); isl_size isl_basic_map_list_n_basic_map(__isl_keep isl_basic_map_list *list); __isl_give isl_basic_map *isl_basic_map_list_get_at( __isl_keep isl_basic_map_list *list, int index); __isl_give struct isl_basic_map *isl_basic_map_list_get_basic_map( __isl_keep isl_basic_map_list *list, int index); __isl_give struct isl_basic_map_list *isl_basic_map_list_set_basic_map( __isl_take struct isl_basic_map_list *list, int index, __isl_take struct isl_basic_map *el); isl_stat isl_basic_map_list_foreach(__isl_keep isl_basic_map_list *list, isl_stat (*fn)(__isl_take isl_basic_map *el, void *user), void *user); __isl_give isl_basic_map_list *isl_basic_map_list_map( __isl_take isl_basic_map_list *list, __isl_give isl_basic_map * (*fn)(__isl_take isl_basic_map *el, void *user), void *user); __isl_give isl_basic_map_list *isl_basic_map_list_sort( __isl_take isl_basic_map_list *list, int (*cmp)(__isl_keep struct isl_basic_map *a, __isl_keep struct isl_basic_map *b, void *user), void *user); isl_stat isl_basic_map_list_foreach_scc(__isl_keep isl_basic_map_list *list, isl_bool (*follows)(__isl_keep struct isl_basic_map *a, __isl_keep struct isl_basic_map *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_basic_map_list *scc, void *user), void *fn_user); __isl_give char *isl_basic_map_list_to_str( __isl_keep isl_basic_map_list *list); __isl_give isl_printer *isl_printer_print_basic_map_list( __isl_take isl_printer *p, __isl_keep isl_basic_map_list *list); void isl_basic_map_list_dump(__isl_keep isl_basic_map_list *list); +isl_ctx *isl_map_list_get_ctx(__isl_keep isl_map_list *list); __isl_give isl_map_list *isl_map_list_from_map( __isl_take isl_map *el); __isl_give isl_map_list *isl_map_list_alloc(isl_ctx *ctx, int n); __isl_give isl_map_list *isl_map_list_copy( __isl_keep isl_map_list *list); __isl_null isl_map_list *isl_map_list_free( __isl_take isl_map_list *list); __isl_give isl_map_list *isl_map_list_add( __isl_take isl_map_list *list, __isl_take isl_map *el); __isl_give isl_map_list *isl_map_list_insert( __isl_take isl_map_list *list, unsigned pos, __isl_take struct isl_map *el); __isl_give isl_map_list *isl_map_list_drop( __isl_take isl_map_list *list, unsigned first, unsigned n); __isl_give isl_map_list *isl_map_list_clear( __isl_take isl_map_list *list); __isl_give isl_map_list *isl_map_list_swap( __isl_take isl_map_list *list, unsigned pos1, unsigned pos2); __isl_give isl_map_list *isl_map_list_reverse( __isl_take isl_map_list *list); __isl_give isl_map_list *isl_map_list_concat( __isl_take isl_map_list *list1, __isl_take isl_map_list *list2); isl_size isl_map_list_size(__isl_keep isl_map_list *list); isl_size isl_map_list_n_map(__isl_keep isl_map_list *list); __isl_give isl_map *isl_map_list_get_at( __isl_keep isl_map_list *list, int index); __isl_give struct isl_map *isl_map_list_get_map( __isl_keep isl_map_list *list, int index); __isl_give struct isl_map_list *isl_map_list_set_map( __isl_take struct isl_map_list *list, int index, __isl_take struct isl_map *el); isl_stat isl_map_list_foreach(__isl_keep isl_map_list *list, isl_stat (*fn)(__isl_take isl_map *el, void *user), void *user); __isl_give isl_map_list *isl_map_list_map( __isl_take isl_map_list *list, __isl_give isl_map * (*fn)(__isl_take isl_map *el, void *user), void *user); __isl_give isl_map_list *isl_map_list_sort( __isl_take isl_map_list *list, int (*cmp)(__isl_keep struct isl_map *a, __isl_keep struct isl_map *b, void *user), void *user); isl_stat isl_map_list_foreach_scc(__isl_keep isl_map_list *list, isl_bool (*follows)(__isl_keep struct isl_map *a, __isl_keep struct isl_map *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_map_list *scc, void *user), void *fn_user); __isl_give char *isl_map_list_to_str( __isl_keep isl_map_list *list); __isl_give isl_printer *isl_printer_print_map_list( __isl_take isl_printer *p, __isl_keep isl_map_list *list); void isl_map_list_dump(__isl_keep isl_map_list *list); diff --git a/preproc-headers/8fa89ec6fec498d28a0e86655c678c4b8d2fb885ffd1bb39e724edf1340d4687 b/preproc-headers/8fa89ec6fec498d28a0e86655c678c4b8d2fb885ffd1bb39e724edf1340d4687 new file mode 100644 index 0000000..7a8c1e2 --- /dev/null +++ b/preproc-headers/8fa89ec6fec498d28a0e86655c678c4b8d2fb885ffd1bb39e724edf1340d4687 @@ -0,0 +1,74 @@ + + + +#include + + + + + +struct __isl_export isl_ast_expr; +typedef struct isl_ast_expr isl_ast_expr; + +struct __isl_export isl_ast_node; +typedef struct isl_ast_node isl_ast_node; + +enum isl_ast_expr_op_type { + isl_ast_expr_op_error = -1, + isl_ast_expr_op_and, + isl_ast_expr_op_and_then, + isl_ast_expr_op_or, + isl_ast_expr_op_or_else, + isl_ast_expr_op_max, + isl_ast_expr_op_min, + isl_ast_expr_op_minus, + isl_ast_expr_op_add, + isl_ast_expr_op_sub, + isl_ast_expr_op_mul, + isl_ast_expr_op_div, + isl_ast_expr_op_fdiv_q, + isl_ast_expr_op_pdiv_q, + isl_ast_expr_op_pdiv_r, + isl_ast_expr_op_zdiv_r, + isl_ast_expr_op_cond, + isl_ast_expr_op_select, + isl_ast_expr_op_eq, + isl_ast_expr_op_le, + isl_ast_expr_op_lt, + isl_ast_expr_op_ge, + isl_ast_expr_op_gt, + isl_ast_expr_op_call, + isl_ast_expr_op_access, + isl_ast_expr_op_member, + isl_ast_expr_op_address_of +}; +#line 75 +enum isl_ast_expr_type { + isl_ast_expr_error = -1, + isl_ast_expr_op, + isl_ast_expr_id, + isl_ast_expr_int +}; + +enum isl_ast_node_type { + isl_ast_node_error = -1, + isl_ast_node_for = 1, + isl_ast_node_if, + isl_ast_node_block, + isl_ast_node_mark, + isl_ast_node_user +}; + +enum isl_ast_loop_type { + isl_ast_loop_error = -1, + isl_ast_loop_default = 0, + isl_ast_loop_atomic, + isl_ast_loop_unroll, + isl_ast_loop_separate +}; + +struct isl_ast_print_options; +typedef struct isl_ast_print_options isl_ast_print_options; + +struct isl_ast_expr; struct isl_ast_expr_list; typedef struct isl_ast_expr_list isl_ast_expr_list; isl_ctx *isl_ast_expr_list_get_ctx(__isl_keep isl_ast_expr_list *list); __isl_give isl_ast_expr_list *isl_ast_expr_list_from_ast_expr( __isl_take isl_ast_expr *el); __isl_give isl_ast_expr_list *isl_ast_expr_list_alloc(isl_ctx *ctx, int n); __isl_give isl_ast_expr_list *isl_ast_expr_list_copy( __isl_keep isl_ast_expr_list *list); __isl_null isl_ast_expr_list *isl_ast_expr_list_free( __isl_take isl_ast_expr_list *list); __isl_give isl_ast_expr_list *isl_ast_expr_list_add( __isl_take isl_ast_expr_list *list, __isl_take isl_ast_expr *el); __isl_give isl_ast_expr_list *isl_ast_expr_list_insert( __isl_take isl_ast_expr_list *list, unsigned pos, __isl_take struct isl_ast_expr *el); __isl_give isl_ast_expr_list *isl_ast_expr_list_drop( __isl_take isl_ast_expr_list *list, unsigned first, unsigned n); __isl_give isl_ast_expr_list *isl_ast_expr_list_clear( __isl_take isl_ast_expr_list *list); __isl_give isl_ast_expr_list *isl_ast_expr_list_swap( __isl_take isl_ast_expr_list *list, unsigned pos1, unsigned pos2); __isl_give isl_ast_expr_list *isl_ast_expr_list_reverse( __isl_take isl_ast_expr_list *list); __isl_give isl_ast_expr_list *isl_ast_expr_list_concat( __isl_take isl_ast_expr_list *list1, __isl_take isl_ast_expr_list *list2); isl_size isl_ast_expr_list_size(__isl_keep isl_ast_expr_list *list); isl_size isl_ast_expr_list_n_ast_expr(__isl_keep isl_ast_expr_list *list); __isl_give isl_ast_expr *isl_ast_expr_list_get_at( __isl_keep isl_ast_expr_list *list, int index); __isl_give struct isl_ast_expr *isl_ast_expr_list_get_ast_expr( __isl_keep isl_ast_expr_list *list, int index); __isl_give struct isl_ast_expr_list *isl_ast_expr_list_set_ast_expr( __isl_take struct isl_ast_expr_list *list, int index, __isl_take struct isl_ast_expr *el); isl_stat isl_ast_expr_list_foreach(__isl_keep isl_ast_expr_list *list, isl_stat (*fn)(__isl_take isl_ast_expr *el, void *user), void *user); __isl_give isl_ast_expr_list *isl_ast_expr_list_map( __isl_take isl_ast_expr_list *list, __isl_give isl_ast_expr * (*fn)(__isl_take isl_ast_expr *el, void *user), void *user); __isl_give isl_ast_expr_list *isl_ast_expr_list_sort( __isl_take isl_ast_expr_list *list, int (*cmp)(__isl_keep struct isl_ast_expr *a, __isl_keep struct isl_ast_expr *b, void *user), void *user); isl_stat isl_ast_expr_list_foreach_scc(__isl_keep isl_ast_expr_list *list, isl_bool (*follows)(__isl_keep struct isl_ast_expr *a, __isl_keep struct isl_ast_expr *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_ast_expr_list *scc, void *user), void *fn_user); __isl_give char *isl_ast_expr_list_to_str( __isl_keep isl_ast_expr_list *list); __isl_give isl_printer *isl_printer_print_ast_expr_list( __isl_take isl_printer *p, __isl_keep isl_ast_expr_list *list); void isl_ast_expr_list_dump(__isl_keep isl_ast_expr_list *list); +struct isl_ast_node; struct __isl_export isl_ast_node_list; typedef struct isl_ast_node_list isl_ast_node_list; isl_ctx *isl_ast_node_list_get_ctx(__isl_keep isl_ast_node_list *list); __isl_constructor __isl_give isl_ast_node_list *isl_ast_node_list_from_ast_node( __isl_take isl_ast_node *el); __isl_constructor __isl_give isl_ast_node_list *isl_ast_node_list_alloc(isl_ctx *ctx, int n); __isl_give isl_ast_node_list *isl_ast_node_list_copy( __isl_keep isl_ast_node_list *list); __isl_null isl_ast_node_list *isl_ast_node_list_free( __isl_take isl_ast_node_list *list); __isl_export __isl_give isl_ast_node_list *isl_ast_node_list_add( __isl_take isl_ast_node_list *list, __isl_take isl_ast_node *el); __isl_give isl_ast_node_list *isl_ast_node_list_insert( __isl_take isl_ast_node_list *list, unsigned pos, __isl_take struct isl_ast_node *el); __isl_give isl_ast_node_list *isl_ast_node_list_drop( __isl_take isl_ast_node_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_ast_node_list *isl_ast_node_list_clear( __isl_take isl_ast_node_list *list); __isl_give isl_ast_node_list *isl_ast_node_list_swap( __isl_take isl_ast_node_list *list, unsigned pos1, unsigned pos2); __isl_give isl_ast_node_list *isl_ast_node_list_reverse( __isl_take isl_ast_node_list *list); __isl_export __isl_give isl_ast_node_list *isl_ast_node_list_concat( __isl_take isl_ast_node_list *list1, __isl_take isl_ast_node_list *list2); __isl_export isl_size isl_ast_node_list_size(__isl_keep isl_ast_node_list *list); isl_size isl_ast_node_list_n_ast_node(__isl_keep isl_ast_node_list *list); __isl_export __isl_give isl_ast_node *isl_ast_node_list_get_at( __isl_keep isl_ast_node_list *list, int index); __isl_give struct isl_ast_node *isl_ast_node_list_get_ast_node( __isl_keep isl_ast_node_list *list, int index); __isl_give struct isl_ast_node_list *isl_ast_node_list_set_ast_node( __isl_take struct isl_ast_node_list *list, int index, __isl_take struct isl_ast_node *el); __isl_export isl_stat isl_ast_node_list_foreach(__isl_keep isl_ast_node_list *list, isl_stat (*fn)(__isl_take isl_ast_node *el, void *user), void *user); __isl_give isl_ast_node_list *isl_ast_node_list_map( __isl_take isl_ast_node_list *list, __isl_give isl_ast_node * (*fn)(__isl_take isl_ast_node *el, void *user), void *user); __isl_give isl_ast_node_list *isl_ast_node_list_sort( __isl_take isl_ast_node_list *list, int (*cmp)(__isl_keep struct isl_ast_node *a, __isl_keep struct isl_ast_node *b, void *user), void *user); isl_stat isl_ast_node_list_foreach_scc(__isl_keep isl_ast_node_list *list, isl_bool (*follows)(__isl_keep struct isl_ast_node *a, __isl_keep struct isl_ast_node *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_ast_node_list *scc, void *user), void *fn_user); __isl_give char *isl_ast_node_list_to_str( __isl_keep isl_ast_node_list *list); __isl_give isl_printer *isl_printer_print_ast_node_list( __isl_take isl_printer *p, __isl_keep isl_ast_node_list *list); void isl_ast_node_list_dump(__isl_keep isl_ast_node_list *list); diff --git a/preproc-headers/9704ba63715975aacc95c0923375ab4e9b124b11ec0e325af5f1aa88609d8f70 b/preproc-headers/9704ba63715975aacc95c0923375ab4e9b124b11ec0e325af5f1aa88609d8f70 new file mode 100644 index 0000000..94e2411 --- /dev/null +++ b/preproc-headers/9704ba63715975aacc95c0923375ab4e9b124b11ec0e325af5f1aa88609d8f70 @@ -0,0 +1,1243 @@ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + + +__isl_give isl_aff *isl_aff_zero_on_domain(__isl_take isl_local_space *ls); +__isl_give isl_aff *isl_aff_val_on_domain_space(__isl_take isl_space *space, + __isl_take isl_val *val); +__isl_give isl_aff *isl_aff_val_on_domain(__isl_take isl_local_space *ls, + __isl_take isl_val *val); +__isl_give isl_aff *isl_aff_var_on_domain(__isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_aff *isl_aff_nan_on_domain(__isl_take isl_local_space *ls); +__isl_give isl_aff *isl_aff_param_on_domain_space_id( + __isl_take isl_space *space, __isl_take isl_id *id); + +__isl_give isl_aff *isl_aff_copy(__isl_keep isl_aff *aff); +__isl_null isl_aff *isl_aff_free(__isl_take isl_aff *aff); + +isl_ctx *isl_aff_get_ctx(__isl_keep isl_aff *aff); +uint32_t isl_aff_get_hash(__isl_keep isl_aff *aff); + +isl_bool isl_aff_involves_locals(__isl_keep isl_aff *aff); + +isl_size isl_aff_dim(__isl_keep isl_aff *aff, enum isl_dim_type type); +isl_bool isl_aff_involves_dims(__isl_keep isl_aff *aff, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_space *isl_aff_get_domain_space(__isl_keep isl_aff *aff); +__isl_give isl_space *isl_aff_get_space(__isl_keep isl_aff *aff); +__isl_give isl_local_space *isl_aff_get_domain_local_space( + __isl_keep isl_aff *aff); +__isl_give isl_local_space *isl_aff_get_local_space(__isl_keep isl_aff *aff); + +const char *isl_aff_get_dim_name(__isl_keep isl_aff *aff, + enum isl_dim_type type, unsigned pos); +__isl_give isl_val *isl_aff_get_constant_val(__isl_keep isl_aff *aff); +__isl_give isl_val *isl_aff_get_coefficient_val(__isl_keep isl_aff *aff, + enum isl_dim_type type, int pos); +int isl_aff_coefficient_sgn(__isl_keep isl_aff *aff, + enum isl_dim_type type, int pos); +__isl_give isl_val *isl_aff_get_denominator_val(__isl_keep isl_aff *aff); +__isl_give isl_aff *isl_aff_set_constant_si(__isl_take isl_aff *aff, int v); +__isl_give isl_aff *isl_aff_set_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); +__isl_give isl_aff *isl_aff_set_coefficient_si(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, int v); +__isl_give isl_aff *isl_aff_set_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v); +__isl_give isl_aff *isl_aff_add_constant_si(__isl_take isl_aff *aff, int v); +__isl_overload +__isl_give isl_aff *isl_aff_add_constant_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); +__isl_give isl_aff *isl_aff_add_constant_num_si(__isl_take isl_aff *aff, int v); +__isl_give isl_aff *isl_aff_add_coefficient_si(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, int v); +__isl_give isl_aff *isl_aff_add_coefficient_val(__isl_take isl_aff *aff, + enum isl_dim_type type, int pos, __isl_take isl_val *v); + +isl_bool isl_aff_is_cst(__isl_keep isl_aff *aff); + +__isl_give isl_aff *isl_aff_set_tuple_id(__isl_take isl_aff *aff, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_aff *isl_aff_set_dim_name(__isl_take isl_aff *aff, + enum isl_dim_type type, unsigned pos, const char *s); +__isl_give isl_aff *isl_aff_set_dim_id(__isl_take isl_aff *aff, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); + +int isl_aff_find_dim_by_name(__isl_keep isl_aff *aff, enum isl_dim_type type, + const char *name); + +isl_bool isl_aff_plain_is_equal(__isl_keep isl_aff *aff1, + __isl_keep isl_aff *aff2); +isl_bool isl_aff_plain_is_zero(__isl_keep isl_aff *aff); +isl_bool isl_aff_is_nan(__isl_keep isl_aff *aff); + +__isl_give isl_aff *isl_aff_get_div(__isl_keep isl_aff *aff, int pos); + +__isl_give isl_aff *isl_aff_from_range(__isl_take isl_aff *aff); + +__isl_export +__isl_give isl_aff *isl_aff_neg(__isl_take isl_aff *aff); +__isl_export +__isl_give isl_aff *isl_aff_ceil(__isl_take isl_aff *aff); +__isl_export +__isl_give isl_aff *isl_aff_floor(__isl_take isl_aff *aff); +__isl_overload +__isl_give isl_aff *isl_aff_mod_val(__isl_take isl_aff *aff, + __isl_take isl_val *mod); + +__isl_export +__isl_give isl_aff *isl_aff_mul(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_aff *isl_aff_div(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_aff *isl_aff_add(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_aff *isl_aff_sub(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); + +__isl_overload +__isl_give isl_aff *isl_aff_scale_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); +__isl_give isl_aff *isl_aff_scale_down_ui(__isl_take isl_aff *aff, unsigned f); +__isl_overload +__isl_give isl_aff *isl_aff_scale_down_val(__isl_take isl_aff *aff, + __isl_take isl_val *v); + +__isl_give isl_aff *isl_aff_insert_dims(__isl_take isl_aff *aff, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_aff *isl_aff_add_dims(__isl_take isl_aff *aff, + enum isl_dim_type type, unsigned n); +__isl_give isl_aff *isl_aff_move_dims(__isl_take isl_aff *aff, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_aff *isl_aff_drop_dims(__isl_take isl_aff *aff, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_aff *isl_aff_project_domain_on_params(__isl_take isl_aff *aff); +__isl_export +__isl_give isl_aff *isl_aff_unbind_params_insert_domain( + __isl_take isl_aff *aff, __isl_take isl_multi_id *domain); + +__isl_give isl_aff *isl_aff_align_params(__isl_take isl_aff *aff, + __isl_take isl_space *model); + +__isl_export +__isl_give isl_aff *isl_aff_gist(__isl_take isl_aff *aff, + __isl_take isl_set *context); +__isl_give isl_aff *isl_aff_gist_params(__isl_take isl_aff *aff, + __isl_take isl_set *context); + +__isl_export +__isl_give isl_val *isl_aff_eval(__isl_take isl_aff *aff, + __isl_take isl_point *pnt); + +__isl_give isl_aff *isl_aff_pullback_aff(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_overload +__isl_give isl_aff *isl_aff_pullback_multi_aff(__isl_take isl_aff *aff, + __isl_take isl_multi_aff *ma); + +__isl_give isl_basic_set *isl_aff_zero_basic_set(__isl_take isl_aff *aff); +__isl_give isl_basic_set *isl_aff_neg_basic_set(__isl_take isl_aff *aff); + +__isl_give isl_basic_set *isl_aff_eq_basic_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_eq_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_ne_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_le_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_give isl_basic_set *isl_aff_lt_basic_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_lt_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_ge_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_give isl_basic_set *isl_aff_gt_basic_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); +__isl_export +__isl_give isl_set *isl_aff_gt_set(__isl_take isl_aff *aff1, + __isl_take isl_aff *aff2); + +__isl_overload +__isl_give isl_basic_set *isl_aff_bind_id(__isl_take isl_aff *aff, + __isl_take isl_id *id); + +__isl_constructor +__isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str); +__isl_give char *isl_aff_to_str(__isl_keep isl_aff *aff); +__isl_give isl_printer *isl_printer_print_aff(__isl_take isl_printer *p, + __isl_keep isl_aff *aff); +void isl_aff_dump(__isl_keep isl_aff *aff); + +isl_ctx *isl_pw_aff_get_ctx(__isl_keep isl_pw_aff *pwaff); +uint32_t isl_pw_aff_get_hash(__isl_keep isl_pw_aff *pa); +__isl_give isl_space *isl_pw_aff_get_domain_space(__isl_keep isl_pw_aff *pwaff); +__isl_give isl_space *isl_pw_aff_get_space(__isl_keep isl_pw_aff *pwaff); + +__isl_constructor +__isl_give isl_pw_aff *isl_pw_aff_from_aff(__isl_take isl_aff *aff); +__isl_give isl_pw_aff *isl_pw_aff_empty(__isl_take isl_space *space); +__isl_give isl_pw_aff *isl_pw_aff_alloc(__isl_take isl_set *set, + __isl_take isl_aff *aff); +__isl_give isl_pw_aff *isl_pw_aff_zero_on_domain( + __isl_take isl_local_space *ls); +__isl_give isl_pw_aff *isl_pw_aff_var_on_domain(__isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_pw_aff *isl_pw_aff_nan_on_domain(__isl_take isl_local_space *ls); +__isl_give isl_pw_aff *isl_pw_aff_val_on_domain(__isl_take isl_set *domain, + __isl_take isl_val *v); +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_param_on_domain_id( + __isl_take isl_set *domain, __isl_take isl_id *id); + +__isl_give isl_pw_aff *isl_set_indicator_function(__isl_take isl_set *set); + +const char *isl_pw_aff_get_dim_name(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type, unsigned pos); +isl_bool isl_pw_aff_has_dim_id(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_pw_aff_get_dim_id(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type, unsigned pos); +__isl_give isl_pw_aff *isl_pw_aff_set_dim_id(__isl_take isl_pw_aff *pma, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); + +int isl_pw_aff_find_dim_by_name(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type, const char *name); + +isl_bool isl_pw_aff_is_empty(__isl_keep isl_pw_aff *pwaff); +isl_bool isl_pw_aff_involves_nan(__isl_keep isl_pw_aff *pa); +int isl_pw_aff_plain_cmp(__isl_keep isl_pw_aff *pa1, + __isl_keep isl_pw_aff *pa2); +isl_bool isl_pw_aff_plain_is_equal(__isl_keep isl_pw_aff *pwaff1, + __isl_keep isl_pw_aff *pwaff2); +isl_bool isl_pw_aff_is_equal(__isl_keep isl_pw_aff *pa1, + __isl_keep isl_pw_aff *pa2); + +__isl_give isl_pw_aff *isl_pw_aff_union_min(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_give isl_pw_aff *isl_pw_aff_union_max(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_union_add(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); + +__isl_give isl_pw_aff *isl_pw_aff_copy(__isl_keep isl_pw_aff *pwaff); +__isl_null isl_pw_aff *isl_pw_aff_free(__isl_take isl_pw_aff *pwaff); + +isl_size isl_pw_aff_dim(__isl_keep isl_pw_aff *pwaff, enum isl_dim_type type); +isl_bool isl_pw_aff_involves_param_id(__isl_keep isl_pw_aff *pa, + __isl_keep isl_id *id); +isl_bool isl_pw_aff_involves_dims(__isl_keep isl_pw_aff *pwaff, + enum isl_dim_type type, unsigned first, unsigned n); + +isl_bool isl_pw_aff_is_cst(__isl_keep isl_pw_aff *pwaff); + +__isl_give isl_pw_aff *isl_pw_aff_project_domain_on_params( + __isl_take isl_pw_aff *pa); + +__isl_give isl_pw_aff *isl_pw_aff_align_params(__isl_take isl_pw_aff *pwaff, + __isl_take isl_space *model); +__isl_give isl_pw_aff *isl_pw_aff_drop_unused_params( + __isl_take isl_pw_aff *pa); + +isl_bool isl_pw_aff_has_tuple_id(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type); +__isl_give isl_id *isl_pw_aff_get_tuple_id(__isl_keep isl_pw_aff *pa, + enum isl_dim_type type); +__isl_give isl_pw_aff *isl_pw_aff_set_tuple_id(__isl_take isl_pw_aff *pwaff, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_pw_aff *isl_pw_aff_reset_tuple_id(__isl_take isl_pw_aff *pa, + enum isl_dim_type type); +__isl_give isl_pw_aff *isl_pw_aff_reset_user(__isl_take isl_pw_aff *pa); + +__isl_give isl_set *isl_pw_aff_params(__isl_take isl_pw_aff *pwa); +__isl_export +__isl_give isl_set *isl_pw_aff_domain(__isl_take isl_pw_aff *pwaff); +__isl_give isl_pw_aff *isl_pw_aff_from_range(__isl_take isl_pw_aff *pwa); + +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_min(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_max(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_mul(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_div(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_add(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_sub(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_neg(__isl_take isl_pw_aff *pwaff); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_ceil(__isl_take isl_pw_aff *pwaff); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_floor(__isl_take isl_pw_aff *pwaff); +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_mod_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *mod); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_tdiv_q(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_tdiv_r(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); + +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_intersect_params(__isl_take isl_pw_aff *pa, + __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_intersect_domain(__isl_take isl_pw_aff *pa, + __isl_take isl_set *set); +__isl_give isl_pw_aff *isl_pw_aff_intersect_domain_wrapped_domain( + __isl_take isl_pw_aff *pa, __isl_take isl_set *set); +__isl_give isl_pw_aff *isl_pw_aff_intersect_domain_wrapped_range( + __isl_take isl_pw_aff *pa, __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_subtract_domain(__isl_take isl_pw_aff *pa, + __isl_take isl_set *set); + +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_cond(__isl_take isl_pw_aff *cond, + __isl_take isl_pw_aff *pwaff_true, __isl_take isl_pw_aff *pwaff_false); + +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_scale_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *v); +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_scale_down_val(__isl_take isl_pw_aff *pa, + __isl_take isl_val *f); + +__isl_give isl_pw_aff *isl_pw_aff_insert_dims(__isl_take isl_pw_aff *pwaff, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_pw_aff *isl_pw_aff_add_dims(__isl_take isl_pw_aff *pwaff, + enum isl_dim_type type, unsigned n); +__isl_give isl_pw_aff *isl_pw_aff_move_dims(__isl_take isl_pw_aff *pa, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_pw_aff *isl_pw_aff_drop_dims(__isl_take isl_pw_aff *pwaff, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_pw_aff *isl_pw_aff_coalesce(__isl_take isl_pw_aff *pwqp); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_gist(__isl_take isl_pw_aff *pwaff, + __isl_take isl_set *context); +__isl_give isl_pw_aff *isl_pw_aff_gist_params(__isl_take isl_pw_aff *pwaff, + __isl_take isl_set *context); + +__isl_export +__isl_give isl_val *isl_pw_aff_eval(__isl_take isl_pw_aff *pa, + __isl_take isl_point *pnt); + +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_pullback_multi_aff( + __isl_take isl_pw_aff *pa, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_pullback_pw_multi_aff( + __isl_take isl_pw_aff *pa, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_pw_aff *isl_pw_aff_pullback_multi_pw_aff( + __isl_take isl_pw_aff *pa, __isl_take isl_multi_pw_aff *mpa); + +isl_size isl_pw_aff_n_piece(__isl_keep isl_pw_aff *pwaff); +isl_stat isl_pw_aff_foreach_piece(__isl_keep isl_pw_aff *pwaff, + isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_aff *aff, + void *user), void *user); +__isl_export +isl_bool isl_pw_aff_isa_aff(__isl_keep isl_pw_aff *pa); +__isl_export +__isl_give isl_aff *isl_pw_aff_as_aff(__isl_take isl_pw_aff *pa); + +__isl_give isl_set *isl_set_from_pw_aff(__isl_take isl_pw_aff *pwaff); +__isl_give isl_map *isl_map_from_pw_aff(__isl_take isl_pw_aff *pwaff); + +__isl_give isl_set *isl_pw_aff_pos_set(__isl_take isl_pw_aff *pa); +__isl_give isl_set *isl_pw_aff_nonneg_set(__isl_take isl_pw_aff *pwaff); +__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff); +__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff); + +__isl_export +__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); +__isl_export +__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1, + __isl_take isl_pw_aff *pwaff2); + +__isl_give isl_map *isl_pw_aff_eq_map(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); +__isl_give isl_map *isl_pw_aff_lt_map(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); +__isl_give isl_map *isl_pw_aff_gt_map(__isl_take isl_pw_aff *pa1, + __isl_take isl_pw_aff *pa2); + +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_bind_domain(__isl_take isl_pw_aff *pa, + __isl_take isl_multi_id *tuple); +__isl_export +__isl_give isl_pw_aff *isl_pw_aff_bind_domain_wrapped_domain( + __isl_take isl_pw_aff *pa, __isl_take isl_multi_id *tuple); +__isl_overload +__isl_give isl_set *isl_pw_aff_bind_id(__isl_take isl_pw_aff *pa, + __isl_take isl_id *id); + +__isl_constructor +__isl_give isl_pw_aff *isl_pw_aff_read_from_str(isl_ctx *ctx, const char *str); +__isl_give char *isl_pw_aff_to_str(__isl_keep isl_pw_aff *pa); +__isl_give isl_printer *isl_printer_print_pw_aff(__isl_take isl_printer *p, + __isl_keep isl_pw_aff *pwaff); +void isl_pw_aff_dump(__isl_keep isl_pw_aff *pwaff); + +__isl_give isl_pw_aff *isl_pw_aff_list_min(__isl_take isl_pw_aff_list *list); +__isl_give isl_pw_aff *isl_pw_aff_list_max(__isl_take isl_pw_aff_list *list); + +__isl_give isl_set *isl_pw_aff_list_eq_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); +__isl_give isl_set *isl_pw_aff_list_ne_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); +__isl_give isl_set *isl_pw_aff_list_le_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); +__isl_give isl_set *isl_pw_aff_list_lt_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); +__isl_give isl_set *isl_pw_aff_list_ge_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); +__isl_give isl_set *isl_pw_aff_list_gt_set(__isl_take isl_pw_aff_list *list1, + __isl_take isl_pw_aff_list *list2); + +isl_ctx *isl_multi_aff_get_ctx( __isl_keep isl_multi_aff *multi); __isl_export __isl_give isl_space *isl_multi_aff_get_space( __isl_keep isl_multi_aff *multi); __isl_give isl_space *isl_multi_aff_get_domain_space( __isl_keep isl_multi_aff *multi); __isl_constructor __isl_give isl_multi_aff *isl_multi_aff_from_aff_list( __isl_take isl_space *space, __isl_take isl_aff_list *list); __isl_give isl_multi_aff *isl_multi_aff_copy( __isl_keep isl_multi_aff *multi); __isl_null isl_multi_aff *isl_multi_aff_free( __isl_take isl_multi_aff *multi); __isl_export isl_bool isl_multi_aff_plain_is_equal( __isl_keep isl_multi_aff *multi1, __isl_keep isl_multi_aff *multi2); __isl_give isl_multi_aff *isl_multi_aff_reset_user( __isl_take isl_multi_aff *multi); __isl_export isl_size isl_multi_aff_size(__isl_keep isl_multi_aff *multi); __isl_export __isl_give isl_aff *isl_multi_aff_get_at( __isl_keep isl_multi_aff *multi, int pos); __isl_give isl_aff *isl_multi_aff_get_aff( __isl_keep isl_multi_aff *multi, int pos); __isl_export __isl_give isl_multi_aff *isl_multi_aff_set_at( __isl_take isl_multi_aff *multi, int pos, __isl_take isl_aff *el); __isl_give isl_multi_aff *isl_multi_aff_set_aff( __isl_take isl_multi_aff *multi, int pos, __isl_take isl_aff *el); __isl_give isl_multi_aff *isl_multi_aff_range_splice( __isl_take isl_multi_aff *multi1, unsigned pos, __isl_take isl_multi_aff *multi2); __isl_give isl_multi_aff *isl_multi_aff_flatten_range( __isl_take isl_multi_aff *multi); __isl_export __isl_give isl_multi_aff *isl_multi_aff_flat_range_product( __isl_take isl_multi_aff *multi1, __isl_take isl_multi_aff *multi2); __isl_export __isl_give isl_multi_aff *isl_multi_aff_range_product( __isl_take isl_multi_aff *multi1, __isl_take isl_multi_aff *multi2); __isl_give isl_multi_aff *isl_multi_aff_factor_range( __isl_take isl_multi_aff *multi); isl_bool isl_multi_aff_range_is_wrapping( __isl_keep isl_multi_aff *multi); __isl_give isl_multi_aff *isl_multi_aff_range_factor_domain( __isl_take isl_multi_aff *multi); __isl_give isl_multi_aff *isl_multi_aff_range_factor_range( __isl_take isl_multi_aff *multi); __isl_give isl_multi_aff *isl_multi_aff_align_params( __isl_take isl_multi_aff *multi, __isl_take isl_space *model); __isl_give isl_multi_aff *isl_multi_aff_from_range( __isl_take isl_multi_aff *multi); +__isl_overload __isl_give isl_multi_aff *isl_multi_aff_identity_multi_aff( __isl_take isl_multi_aff *multi); __isl_give isl_multi_aff *isl_multi_aff_identity( __isl_take isl_space *space); __isl_overload __isl_give isl_multi_aff * isl_multi_aff_identity_on_domain_space( __isl_take isl_space *space); +int isl_multi_aff_plain_cmp(__isl_keep isl_multi_aff *multi1, __isl_keep isl_multi_aff *multi2); +__isl_overload __isl_give isl_multi_aff *isl_multi_aff_scale_val( __isl_take isl_multi_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_aff *isl_multi_aff_scale_down_val( __isl_take isl_multi_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_aff *isl_multi_aff_scale_multi_val( __isl_take isl_multi_aff *multi, __isl_take isl_multi_val *mv); __isl_overload __isl_give isl_multi_aff *isl_multi_aff_scale_down_multi_val( __isl_take isl_multi_aff *multi, __isl_take isl_multi_val *mv); __isl_give isl_multi_aff *isl_multi_aff_mod_multi_val( __isl_take isl_multi_aff *multi, __isl_take isl_multi_val *mv); __isl_export __isl_give isl_multi_aff *isl_multi_aff_add( __isl_take isl_multi_aff *multi1, __isl_take isl_multi_aff *multi2); __isl_export __isl_give isl_multi_aff *isl_multi_aff_sub( __isl_take isl_multi_aff *multi1, __isl_take isl_multi_aff *multi2); __isl_export __isl_give isl_multi_aff *isl_multi_aff_neg( __isl_take isl_multi_aff *multi); +__isl_export __isl_give isl_multi_aff *isl_multi_aff_zero( __isl_take isl_space *space); +isl_bool isl_multi_aff_involves_nan( __isl_keep isl_multi_aff *multi); +isl_size isl_multi_aff_dim(__isl_keep isl_multi_aff *multi, enum isl_dim_type type); __isl_give isl_multi_aff *isl_multi_aff_drop_dims( __isl_take isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); isl_bool isl_multi_aff_involves_dims( __isl_keep isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_aff *isl_multi_aff_insert_dims( __isl_take isl_multi_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_aff *isl_multi_aff_add_dims( __isl_take isl_multi_aff *multi, enum isl_dim_type type, unsigned n); __isl_give isl_multi_aff * isl_multi_aff_project_domain_on_params( __isl_take isl_multi_aff *multi); +__isl_export isl_bool isl_multi_aff_involves_locals( __isl_keep isl_multi_aff *multi); +int isl_multi_aff_find_dim_by_name( __isl_keep isl_multi_aff *multi, enum isl_dim_type type, const char *name); int isl_multi_aff_find_dim_by_id( __isl_keep isl_multi_aff *multi, enum isl_dim_type type, __isl_keep isl_id *id); __isl_give isl_id *isl_multi_aff_get_dim_id( __isl_keep isl_multi_aff *multi, enum isl_dim_type type, unsigned pos); __isl_give isl_multi_aff *isl_multi_aff_set_dim_name( __isl_take isl_multi_aff *multi, enum isl_dim_type type, unsigned pos, const char *s); __isl_give isl_multi_aff *isl_multi_aff_set_dim_id( __isl_take isl_multi_aff *multi, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +const char *isl_multi_aff_get_tuple_name( __isl_keep isl_multi_aff *multi, enum isl_dim_type type); isl_bool isl_multi_aff_has_tuple_id( __isl_keep isl_multi_aff *multi, enum isl_dim_type type); __isl_give isl_id *isl_multi_aff_get_tuple_id( __isl_keep isl_multi_aff *multi, enum isl_dim_type type); __isl_give isl_multi_aff *isl_multi_aff_set_tuple_name( __isl_take isl_multi_aff *multi, enum isl_dim_type type, const char *s); __isl_give isl_multi_aff *isl_multi_aff_set_tuple_id( __isl_take isl_multi_aff *multi, enum isl_dim_type type, __isl_take isl_id *id); __isl_give isl_multi_aff *isl_multi_aff_reset_tuple_id( __isl_take isl_multi_aff *multi, enum isl_dim_type type); +__isl_export __isl_give isl_multi_aff *isl_multi_aff_product( __isl_take isl_multi_aff *multi1, __isl_take isl_multi_aff *multi2); __isl_give isl_multi_aff *isl_multi_aff_splice( __isl_take isl_multi_aff *multi1, unsigned in_pos, unsigned out_pos, __isl_take isl_multi_aff *multi2); +__isl_export __isl_give isl_multi_aff *isl_multi_aff_bind_domain( __isl_take isl_multi_aff *multi, __isl_take isl_multi_id *tuple); __isl_export __isl_give isl_multi_aff * isl_multi_aff_bind_domain_wrapped_domain( __isl_take isl_multi_aff *multi, __isl_take isl_multi_id *tuple); + +__isl_constructor +__isl_give isl_multi_aff *isl_multi_aff_from_aff(__isl_take isl_aff *aff); +__isl_export +__isl_give isl_multi_aff *isl_multi_aff_domain_map(__isl_take isl_space *space); +__isl_export +__isl_give isl_multi_aff *isl_multi_aff_range_map(__isl_take isl_space *space); +__isl_give isl_multi_aff *isl_multi_aff_project_out_map( + __isl_take isl_space *space, enum isl_dim_type type, + unsigned first, unsigned n); + +__isl_give isl_multi_aff *isl_multi_aff_multi_val_on_space( + __isl_take isl_space *space, __isl_take isl_multi_val *mv); + +__isl_export +__isl_give isl_multi_aff *isl_multi_aff_floor(__isl_take isl_multi_aff *ma); + +__isl_give isl_multi_aff *isl_multi_aff_gist_params( + __isl_take isl_multi_aff *maff, __isl_take isl_set *context); +__isl_export +__isl_give isl_multi_aff *isl_multi_aff_gist(__isl_take isl_multi_aff *maff, + __isl_take isl_set *context); + +__isl_give isl_multi_aff *isl_multi_aff_lift(__isl_take isl_multi_aff *maff, + __isl_give isl_local_space **ls); + +__isl_overload +__isl_give isl_multi_aff *isl_multi_aff_pullback_multi_aff( + __isl_take isl_multi_aff *ma1, __isl_take isl_multi_aff *ma2); + +__isl_give isl_multi_aff *isl_multi_aff_move_dims(__isl_take isl_multi_aff *ma, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); + +__isl_give isl_set *isl_multi_aff_lex_lt_set(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); +__isl_give isl_set *isl_multi_aff_lex_le_set(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); +__isl_give isl_set *isl_multi_aff_lex_gt_set(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); +__isl_give isl_set *isl_multi_aff_lex_ge_set(__isl_take isl_multi_aff *ma1, + __isl_take isl_multi_aff *ma2); + +__isl_export +__isl_give isl_basic_set *isl_multi_aff_bind(__isl_take isl_multi_aff *ma, + __isl_take isl_multi_id *tuple); + +__isl_give char *isl_multi_aff_to_str(__isl_keep isl_multi_aff *ma); +__isl_give isl_printer *isl_printer_print_multi_aff(__isl_take isl_printer *p, + __isl_keep isl_multi_aff *maff); + +__isl_constructor +__isl_give isl_multi_aff *isl_multi_aff_read_from_str(isl_ctx *ctx, + const char *str); +void isl_multi_aff_dump(__isl_keep isl_multi_aff *maff); + +isl_ctx *isl_multi_pw_aff_get_ctx( __isl_keep isl_multi_pw_aff *multi); __isl_export __isl_give isl_space *isl_multi_pw_aff_get_space( __isl_keep isl_multi_pw_aff *multi); __isl_give isl_space *isl_multi_pw_aff_get_domain_space( __isl_keep isl_multi_pw_aff *multi); __isl_constructor __isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_aff_list( __isl_take isl_space *space, __isl_take isl_pw_aff_list *list); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_copy( __isl_keep isl_multi_pw_aff *multi); __isl_null isl_multi_pw_aff *isl_multi_pw_aff_free( __isl_take isl_multi_pw_aff *multi); __isl_export isl_bool isl_multi_pw_aff_plain_is_equal( __isl_keep isl_multi_pw_aff *multi1, __isl_keep isl_multi_pw_aff *multi2); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_reset_user( __isl_take isl_multi_pw_aff *multi); __isl_export isl_size isl_multi_pw_aff_size(__isl_keep isl_multi_pw_aff *multi); __isl_export __isl_give isl_pw_aff *isl_multi_pw_aff_get_at( __isl_keep isl_multi_pw_aff *multi, int pos); __isl_give isl_pw_aff *isl_multi_pw_aff_get_pw_aff( __isl_keep isl_multi_pw_aff *multi, int pos); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_at( __isl_take isl_multi_pw_aff *multi, int pos, __isl_take isl_pw_aff *el); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_pw_aff( __isl_take isl_multi_pw_aff *multi, int pos, __isl_take isl_pw_aff *el); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_splice( __isl_take isl_multi_pw_aff *multi1, unsigned pos, __isl_take isl_multi_pw_aff *multi2); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_flatten_range( __isl_take isl_multi_pw_aff *multi); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_flat_range_product( __isl_take isl_multi_pw_aff *multi1, __isl_take isl_multi_pw_aff *multi2); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_product( __isl_take isl_multi_pw_aff *multi1, __isl_take isl_multi_pw_aff *multi2); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_factor_range( __isl_take isl_multi_pw_aff *multi); isl_bool isl_multi_pw_aff_range_is_wrapping( __isl_keep isl_multi_pw_aff *multi); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_factor_domain( __isl_take isl_multi_pw_aff *multi); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_range_factor_range( __isl_take isl_multi_pw_aff *multi); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_align_params( __isl_take isl_multi_pw_aff *multi, __isl_take isl_space *model); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_range( __isl_take isl_multi_pw_aff *multi); +__isl_overload __isl_give isl_multi_pw_aff *isl_multi_pw_aff_identity_multi_pw_aff( __isl_take isl_multi_pw_aff *multi); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_identity( __isl_take isl_space *space); __isl_overload __isl_give isl_multi_pw_aff * isl_multi_pw_aff_identity_on_domain_space( __isl_take isl_space *space); +__isl_overload __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_val( __isl_take isl_multi_pw_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_down_val( __isl_take isl_multi_pw_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_multi_val( __isl_take isl_multi_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_overload __isl_give isl_multi_pw_aff *isl_multi_pw_aff_scale_down_multi_val( __isl_take isl_multi_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_mod_multi_val( __isl_take isl_multi_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_add( __isl_take isl_multi_pw_aff *multi1, __isl_take isl_multi_pw_aff *multi2); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_sub( __isl_take isl_multi_pw_aff *multi1, __isl_take isl_multi_pw_aff *multi2); __isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_neg( __isl_take isl_multi_pw_aff *multi); +__isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_zero( __isl_take isl_space *space); +isl_bool isl_multi_pw_aff_involves_nan( __isl_keep isl_multi_pw_aff *multi); +isl_size isl_multi_pw_aff_dim(__isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_drop_dims( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); isl_bool isl_multi_pw_aff_involves_dims( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_insert_dims( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_add_dims( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned n); __isl_give isl_multi_pw_aff * isl_multi_pw_aff_project_domain_on_params( __isl_take isl_multi_pw_aff *multi); +int isl_multi_pw_aff_find_dim_by_name( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type, const char *name); int isl_multi_pw_aff_find_dim_by_id( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type, __isl_keep isl_id *id); __isl_give isl_id *isl_multi_pw_aff_get_dim_id( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_dim_name( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos, const char *s); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_dim_id( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +const char *isl_multi_pw_aff_get_tuple_name( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type); isl_bool isl_multi_pw_aff_has_tuple_id( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type); __isl_give isl_id *isl_multi_pw_aff_get_tuple_id( __isl_keep isl_multi_pw_aff *multi, enum isl_dim_type type); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_tuple_name( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, const char *s); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_set_tuple_id( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type, __isl_take isl_id *id); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_reset_tuple_id( __isl_take isl_multi_pw_aff *multi, enum isl_dim_type type); +__isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_product( __isl_take isl_multi_pw_aff *multi1, __isl_take isl_multi_pw_aff *multi2); __isl_give isl_multi_pw_aff *isl_multi_pw_aff_splice( __isl_take isl_multi_pw_aff *multi1, unsigned in_pos, unsigned out_pos, __isl_take isl_multi_pw_aff *multi2); +__isl_export __isl_give isl_multi_pw_aff *isl_multi_pw_aff_bind_domain( __isl_take isl_multi_pw_aff *multi, __isl_take isl_multi_id *tuple); __isl_export __isl_give isl_multi_pw_aff * isl_multi_pw_aff_bind_domain_wrapped_domain( __isl_take isl_multi_pw_aff *multi, __isl_take isl_multi_id *tuple); +__isl_overload isl_bool isl_multi_pw_aff_involves_param_id( __isl_keep isl_multi_pw_aff *multi, __isl_keep isl_id *id); __isl_overload isl_bool isl_multi_pw_aff_involves_param_id_list( __isl_keep isl_multi_pw_aff *multi, __isl_keep isl_id_list *list); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_zero(__isl_take isl_space *space); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_identity( + __isl_take isl_space *space); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_map( + __isl_take isl_space *space); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_out_map( + __isl_take isl_space *space, enum isl_dim_type type, + unsigned first, unsigned n); +__isl_constructor +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_aff( + __isl_take isl_multi_aff *ma); +__isl_constructor +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_pw_aff( + __isl_take isl_pw_aff *pa); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_alloc(__isl_take isl_set *set, + __isl_take isl_multi_aff *maff); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_copy( + __isl_keep isl_pw_multi_aff *pma); +__isl_null isl_pw_multi_aff *isl_pw_multi_aff_free( + __isl_take isl_pw_multi_aff *pma); + +isl_size isl_pw_multi_aff_dim(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type); +isl_bool isl_pw_multi_aff_involves_param_id(__isl_keep isl_pw_multi_aff *pma, + __isl_keep isl_id *id); +isl_bool isl_pw_multi_aff_involves_dims(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_pw_aff *isl_pw_multi_aff_get_pw_aff( + __isl_keep isl_pw_multi_aff *pma, int pos); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_pw_aff( + __isl_take isl_pw_multi_aff *pma, unsigned pos, + __isl_take isl_pw_aff *pa); + +isl_ctx *isl_pw_multi_aff_get_ctx(__isl_keep isl_pw_multi_aff *pma); +__isl_give isl_space *isl_pw_multi_aff_get_domain_space( + __isl_keep isl_pw_multi_aff *pma); +__isl_export +__isl_give isl_space *isl_pw_multi_aff_get_space( + __isl_keep isl_pw_multi_aff *pma); +isl_bool isl_pw_multi_aff_has_tuple_name(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type); +const char *isl_pw_multi_aff_get_tuple_name(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type); +__isl_give isl_id *isl_pw_multi_aff_get_tuple_id( + __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type); +isl_bool isl_pw_multi_aff_has_tuple_id(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_tuple_id( + __isl_take isl_pw_multi_aff *pma, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_tuple_id( + __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_reset_user( + __isl_take isl_pw_multi_aff *pma); + +int isl_pw_multi_aff_find_dim_by_name(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type, const char *name); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_drop_dims( + __isl_take isl_pw_multi_aff *pma, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_export +__isl_give isl_set *isl_pw_multi_aff_domain(__isl_take isl_pw_multi_aff *pma); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_empty(__isl_take isl_space *space); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_domain( + __isl_take isl_set *set); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_multi_val_on_domain( + __isl_take isl_set *domain, __isl_take isl_multi_val *mv); + +const char *isl_pw_multi_aff_get_dim_name(__isl_keep isl_pw_multi_aff *pma, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_pw_multi_aff_get_dim_id( + __isl_keep isl_pw_multi_aff *pma, enum isl_dim_type type, + unsigned pos); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_set_dim_id( + __isl_take isl_pw_multi_aff *pma, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); + +isl_bool isl_pw_multi_aff_involves_nan(__isl_keep isl_pw_multi_aff *pma); +isl_bool isl_pw_multi_aff_plain_is_equal(__isl_keep isl_pw_multi_aff *pma1, + __isl_keep isl_pw_multi_aff *pma2); +isl_bool isl_pw_multi_aff_is_equal(__isl_keep isl_pw_multi_aff *pma1, + __isl_keep isl_pw_multi_aff *pma2); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_fix_si( + __isl_take isl_pw_multi_aff *pma, enum isl_dim_type type, + unsigned pos, int value); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_add( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_neg( + __isl_take isl_pw_multi_aff *pma); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_add( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_sub( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + +__isl_overload +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v); +__isl_overload +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_down_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_val *v); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_scale_multi_val( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_val *mv); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmin( + __isl_take isl_pw_multi_aff *pma1, + __isl_take isl_pw_multi_aff *pma2); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_union_lexmax( + __isl_take isl_pw_multi_aff *pma1, + __isl_take isl_pw_multi_aff *pma2); + +__isl_give isl_multi_aff *isl_multi_aff_flatten_domain( + __isl_take isl_multi_aff *ma); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_product( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_flat_range_product( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_product( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_factor_domain( + __isl_take isl_pw_multi_aff *pma); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_range_factor_range( + __isl_take isl_pw_multi_aff *pma); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_params( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain_wrapped_domain( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_intersect_domain_wrapped_range( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_subtract_domain( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_project_domain_on_params( + __isl_take isl_pw_multi_aff *pma); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_align_params( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_space *model); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_drop_unused_params( + __isl_take isl_pw_multi_aff *pma); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_coalesce( + __isl_take isl_pw_multi_aff *pma); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist_params( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_gist( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_set *set); + +__isl_overload +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_pullback_multi_aff( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_pullback_pw_multi_aff( + __isl_take isl_pw_multi_aff *pma1, __isl_take isl_pw_multi_aff *pma2); + +__isl_export +isl_size isl_pw_multi_aff_n_piece(__isl_keep isl_pw_multi_aff *pma); +__isl_export +isl_stat isl_pw_multi_aff_foreach_piece(__isl_keep isl_pw_multi_aff *pma, + isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_multi_aff *maff, + void *user), void *user); +__isl_export +isl_bool isl_pw_multi_aff_isa_multi_aff(__isl_keep isl_pw_multi_aff *pma); +__isl_export +__isl_give isl_multi_aff *isl_pw_multi_aff_as_multi_aff( + __isl_take isl_pw_multi_aff *pma); + +__isl_give isl_map *isl_map_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma); +__isl_give isl_set *isl_set_from_pw_multi_aff(__isl_take isl_pw_multi_aff *pma); + +__isl_give char *isl_pw_multi_aff_to_str(__isl_keep isl_pw_multi_aff *pma); +__isl_give isl_printer *isl_printer_print_pw_multi_aff(__isl_take isl_printer *p, + __isl_keep isl_pw_multi_aff *pma); + +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_set(__isl_take isl_set *set); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_map(__isl_take isl_map *map); + +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_bind_domain( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_id *tuple); +__isl_export +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_bind_domain_wrapped_domain( + __isl_take isl_pw_multi_aff *pma, __isl_take isl_multi_id *tuple); + +__isl_constructor +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_read_from_str(isl_ctx *ctx, + const char *str); +void isl_pw_multi_aff_dump(__isl_keep isl_pw_multi_aff *pma); + + +__isl_overload +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty_ctx( + isl_ctx *ctx); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty_space( + __isl_take isl_space *space); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_empty( + __isl_take isl_space *space); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_aff( + __isl_take isl_aff *aff); +__isl_constructor +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_pw_multi_aff( + __isl_take isl_pw_multi_aff *pma); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_domain( + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_multi_val_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_multi_val *mv); +__isl_give isl_union_pw_aff *isl_union_pw_aff_param_on_domain_id( + __isl_take isl_union_set *domain, __isl_take isl_id *id); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_copy( + __isl_keep isl_union_pw_multi_aff *upma); +__isl_null isl_union_pw_multi_aff *isl_union_pw_multi_aff_free( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_multi_aff *isl_union_set_identity_union_pw_multi_aff( + __isl_take isl_union_set *uset); + +__isl_give isl_union_pw_aff *isl_union_pw_multi_aff_get_union_pw_aff( + __isl_keep isl_union_pw_multi_aff *upma, int pos); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_add_pw_multi_aff( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_pw_multi_aff *pma); + +isl_ctx *isl_union_pw_multi_aff_get_ctx( + __isl_keep isl_union_pw_multi_aff *upma); +__isl_export +__isl_give isl_space *isl_union_pw_multi_aff_get_space( + __isl_keep isl_union_pw_multi_aff *upma); +__isl_give isl_pw_multi_aff_list *isl_union_pw_multi_aff_get_pw_multi_aff_list( + __isl_keep isl_union_pw_multi_aff *upma); + +isl_size isl_union_pw_multi_aff_dim(__isl_keep isl_union_pw_multi_aff *upma, + enum isl_dim_type type); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_set_dim_name( + __isl_take isl_union_pw_multi_aff *upma, + enum isl_dim_type type, unsigned pos, const char *s); + +int isl_union_pw_multi_aff_find_dim_by_name( + __isl_keep isl_union_pw_multi_aff *upma, enum isl_dim_type type, + const char *name); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_drop_dims( + __isl_take isl_union_pw_multi_aff *upma, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_reset_user( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_coalesce( + __isl_take isl_union_pw_multi_aff *upma); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_gist_params( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_set *context); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_gist( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *context); + +__isl_overload +__isl_give isl_union_pw_multi_aff * +isl_union_pw_multi_aff_pullback_union_pw_multi_aff( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_align_params( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_space *model); + +isl_size isl_union_pw_multi_aff_n_pw_multi_aff( + __isl_keep isl_union_pw_multi_aff *upma); + +isl_stat isl_union_pw_multi_aff_foreach_pw_multi_aff( + __isl_keep isl_union_pw_multi_aff *upma, + isl_stat (*fn)(__isl_take isl_pw_multi_aff *pma, void *user), + void *user); +__isl_export +__isl_give isl_pw_multi_aff *isl_union_pw_multi_aff_extract_pw_multi_aff( + __isl_keep isl_union_pw_multi_aff *upma, __isl_take isl_space *space); +__isl_export +isl_bool isl_union_pw_multi_aff_isa_pw_multi_aff( + __isl_keep isl_union_pw_multi_aff *upma); +__isl_export +__isl_give isl_pw_multi_aff *isl_union_pw_multi_aff_as_pw_multi_aff( + __isl_take isl_union_pw_multi_aff *upma); + +isl_bool isl_union_pw_multi_aff_involves_nan( + __isl_keep isl_union_pw_multi_aff *upma); +isl_bool isl_union_pw_multi_aff_plain_is_equal( + __isl_keep isl_union_pw_multi_aff *upma1, + __isl_keep isl_union_pw_multi_aff *upma2); + +__isl_export +__isl_give isl_union_set *isl_union_pw_multi_aff_domain( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_neg( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_add( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_union_add( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_sub( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_val( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_val *val); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_down_val( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_val *val); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_scale_multi_val( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_multi_val *mv); + +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_flat_range_product( + __isl_take isl_union_pw_multi_aff *upma1, + __isl_take isl_union_pw_multi_aff *upma2); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_range_factor_domain( + __isl_take isl_union_pw_multi_aff *upma); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_range_factor_range( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_intersect_params( + __isl_take isl_union_pw_multi_aff *upma, __isl_take isl_set *set); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_intersect_domain( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_multi_aff * +isl_union_pw_multi_aff_intersect_domain_wrapped_domain( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_multi_aff * +isl_union_pw_multi_aff_intersect_domain_wrapped_range( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_subtract_domain( + __isl_take isl_union_pw_multi_aff *upma, + __isl_take isl_union_set *uset); + +__isl_overload +__isl_give isl_union_map *isl_union_map_from_union_pw_multi_aff( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_printer *isl_printer_print_union_pw_multi_aff( + __isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_set( + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_map( + __isl_take isl_union_map *umap); + +__isl_constructor +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_read_from_str( + isl_ctx *ctx, const char *str); +void isl_union_pw_multi_aff_dump(__isl_keep isl_union_pw_multi_aff *upma); +__isl_give char *isl_union_pw_multi_aff_to_str( + __isl_keep isl_union_pw_multi_aff *upma); + +uint32_t isl_multi_pw_aff_get_hash(__isl_keep isl_multi_pw_aff *mpa); + +__isl_constructor +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_multi_aff( + __isl_take isl_multi_aff *ma); +__isl_constructor +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_aff( + __isl_take isl_pw_aff *pa); +__isl_export +__isl_give isl_set *isl_multi_pw_aff_domain(__isl_take isl_multi_pw_aff *mpa); +__isl_export +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_intersect_params( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set); +__isl_export +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_intersect_domain( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *domain); + +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_coalesce( + __isl_take isl_multi_pw_aff *mpa); +__isl_export +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_gist( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set); +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_gist_params( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_set *set); + +isl_bool isl_multi_pw_aff_is_cst(__isl_keep isl_multi_pw_aff *mpa); +isl_bool isl_multi_pw_aff_is_equal(__isl_keep isl_multi_pw_aff *mpa1, + __isl_keep isl_multi_pw_aff *mpa2); + +__isl_overload +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_multi_aff( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_pw_multi_aff( + __isl_take isl_multi_pw_aff *mpa, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_pullback_multi_pw_aff( + __isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2); + +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_move_dims( + __isl_take isl_multi_pw_aff *pma, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); + +__isl_give isl_set *isl_set_from_multi_pw_aff(__isl_take isl_multi_pw_aff *mpa); +__isl_give isl_map *isl_map_from_multi_pw_aff(__isl_take isl_multi_pw_aff *mpa); +__isl_give isl_pw_multi_aff *isl_pw_multi_aff_from_multi_pw_aff( + __isl_take isl_multi_pw_aff *mpa); +__isl_constructor +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_from_pw_multi_aff( + __isl_take isl_pw_multi_aff *pma); + +__isl_give isl_map *isl_multi_pw_aff_eq_map(__isl_take isl_multi_pw_aff *mpa1, + __isl_take isl_multi_pw_aff *mpa2); +__isl_give isl_map *isl_multi_pw_aff_lex_lt_map( + __isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2); +__isl_give isl_map *isl_multi_pw_aff_lex_gt_map( + __isl_take isl_multi_pw_aff *mpa1, __isl_take isl_multi_pw_aff *mpa2); + +__isl_export +__isl_give isl_set *isl_multi_pw_aff_bind(__isl_take isl_multi_pw_aff *mpa, + __isl_take isl_multi_id *tuple); + +__isl_constructor +__isl_give isl_multi_pw_aff *isl_multi_pw_aff_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give char *isl_multi_pw_aff_to_str(__isl_keep isl_multi_pw_aff *mpa); +__isl_give isl_printer *isl_printer_print_multi_pw_aff( + __isl_take isl_printer *p, __isl_keep isl_multi_pw_aff *mpa); +void isl_multi_pw_aff_dump(__isl_keep isl_multi_pw_aff *mpa); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_copy( + __isl_keep isl_union_pw_aff *upa); +__isl_null isl_union_pw_aff *isl_union_pw_aff_free( + __isl_take isl_union_pw_aff *upa); + +isl_ctx *isl_union_pw_aff_get_ctx(__isl_keep isl_union_pw_aff *upa); +__isl_export +__isl_give isl_space *isl_union_pw_aff_get_space( + __isl_keep isl_union_pw_aff *upa); +__isl_give isl_pw_aff_list *isl_union_pw_aff_get_pw_aff_list( + __isl_keep isl_union_pw_aff *upa); + +isl_size isl_union_pw_aff_dim(__isl_keep isl_union_pw_aff *upa, + enum isl_dim_type type); +__isl_give isl_union_pw_aff *isl_union_pw_aff_set_dim_name( + __isl_take isl_union_pw_aff *upa, enum isl_dim_type type, + unsigned pos, const char *s); + +int isl_union_pw_aff_find_dim_by_name(__isl_keep isl_union_pw_aff *upa, + enum isl_dim_type type, const char *name); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_drop_dims( + __isl_take isl_union_pw_aff *upa, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_union_pw_aff *isl_union_pw_aff_reset_user( + __isl_take isl_union_pw_aff *upa); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_empty_ctx(isl_ctx *ctx); +__isl_give isl_union_pw_aff *isl_union_pw_aff_empty_space( + __isl_take isl_space *space); +__isl_give isl_union_pw_aff *isl_union_pw_aff_empty( + __isl_take isl_space *space); +__isl_constructor +__isl_give isl_union_pw_aff *isl_union_pw_aff_from_pw_aff( + __isl_take isl_pw_aff *pa); +__isl_give isl_union_pw_aff *isl_union_pw_aff_val_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_val *v); +__isl_give isl_union_pw_aff *isl_union_pw_aff_aff_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_aff *aff); +__isl_give isl_union_pw_aff *isl_union_pw_aff_pw_aff_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_pw_aff *pa); +__isl_give isl_union_pw_aff *isl_union_pw_aff_add_pw_aff( + __isl_take isl_union_pw_aff *upa, __isl_take isl_pw_aff *pa); + +__isl_constructor +__isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_from_union_pw_aff( + __isl_take isl_union_pw_aff *upa); + +isl_size isl_union_pw_aff_n_pw_aff(__isl_keep isl_union_pw_aff *upa); + +isl_stat isl_union_pw_aff_foreach_pw_aff(__isl_keep isl_union_pw_aff *upa, + isl_stat (*fn)(__isl_take isl_pw_aff *pa, void *user), void *user); +__isl_give isl_pw_aff *isl_union_pw_aff_extract_pw_aff( + __isl_keep isl_union_pw_aff *upa, __isl_take isl_space *space); + +isl_bool isl_union_pw_aff_involves_nan(__isl_keep isl_union_pw_aff *upa); +isl_bool isl_union_pw_aff_plain_is_equal(__isl_keep isl_union_pw_aff *upa1, + __isl_keep isl_union_pw_aff *upa2); + +__isl_export +__isl_give isl_union_set *isl_union_pw_aff_domain( + __isl_take isl_union_pw_aff *upa); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_neg( + __isl_take isl_union_pw_aff *upa); + +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_add( + __isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_union_add( + __isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_sub( + __isl_take isl_union_pw_aff *upa1, __isl_take isl_union_pw_aff *upa2); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_coalesce( + __isl_take isl_union_pw_aff *upa); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_gist( + __isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *context); +__isl_give isl_union_pw_aff *isl_union_pw_aff_gist_params( + __isl_take isl_union_pw_aff *upa, __isl_take isl_set *context); + +__isl_overload +__isl_give isl_union_pw_aff *isl_union_pw_aff_pullback_union_pw_multi_aff( + __isl_take isl_union_pw_aff *upa, + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_floor( + __isl_take isl_union_pw_aff *upa); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_scale_val( + __isl_take isl_union_pw_aff *upa, __isl_take isl_val *v); +__isl_give isl_union_pw_aff *isl_union_pw_aff_scale_down_val( + __isl_take isl_union_pw_aff *upa, __isl_take isl_val *v); +__isl_give isl_union_pw_aff *isl_union_pw_aff_mod_val( + __isl_take isl_union_pw_aff *upa, __isl_take isl_val *f); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_align_params( + __isl_take isl_union_pw_aff *upa, __isl_take isl_space *model); + +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_params( + __isl_take isl_union_pw_aff *upa, __isl_take isl_set *set); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain( + __isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_wrapped_domain( + __isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_intersect_domain_wrapped_range( + __isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_pw_aff *isl_union_pw_aff_subtract_domain( + __isl_take isl_union_pw_aff *upa, __isl_take isl_union_set *uset); + +__isl_give isl_union_pw_aff *isl_union_pw_aff_set_dim_name( + __isl_take isl_union_pw_aff *upa, + enum isl_dim_type type, unsigned pos, const char *s); + +__isl_give isl_union_set *isl_union_pw_aff_zero_union_set( + __isl_take isl_union_pw_aff *upa); + +__isl_give isl_union_map *isl_union_map_from_union_pw_aff( + __isl_take isl_union_pw_aff *upa); + +__isl_overload +__isl_give isl_union_set *isl_union_pw_aff_bind_id( + __isl_take isl_union_pw_aff *upa, __isl_take isl_id *id); + +__isl_constructor +__isl_give isl_union_pw_aff *isl_union_pw_aff_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give char *isl_union_pw_aff_to_str(__isl_keep isl_union_pw_aff *upa); +__isl_give isl_printer *isl_printer_print_union_pw_aff( + __isl_take isl_printer *p, __isl_keep isl_union_pw_aff *upa); +void isl_union_pw_aff_dump(__isl_keep isl_union_pw_aff *upa); + +isl_ctx *isl_multi_union_pw_aff_get_ctx( __isl_keep isl_multi_union_pw_aff *multi); __isl_export __isl_give isl_space *isl_multi_union_pw_aff_get_space( __isl_keep isl_multi_union_pw_aff *multi); __isl_give isl_space *isl_multi_union_pw_aff_get_domain_space( __isl_keep isl_multi_union_pw_aff *multi); __isl_constructor __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_union_pw_aff_list( __isl_take isl_space *space, __isl_take isl_union_pw_aff_list *list); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_copy( __isl_keep isl_multi_union_pw_aff *multi); __isl_null isl_multi_union_pw_aff *isl_multi_union_pw_aff_free( __isl_take isl_multi_union_pw_aff *multi); __isl_export isl_bool isl_multi_union_pw_aff_plain_is_equal( __isl_keep isl_multi_union_pw_aff *multi1, __isl_keep isl_multi_union_pw_aff *multi2); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_reset_user( __isl_take isl_multi_union_pw_aff *multi); __isl_export isl_size isl_multi_union_pw_aff_size(__isl_keep isl_multi_union_pw_aff *multi); __isl_export __isl_give isl_union_pw_aff *isl_multi_union_pw_aff_get_at( __isl_keep isl_multi_union_pw_aff *multi, int pos); __isl_give isl_union_pw_aff *isl_multi_union_pw_aff_get_union_pw_aff( __isl_keep isl_multi_union_pw_aff *multi, int pos); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_at( __isl_take isl_multi_union_pw_aff *multi, int pos, __isl_take isl_union_pw_aff *el); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_union_pw_aff( __isl_take isl_multi_union_pw_aff *multi, int pos, __isl_take isl_union_pw_aff *el); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_range_splice( __isl_take isl_multi_union_pw_aff *multi1, unsigned pos, __isl_take isl_multi_union_pw_aff *multi2); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_flatten_range( __isl_take isl_multi_union_pw_aff *multi); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_flat_range_product( __isl_take isl_multi_union_pw_aff *multi1, __isl_take isl_multi_union_pw_aff *multi2); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_range_product( __isl_take isl_multi_union_pw_aff *multi1, __isl_take isl_multi_union_pw_aff *multi2); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_factor_range( __isl_take isl_multi_union_pw_aff *multi); isl_bool isl_multi_union_pw_aff_range_is_wrapping( __isl_keep isl_multi_union_pw_aff *multi); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_range_factor_domain( __isl_take isl_multi_union_pw_aff *multi); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_range_factor_range( __isl_take isl_multi_union_pw_aff *multi); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_align_params( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_space *model); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_range( __isl_take isl_multi_union_pw_aff *multi); +__isl_overload __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_scale_val( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_scale_down_val( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_val *v); __isl_overload __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_scale_multi_val( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_overload __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_scale_down_multi_val( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_mod_multi_val( __isl_take isl_multi_union_pw_aff *multi, __isl_take isl_multi_val *mv); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_add( __isl_take isl_multi_union_pw_aff *multi1, __isl_take isl_multi_union_pw_aff *multi2); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_sub( __isl_take isl_multi_union_pw_aff *multi1, __isl_take isl_multi_union_pw_aff *multi2); __isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_neg( __isl_take isl_multi_union_pw_aff *multi); +__isl_export __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_zero( __isl_take isl_space *space); +isl_bool isl_multi_union_pw_aff_involves_nan( __isl_keep isl_multi_union_pw_aff *multi); +isl_size isl_multi_union_pw_aff_dim(__isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_drop_dims( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type, unsigned first, unsigned n); +int isl_multi_union_pw_aff_find_dim_by_name( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type, const char *name); int isl_multi_union_pw_aff_find_dim_by_id( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type, __isl_keep isl_id *id); __isl_give isl_id *isl_multi_union_pw_aff_get_dim_id( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type, unsigned pos); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_dim_name( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type, unsigned pos, const char *s); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_dim_id( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +const char *isl_multi_union_pw_aff_get_tuple_name( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type); isl_bool isl_multi_union_pw_aff_has_tuple_id( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type); __isl_give isl_id *isl_multi_union_pw_aff_get_tuple_id( __isl_keep isl_multi_union_pw_aff *multi, enum isl_dim_type type); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_tuple_name( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type, const char *s); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_set_tuple_id( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type, __isl_take isl_id *id); __isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_reset_tuple_id( __isl_take isl_multi_union_pw_aff *multi, enum isl_dim_type type); + +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_multi_aff( + __isl_take isl_multi_aff *ma); +__isl_constructor +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_union_pw_aff( + __isl_take isl_union_pw_aff *upa); +__isl_constructor +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_multi_pw_aff( + __isl_take isl_multi_pw_aff *mpa); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_multi_val_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_multi_val *mv); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_multi_aff_on_domain( + __isl_take isl_union_set *domain, __isl_take isl_multi_aff *ma); +__isl_give isl_multi_union_pw_aff * +isl_multi_union_pw_aff_pw_multi_aff_on_domain(__isl_take isl_union_set *domain, + __isl_take isl_pw_multi_aff *pma); + +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_floor( + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_export +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_domain( + __isl_take isl_multi_union_pw_aff *mupa, + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_params( + __isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_set *params); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_intersect_range( + __isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_set *set); + +__isl_export +__isl_give isl_union_set *isl_multi_union_pw_aff_domain( + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_coalesce( + __isl_take isl_multi_union_pw_aff *aff); +__isl_export +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_gist( + __isl_take isl_multi_union_pw_aff *aff, + __isl_take isl_union_set *context); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_gist_params( + __isl_take isl_multi_union_pw_aff *aff, __isl_take isl_set *context); + +__isl_give isl_union_pw_aff *isl_multi_union_pw_aff_apply_aff( + __isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_aff *aff); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_apply_multi_aff( + __isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_multi_aff *ma); +__isl_give isl_union_pw_aff *isl_multi_union_pw_aff_apply_pw_aff( + __isl_take isl_multi_union_pw_aff *mupa, __isl_take isl_pw_aff *pa); +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_apply_pw_multi_aff( + __isl_take isl_multi_union_pw_aff *mupa, + __isl_take isl_pw_multi_aff *pma); + +__isl_overload +__isl_give isl_multi_union_pw_aff * +isl_multi_union_pw_aff_pullback_union_pw_multi_aff( + __isl_take isl_multi_union_pw_aff *mupa, + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_pw_multi_aff * +isl_union_pw_multi_aff_from_multi_union_pw_aff( + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_export +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_union_add( + __isl_take isl_multi_union_pw_aff *mupa1, + __isl_take isl_multi_union_pw_aff *mupa2); + +__isl_give isl_multi_union_pw_aff * +isl_multi_union_pw_aff_from_union_pw_multi_aff( + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_from_union_map( + __isl_take isl_union_map *umap); +__isl_overload +__isl_give isl_union_map *isl_union_map_from_multi_union_pw_aff( + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_give isl_union_set *isl_multi_union_pw_aff_zero_union_set( + __isl_take isl_multi_union_pw_aff *mupa); +__isl_export +__isl_give isl_union_set *isl_multi_union_pw_aff_bind( + __isl_take isl_multi_union_pw_aff *mupa, + __isl_take isl_multi_id *tuple); + +__isl_give isl_multi_pw_aff *isl_multi_union_pw_aff_extract_multi_pw_aff( + __isl_keep isl_multi_union_pw_aff *mupa, __isl_take isl_space *space); + +__isl_constructor +__isl_give isl_multi_union_pw_aff *isl_multi_union_pw_aff_read_from_str( + isl_ctx *ctx, const char *str); +__isl_give char *isl_multi_union_pw_aff_to_str( + __isl_keep isl_multi_union_pw_aff *mupa); +__isl_give isl_printer *isl_printer_print_multi_union_pw_aff( + __isl_take isl_printer *p, __isl_keep isl_multi_union_pw_aff *mupa); +void isl_multi_union_pw_aff_dump(__isl_keep isl_multi_union_pw_aff *mupa); + +isl_ctx *isl_aff_list_get_ctx(__isl_keep isl_aff_list *list); __isl_constructor __isl_give isl_aff_list *isl_aff_list_from_aff( __isl_take isl_aff *el); __isl_constructor __isl_give isl_aff_list *isl_aff_list_alloc(isl_ctx *ctx, int n); __isl_give isl_aff_list *isl_aff_list_copy( __isl_keep isl_aff_list *list); __isl_null isl_aff_list *isl_aff_list_free( __isl_take isl_aff_list *list); __isl_export __isl_give isl_aff_list *isl_aff_list_add( __isl_take isl_aff_list *list, __isl_take isl_aff *el); __isl_give isl_aff_list *isl_aff_list_insert( __isl_take isl_aff_list *list, unsigned pos, __isl_take struct isl_aff *el); __isl_give isl_aff_list *isl_aff_list_drop( __isl_take isl_aff_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_aff_list *isl_aff_list_clear( __isl_take isl_aff_list *list); __isl_give isl_aff_list *isl_aff_list_swap( __isl_take isl_aff_list *list, unsigned pos1, unsigned pos2); __isl_give isl_aff_list *isl_aff_list_reverse( __isl_take isl_aff_list *list); __isl_export __isl_give isl_aff_list *isl_aff_list_concat( __isl_take isl_aff_list *list1, __isl_take isl_aff_list *list2); __isl_export isl_size isl_aff_list_size(__isl_keep isl_aff_list *list); isl_size isl_aff_list_n_aff(__isl_keep isl_aff_list *list); __isl_export __isl_give isl_aff *isl_aff_list_get_at( __isl_keep isl_aff_list *list, int index); __isl_give struct isl_aff *isl_aff_list_get_aff( __isl_keep isl_aff_list *list, int index); __isl_give struct isl_aff_list *isl_aff_list_set_aff( __isl_take struct isl_aff_list *list, int index, __isl_take struct isl_aff *el); __isl_export isl_stat isl_aff_list_foreach(__isl_keep isl_aff_list *list, isl_stat (*fn)(__isl_take isl_aff *el, void *user), void *user); __isl_give isl_aff_list *isl_aff_list_map( __isl_take isl_aff_list *list, __isl_give isl_aff * (*fn)(__isl_take isl_aff *el, void *user), void *user); __isl_give isl_aff_list *isl_aff_list_sort( __isl_take isl_aff_list *list, int (*cmp)(__isl_keep struct isl_aff *a, __isl_keep struct isl_aff *b, void *user), void *user); isl_stat isl_aff_list_foreach_scc(__isl_keep isl_aff_list *list, isl_bool (*follows)(__isl_keep struct isl_aff *a, __isl_keep struct isl_aff *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_aff_list *scc, void *user), void *fn_user); __isl_give char *isl_aff_list_to_str( __isl_keep isl_aff_list *list); __isl_give isl_printer *isl_printer_print_aff_list( __isl_take isl_printer *p, __isl_keep isl_aff_list *list); void isl_aff_list_dump(__isl_keep isl_aff_list *list); +isl_ctx *isl_pw_aff_list_get_ctx(__isl_keep isl_pw_aff_list *list); __isl_constructor __isl_give isl_pw_aff_list *isl_pw_aff_list_from_pw_aff( __isl_take isl_pw_aff *el); __isl_constructor __isl_give isl_pw_aff_list *isl_pw_aff_list_alloc(isl_ctx *ctx, int n); __isl_give isl_pw_aff_list *isl_pw_aff_list_copy( __isl_keep isl_pw_aff_list *list); __isl_null isl_pw_aff_list *isl_pw_aff_list_free( __isl_take isl_pw_aff_list *list); __isl_export __isl_give isl_pw_aff_list *isl_pw_aff_list_add( __isl_take isl_pw_aff_list *list, __isl_take isl_pw_aff *el); __isl_give isl_pw_aff_list *isl_pw_aff_list_insert( __isl_take isl_pw_aff_list *list, unsigned pos, __isl_take struct isl_pw_aff *el); __isl_give isl_pw_aff_list *isl_pw_aff_list_drop( __isl_take isl_pw_aff_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_pw_aff_list *isl_pw_aff_list_clear( __isl_take isl_pw_aff_list *list); __isl_give isl_pw_aff_list *isl_pw_aff_list_swap( __isl_take isl_pw_aff_list *list, unsigned pos1, unsigned pos2); __isl_give isl_pw_aff_list *isl_pw_aff_list_reverse( __isl_take isl_pw_aff_list *list); __isl_export __isl_give isl_pw_aff_list *isl_pw_aff_list_concat( __isl_take isl_pw_aff_list *list1, __isl_take isl_pw_aff_list *list2); __isl_export isl_size isl_pw_aff_list_size(__isl_keep isl_pw_aff_list *list); isl_size isl_pw_aff_list_n_pw_aff(__isl_keep isl_pw_aff_list *list); __isl_export __isl_give isl_pw_aff *isl_pw_aff_list_get_at( __isl_keep isl_pw_aff_list *list, int index); __isl_give struct isl_pw_aff *isl_pw_aff_list_get_pw_aff( __isl_keep isl_pw_aff_list *list, int index); __isl_give struct isl_pw_aff_list *isl_pw_aff_list_set_pw_aff( __isl_take struct isl_pw_aff_list *list, int index, __isl_take struct isl_pw_aff *el); __isl_export isl_stat isl_pw_aff_list_foreach(__isl_keep isl_pw_aff_list *list, isl_stat (*fn)(__isl_take isl_pw_aff *el, void *user), void *user); __isl_give isl_pw_aff_list *isl_pw_aff_list_map( __isl_take isl_pw_aff_list *list, __isl_give isl_pw_aff * (*fn)(__isl_take isl_pw_aff *el, void *user), void *user); __isl_give isl_pw_aff_list *isl_pw_aff_list_sort( __isl_take isl_pw_aff_list *list, int (*cmp)(__isl_keep struct isl_pw_aff *a, __isl_keep struct isl_pw_aff *b, void *user), void *user); isl_stat isl_pw_aff_list_foreach_scc(__isl_keep isl_pw_aff_list *list, isl_bool (*follows)(__isl_keep struct isl_pw_aff *a, __isl_keep struct isl_pw_aff *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_pw_aff_list *scc, void *user), void *fn_user); __isl_give char *isl_pw_aff_list_to_str( __isl_keep isl_pw_aff_list *list); __isl_give isl_printer *isl_printer_print_pw_aff_list( __isl_take isl_printer *p, __isl_keep isl_pw_aff_list *list); void isl_pw_aff_list_dump(__isl_keep isl_pw_aff_list *list); +isl_ctx *isl_pw_multi_aff_list_get_ctx(__isl_keep isl_pw_multi_aff_list *list); __isl_constructor __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_from_pw_multi_aff( __isl_take isl_pw_multi_aff *el); __isl_constructor __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_alloc(isl_ctx *ctx, int n); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_copy( __isl_keep isl_pw_multi_aff_list *list); __isl_null isl_pw_multi_aff_list *isl_pw_multi_aff_list_free( __isl_take isl_pw_multi_aff_list *list); __isl_export __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_add( __isl_take isl_pw_multi_aff_list *list, __isl_take isl_pw_multi_aff *el); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_insert( __isl_take isl_pw_multi_aff_list *list, unsigned pos, __isl_take struct isl_pw_multi_aff *el); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_drop( __isl_take isl_pw_multi_aff_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_clear( __isl_take isl_pw_multi_aff_list *list); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_swap( __isl_take isl_pw_multi_aff_list *list, unsigned pos1, unsigned pos2); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_reverse( __isl_take isl_pw_multi_aff_list *list); __isl_export __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_concat( __isl_take isl_pw_multi_aff_list *list1, __isl_take isl_pw_multi_aff_list *list2); __isl_export isl_size isl_pw_multi_aff_list_size(__isl_keep isl_pw_multi_aff_list *list); isl_size isl_pw_multi_aff_list_n_pw_multi_aff(__isl_keep isl_pw_multi_aff_list *list); __isl_export __isl_give isl_pw_multi_aff *isl_pw_multi_aff_list_get_at( __isl_keep isl_pw_multi_aff_list *list, int index); __isl_give struct isl_pw_multi_aff *isl_pw_multi_aff_list_get_pw_multi_aff( __isl_keep isl_pw_multi_aff_list *list, int index); __isl_give struct isl_pw_multi_aff_list *isl_pw_multi_aff_list_set_pw_multi_aff( __isl_take struct isl_pw_multi_aff_list *list, int index, __isl_take struct isl_pw_multi_aff *el); __isl_export isl_stat isl_pw_multi_aff_list_foreach(__isl_keep isl_pw_multi_aff_list *list, isl_stat (*fn)(__isl_take isl_pw_multi_aff *el, void *user), void *user); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_map( __isl_take isl_pw_multi_aff_list *list, __isl_give isl_pw_multi_aff * (*fn)(__isl_take isl_pw_multi_aff *el, void *user), void *user); __isl_give isl_pw_multi_aff_list *isl_pw_multi_aff_list_sort( __isl_take isl_pw_multi_aff_list *list, int (*cmp)(__isl_keep struct isl_pw_multi_aff *a, __isl_keep struct isl_pw_multi_aff *b, void *user), void *user); isl_stat isl_pw_multi_aff_list_foreach_scc(__isl_keep isl_pw_multi_aff_list *list, isl_bool (*follows)(__isl_keep struct isl_pw_multi_aff *a, __isl_keep struct isl_pw_multi_aff *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_pw_multi_aff_list *scc, void *user), void *fn_user); __isl_give char *isl_pw_multi_aff_list_to_str( __isl_keep isl_pw_multi_aff_list *list); __isl_give isl_printer *isl_printer_print_pw_multi_aff_list( __isl_take isl_printer *p, __isl_keep isl_pw_multi_aff_list *list); void isl_pw_multi_aff_list_dump(__isl_keep isl_pw_multi_aff_list *list); +isl_ctx *isl_union_pw_aff_list_get_ctx(__isl_keep isl_union_pw_aff_list *list); __isl_constructor __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_from_union_pw_aff( __isl_take isl_union_pw_aff *el); __isl_constructor __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_alloc(isl_ctx *ctx, int n); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_copy( __isl_keep isl_union_pw_aff_list *list); __isl_null isl_union_pw_aff_list *isl_union_pw_aff_list_free( __isl_take isl_union_pw_aff_list *list); __isl_export __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_add( __isl_take isl_union_pw_aff_list *list, __isl_take isl_union_pw_aff *el); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_insert( __isl_take isl_union_pw_aff_list *list, unsigned pos, __isl_take struct isl_union_pw_aff *el); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_drop( __isl_take isl_union_pw_aff_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_clear( __isl_take isl_union_pw_aff_list *list); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_swap( __isl_take isl_union_pw_aff_list *list, unsigned pos1, unsigned pos2); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_reverse( __isl_take isl_union_pw_aff_list *list); __isl_export __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_concat( __isl_take isl_union_pw_aff_list *list1, __isl_take isl_union_pw_aff_list *list2); __isl_export isl_size isl_union_pw_aff_list_size(__isl_keep isl_union_pw_aff_list *list); isl_size isl_union_pw_aff_list_n_union_pw_aff(__isl_keep isl_union_pw_aff_list *list); __isl_export __isl_give isl_union_pw_aff *isl_union_pw_aff_list_get_at( __isl_keep isl_union_pw_aff_list *list, int index); __isl_give struct isl_union_pw_aff *isl_union_pw_aff_list_get_union_pw_aff( __isl_keep isl_union_pw_aff_list *list, int index); __isl_give struct isl_union_pw_aff_list *isl_union_pw_aff_list_set_union_pw_aff( __isl_take struct isl_union_pw_aff_list *list, int index, __isl_take struct isl_union_pw_aff *el); __isl_export isl_stat isl_union_pw_aff_list_foreach(__isl_keep isl_union_pw_aff_list *list, isl_stat (*fn)(__isl_take isl_union_pw_aff *el, void *user), void *user); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_map( __isl_take isl_union_pw_aff_list *list, __isl_give isl_union_pw_aff * (*fn)(__isl_take isl_union_pw_aff *el, void *user), void *user); __isl_give isl_union_pw_aff_list *isl_union_pw_aff_list_sort( __isl_take isl_union_pw_aff_list *list, int (*cmp)(__isl_keep struct isl_union_pw_aff *a, __isl_keep struct isl_union_pw_aff *b, void *user), void *user); isl_stat isl_union_pw_aff_list_foreach_scc(__isl_keep isl_union_pw_aff_list *list, isl_bool (*follows)(__isl_keep struct isl_union_pw_aff *a, __isl_keep struct isl_union_pw_aff *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_union_pw_aff_list *scc, void *user), void *fn_user); __isl_give char *isl_union_pw_aff_list_to_str( __isl_keep isl_union_pw_aff_list *list); __isl_give isl_printer *isl_printer_print_union_pw_aff_list( __isl_take isl_printer *p, __isl_keep isl_union_pw_aff_list *list); void isl_union_pw_aff_list_dump(__isl_keep isl_union_pw_aff_list *list); +isl_ctx *isl_union_pw_multi_aff_list_get_ctx(__isl_keep isl_union_pw_multi_aff_list *list); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_from_union_pw_multi_aff( __isl_take isl_union_pw_multi_aff *el); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_alloc(isl_ctx *ctx, int n); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_copy( __isl_keep isl_union_pw_multi_aff_list *list); __isl_null isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_free( __isl_take isl_union_pw_multi_aff_list *list); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_add( __isl_take isl_union_pw_multi_aff_list *list, __isl_take isl_union_pw_multi_aff *el); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_insert( __isl_take isl_union_pw_multi_aff_list *list, unsigned pos, __isl_take struct isl_union_pw_multi_aff *el); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_drop( __isl_take isl_union_pw_multi_aff_list *list, unsigned first, unsigned n); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_clear( __isl_take isl_union_pw_multi_aff_list *list); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_swap( __isl_take isl_union_pw_multi_aff_list *list, unsigned pos1, unsigned pos2); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_reverse( __isl_take isl_union_pw_multi_aff_list *list); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_concat( __isl_take isl_union_pw_multi_aff_list *list1, __isl_take isl_union_pw_multi_aff_list *list2); isl_size isl_union_pw_multi_aff_list_size(__isl_keep isl_union_pw_multi_aff_list *list); isl_size isl_union_pw_multi_aff_list_n_union_pw_multi_aff(__isl_keep isl_union_pw_multi_aff_list *list); __isl_give isl_union_pw_multi_aff *isl_union_pw_multi_aff_list_get_at( __isl_keep isl_union_pw_multi_aff_list *list, int index); __isl_give struct isl_union_pw_multi_aff *isl_union_pw_multi_aff_list_get_union_pw_multi_aff( __isl_keep isl_union_pw_multi_aff_list *list, int index); __isl_give struct isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_set_union_pw_multi_aff( __isl_take struct isl_union_pw_multi_aff_list *list, int index, __isl_take struct isl_union_pw_multi_aff *el); isl_stat isl_union_pw_multi_aff_list_foreach(__isl_keep isl_union_pw_multi_aff_list *list, isl_stat (*fn)(__isl_take isl_union_pw_multi_aff *el, void *user), void *user); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_map( __isl_take isl_union_pw_multi_aff_list *list, __isl_give isl_union_pw_multi_aff * (*fn)(__isl_take isl_union_pw_multi_aff *el, void *user), void *user); __isl_give isl_union_pw_multi_aff_list *isl_union_pw_multi_aff_list_sort( __isl_take isl_union_pw_multi_aff_list *list, int (*cmp)(__isl_keep struct isl_union_pw_multi_aff *a, __isl_keep struct isl_union_pw_multi_aff *b, void *user), void *user); isl_stat isl_union_pw_multi_aff_list_foreach_scc(__isl_keep isl_union_pw_multi_aff_list *list, isl_bool (*follows)(__isl_keep struct isl_union_pw_multi_aff *a, __isl_keep struct isl_union_pw_multi_aff *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_union_pw_multi_aff_list *scc, void *user), void *fn_user); __isl_give char *isl_union_pw_multi_aff_list_to_str( __isl_keep isl_union_pw_multi_aff_list *list); __isl_give isl_printer *isl_printer_print_union_pw_multi_aff_list( __isl_take isl_printer *p, __isl_keep isl_union_pw_multi_aff_list *list); void isl_union_pw_multi_aff_list_dump(__isl_keep isl_union_pw_multi_aff_list *list); diff --git a/preproc-headers/9758fb9d3cf05e1cb1ad978ffd40652fe19c3c47b83fe7ca4ec54b3f0c4bff08 b/preproc-headers/9758fb9d3cf05e1cb1ad978ffd40652fe19c3c47b83fe7ca4ec54b3f0c4bff08 new file mode 100644 index 0000000..668c84d --- /dev/null +++ b/preproc-headers/9758fb9d3cf05e1cb1ad978ffd40652fe19c3c47b83fe7ca4ec54b3f0c4bff08 @@ -0,0 +1,194 @@ + + + +#include +#include +#include +#include +#include +#include +#include +#include + + + + + +struct __isl_export isl_schedule_constraints; +typedef struct isl_schedule_constraints isl_schedule_constraints; + +isl_stat isl_options_set_schedule_max_coefficient(isl_ctx *ctx, int val); +int isl_options_get_schedule_max_coefficient(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_max_constant_term(isl_ctx *ctx, int val); +int isl_options_get_schedule_max_constant_term(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_maximize_band_depth(isl_ctx *ctx, int val); +int isl_options_get_schedule_maximize_band_depth(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_maximize_coincidence(isl_ctx *ctx, int val); +int isl_options_get_schedule_maximize_coincidence(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_outer_coincidence(isl_ctx *ctx, int val); +int isl_options_get_schedule_outer_coincidence(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_split_scaled(isl_ctx *ctx, int val); +int isl_options_get_schedule_split_scaled(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_treat_coalescing(isl_ctx *ctx, int val); +int isl_options_get_schedule_treat_coalescing(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_separate_components(isl_ctx *ctx, int val); +int isl_options_get_schedule_separate_components(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_serialize_sccs(isl_ctx *ctx, int val); +int isl_options_get_schedule_serialize_sccs(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_whole_component(isl_ctx *ctx, int val); +int isl_options_get_schedule_whole_component(isl_ctx *ctx); + +isl_stat isl_options_set_schedule_carry_self_first(isl_ctx *ctx, int val); +int isl_options_get_schedule_carry_self_first(isl_ctx *ctx); + +__isl_give isl_schedule_constraints *isl_schedule_constraints_copy( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_schedule_constraints *isl_schedule_constraints_on_domain( + __isl_take isl_union_set *domain); +__isl_export +__isl_give isl_schedule_constraints *isl_schedule_constraints_set_context( + __isl_take isl_schedule_constraints *sc, __isl_take isl_set *context); +__isl_export +__isl_give isl_schedule_constraints *isl_schedule_constraints_set_validity( + __isl_take isl_schedule_constraints *sc, + __isl_take isl_union_map *validity); +__isl_export +__isl_give isl_schedule_constraints *isl_schedule_constraints_set_coincidence( + __isl_take isl_schedule_constraints *sc, + __isl_take isl_union_map *coincidence); +__isl_export +__isl_give isl_schedule_constraints *isl_schedule_constraints_set_proximity( + __isl_take isl_schedule_constraints *sc, + __isl_take isl_union_map *proximity); +__isl_export +__isl_give isl_schedule_constraints * +isl_schedule_constraints_set_conditional_validity( + __isl_take isl_schedule_constraints *sc, + __isl_take isl_union_map *condition, + __isl_take isl_union_map *validity); +__isl_null isl_schedule_constraints *isl_schedule_constraints_free( + __isl_take isl_schedule_constraints *sc); + +isl_ctx *isl_schedule_constraints_get_ctx( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_set *isl_schedule_constraints_get_domain( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_set *isl_schedule_constraints_get_context( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_map *isl_schedule_constraints_get_validity( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_map *isl_schedule_constraints_get_coincidence( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_map *isl_schedule_constraints_get_proximity( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_map *isl_schedule_constraints_get_conditional_validity( + __isl_keep isl_schedule_constraints *sc); +__isl_export +__isl_give isl_union_map * +isl_schedule_constraints_get_conditional_validity_condition( + __isl_keep isl_schedule_constraints *sc); + +__isl_give isl_schedule_constraints *isl_schedule_constraints_apply( + __isl_take isl_schedule_constraints *sc, + __isl_take isl_union_map *umap); + +__isl_constructor +__isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_str( + isl_ctx *ctx, const char *str); +__isl_give isl_schedule_constraints *isl_schedule_constraints_read_from_file( + isl_ctx *ctx, FILE *input); +__isl_give isl_printer *isl_printer_print_schedule_constraints( + __isl_take isl_printer *p, __isl_keep isl_schedule_constraints *sc); +void isl_schedule_constraints_dump(__isl_keep isl_schedule_constraints *sc); +__isl_give char *isl_schedule_constraints_to_str( + __isl_keep isl_schedule_constraints *sc); + +__isl_export +__isl_give isl_schedule *isl_schedule_constraints_compute_schedule( + __isl_take isl_schedule_constraints *sc); + +__isl_give isl_schedule *isl_union_set_compute_schedule( + __isl_take isl_union_set *domain, + __isl_take isl_union_map *validity, + __isl_take isl_union_map *proximity); + +__isl_give isl_schedule *isl_schedule_empty(__isl_take isl_space *space); +__isl_export +__isl_give isl_schedule *isl_schedule_from_domain( + __isl_take isl_union_set *domain); +__isl_give isl_schedule *isl_schedule_copy(__isl_keep isl_schedule *sched); +__isl_null isl_schedule *isl_schedule_free(__isl_take isl_schedule *sched); +__isl_export +__isl_give isl_union_map *isl_schedule_get_map(__isl_keep isl_schedule *sched); + +isl_ctx *isl_schedule_get_ctx(__isl_keep isl_schedule *sched); +isl_bool isl_schedule_plain_is_equal(__isl_keep isl_schedule *schedule1, + __isl_keep isl_schedule *schedule2); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_get_root( + __isl_keep isl_schedule *schedule); +__isl_give isl_union_set *isl_schedule_get_domain( + __isl_keep isl_schedule *schedule); + +isl_stat isl_schedule_foreach_schedule_node_top_down( + __isl_keep isl_schedule *sched, + isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user), + void *user); +__isl_give isl_schedule *isl_schedule_map_schedule_node_bottom_up( + __isl_take isl_schedule *schedule, + __isl_give isl_schedule_node *(*fn)( + __isl_take isl_schedule_node *node, void *user), void *user); + +__isl_give isl_schedule *isl_schedule_insert_context( + __isl_take isl_schedule *schedule, __isl_take isl_set *context); +__isl_give isl_schedule *isl_schedule_insert_partial_schedule( + __isl_take isl_schedule *schedule, + __isl_take isl_multi_union_pw_aff *partial); +__isl_give isl_schedule *isl_schedule_insert_guard( + __isl_take isl_schedule *schedule, __isl_take isl_set *guard); +__isl_give isl_schedule *isl_schedule_sequence( + __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2); +__isl_give isl_schedule *isl_schedule_set( + __isl_take isl_schedule *schedule1, __isl_take isl_schedule *schedule2); +__isl_give isl_schedule *isl_schedule_intersect_domain( + __isl_take isl_schedule *schedule, __isl_take isl_union_set *domain); +__isl_give isl_schedule *isl_schedule_gist_domain_params( + __isl_take isl_schedule *schedule, __isl_take isl_set *context); + +__isl_give isl_schedule *isl_schedule_reset_user( + __isl_take isl_schedule *schedule); +__isl_give isl_schedule *isl_schedule_align_params( + __isl_take isl_schedule *schedule, __isl_take isl_space *space); +__isl_overload +__isl_give isl_schedule *isl_schedule_pullback_union_pw_multi_aff( + __isl_take isl_schedule *schedule, + __isl_take isl_union_pw_multi_aff *upma); +__isl_give isl_schedule *isl_schedule_expand(__isl_take isl_schedule *schedule, + __isl_take isl_union_pw_multi_aff *contraction, + __isl_take isl_schedule *expansion); + +__isl_give isl_schedule *isl_schedule_read_from_file(isl_ctx *ctx, FILE *input); +__isl_constructor +__isl_give isl_schedule *isl_schedule_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_printer *isl_printer_print_schedule(__isl_take isl_printer *p, + __isl_keep isl_schedule *schedule); +void isl_schedule_dump(__isl_keep isl_schedule *schedule); +__isl_give char *isl_schedule_to_str(__isl_keep isl_schedule *schedule); diff --git a/preproc-headers/97d9776cea0d429fb413464bb90a93f2505dbe09c5379dd341ec5ae7732458a2 b/preproc-headers/97d9776cea0d429fb413464bb90a93f2505dbe09c5379dd341ec5ae7732458a2 new file mode 100644 index 0000000..b7c238c --- /dev/null +++ b/preproc-headers/97d9776cea0d429fb413464bb90a93f2505dbe09c5379dd341ec5ae7732458a2 @@ -0,0 +1,178 @@ +#line 13 +#include +#include +#include +#include + + + + + +isl_ctx *isl_space_get_ctx(__isl_keep isl_space *space); +__isl_export +__isl_give isl_space *isl_space_unit(isl_ctx *ctx); +__isl_give isl_space *isl_space_alloc(isl_ctx *ctx, + unsigned nparam, unsigned n_in, unsigned n_out); +__isl_give isl_space *isl_space_set_alloc(isl_ctx *ctx, + unsigned nparam, unsigned dim); +__isl_give isl_space *isl_space_params_alloc(isl_ctx *ctx, unsigned nparam); +__isl_give isl_space *isl_space_copy(__isl_keep isl_space *dim); +__isl_null isl_space *isl_space_free(__isl_take isl_space *space); + +isl_bool isl_space_is_params(__isl_keep isl_space *space); +isl_bool isl_space_is_set(__isl_keep isl_space *space); +isl_bool isl_space_is_map(__isl_keep isl_space *space); + +__isl_give isl_space *isl_space_add_param_id(__isl_take isl_space *space, + __isl_take isl_id *id); + +__isl_give isl_space *isl_space_set_tuple_name(__isl_take isl_space *space, + enum isl_dim_type type, const char *s); +isl_bool isl_space_has_tuple_name(__isl_keep isl_space *space, + enum isl_dim_type type); +__isl_keep const char *isl_space_get_tuple_name(__isl_keep isl_space *space, + enum isl_dim_type type); +__isl_give isl_space *isl_space_set_tuple_id(__isl_take isl_space *space, + enum isl_dim_type type, __isl_take isl_id *id); +__isl_give isl_space *isl_space_reset_tuple_id(__isl_take isl_space *space, + enum isl_dim_type type); +isl_bool isl_space_has_tuple_id(__isl_keep isl_space *space, + enum isl_dim_type type); +__isl_give isl_id *isl_space_get_tuple_id(__isl_keep isl_space *space, + enum isl_dim_type type); +__isl_give isl_space *isl_space_reset_user(__isl_take isl_space *space); + +__isl_give isl_space *isl_space_set_dim_id(__isl_take isl_space *dim, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +isl_bool isl_space_has_dim_id(__isl_keep isl_space *space, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_space_get_dim_id(__isl_keep isl_space *space, + enum isl_dim_type type, unsigned pos); + +int isl_space_find_dim_by_id(__isl_keep isl_space *space, + enum isl_dim_type type, __isl_keep isl_id *id); +int isl_space_find_dim_by_name(__isl_keep isl_space *space, + enum isl_dim_type type, const char *name); + +isl_bool isl_space_has_dim_name(__isl_keep isl_space *space, + enum isl_dim_type type, unsigned pos); +__isl_give isl_space *isl_space_set_dim_name(__isl_take isl_space *space, + enum isl_dim_type type, unsigned pos, + __isl_keep const char *name); +__isl_keep const char *isl_space_get_dim_name(__isl_keep isl_space *space, + enum isl_dim_type type, unsigned pos); + +ISL_DEPRECATED +__isl_give isl_space *isl_space_extend(__isl_take isl_space *dim, + unsigned nparam, unsigned n_in, unsigned n_out); +__isl_give isl_space *isl_space_add_dims(__isl_take isl_space *space, + enum isl_dim_type type, unsigned n); +__isl_give isl_space *isl_space_move_dims(__isl_take isl_space *space, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_space *isl_space_insert_dims(__isl_take isl_space *space, + enum isl_dim_type type, unsigned pos, unsigned n); +__isl_give isl_space *isl_space_join(__isl_take isl_space *left, + __isl_take isl_space *right); +__isl_give isl_space *isl_space_product(__isl_take isl_space *left, + __isl_take isl_space *right); +__isl_give isl_space *isl_space_domain_product(__isl_take isl_space *left, + __isl_take isl_space *right); +__isl_give isl_space *isl_space_range_product(__isl_take isl_space *left, + __isl_take isl_space *right); +__isl_give isl_space *isl_space_factor_domain(__isl_take isl_space *space); +__isl_give isl_space *isl_space_factor_range(__isl_take isl_space *space); +__isl_give isl_space *isl_space_domain_factor_domain( + __isl_take isl_space *space); +__isl_give isl_space *isl_space_domain_factor_range( + __isl_take isl_space *space); +__isl_give isl_space *isl_space_range_factor_domain( + __isl_take isl_space *space); +__isl_give isl_space *isl_space_range_factor_range( + __isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_map_from_set(__isl_take isl_space *space); +__isl_give isl_space *isl_space_map_from_domain_and_range( + __isl_take isl_space *domain, __isl_take isl_space *range); +__isl_give isl_space *isl_space_reverse(__isl_take isl_space *space); +__isl_give isl_space *isl_space_range_reverse(__isl_take isl_space *space); +__isl_give isl_space *isl_space_drop_dims(__isl_take isl_space *space, + enum isl_dim_type type, unsigned first, unsigned num); +ISL_DEPRECATED +__isl_give isl_space *isl_space_drop_inputs(__isl_take isl_space *dim, + unsigned first, unsigned n); +ISL_DEPRECATED +__isl_give isl_space *isl_space_drop_outputs(__isl_take isl_space *dim, + unsigned first, unsigned n); +__isl_give isl_space *isl_space_drop_all_params(__isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_domain(__isl_take isl_space *space); +__isl_give isl_space *isl_space_from_domain(__isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_range(__isl_take isl_space *space); +__isl_give isl_space *isl_space_from_range(__isl_take isl_space *space); +__isl_give isl_space *isl_space_domain_map(__isl_take isl_space *space); +__isl_give isl_space *isl_space_range_map(__isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_params(__isl_take isl_space *space); +__isl_overload +__isl_give isl_space *isl_space_add_unnamed_tuple_ui( + __isl_take isl_space *space, unsigned dim); +__isl_overload +__isl_give isl_space *isl_space_add_named_tuple_id_ui( + __isl_take isl_space *space, __isl_take isl_id *tuple_id, unsigned dim); +__isl_give isl_space *isl_space_set_from_params(__isl_take isl_space *space); + +__isl_give isl_space *isl_space_align_params(__isl_take isl_space *dim1, + __isl_take isl_space *dim2); + +__isl_export +isl_bool isl_space_is_wrapping(__isl_keep isl_space *space); +isl_bool isl_space_domain_is_wrapping(__isl_keep isl_space *space); +isl_bool isl_space_range_is_wrapping(__isl_keep isl_space *space); +isl_bool isl_space_is_product(__isl_keep isl_space *space); +__isl_export +__isl_give isl_space *isl_space_wrap(__isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_unwrap(__isl_take isl_space *space); + +isl_bool isl_space_can_zip(__isl_keep isl_space *space); +__isl_give isl_space *isl_space_zip(__isl_take isl_space *space); + +isl_bool isl_space_can_curry(__isl_keep isl_space *space); +__isl_give isl_space *isl_space_curry(__isl_take isl_space *space); + +isl_bool isl_space_can_range_curry(__isl_keep isl_space *space); +__isl_give isl_space *isl_space_range_curry(__isl_take isl_space *space); + +isl_bool isl_space_can_uncurry(__isl_keep isl_space *space); +__isl_give isl_space *isl_space_uncurry(__isl_take isl_space *space); + +isl_bool isl_space_is_domain(__isl_keep isl_space *space1, + __isl_keep isl_space *space2); +isl_bool isl_space_is_range(__isl_keep isl_space *space1, + __isl_keep isl_space *space2); +__isl_export +isl_bool isl_space_is_equal(__isl_keep isl_space *space1, + __isl_keep isl_space *space2); +isl_bool isl_space_has_equal_params(__isl_keep isl_space *space1, + __isl_keep isl_space *space2); +isl_bool isl_space_has_equal_tuples(__isl_keep isl_space *space1, + __isl_keep isl_space *space2); +isl_bool isl_space_tuple_is_equal(__isl_keep isl_space *space1, + enum isl_dim_type type1, __isl_keep isl_space *space2, + enum isl_dim_type type2); +ISL_DEPRECATED +isl_bool isl_space_match(__isl_keep isl_space *space1, enum isl_dim_type type1, + __isl_keep isl_space *space2, enum isl_dim_type type2); +isl_size isl_space_dim(__isl_keep isl_space *space, enum isl_dim_type type); + +__isl_export +__isl_give isl_space *isl_space_flatten_domain(__isl_take isl_space *space); +__isl_export +__isl_give isl_space *isl_space_flatten_range(__isl_take isl_space *space); + +__isl_give char *isl_space_to_str(__isl_keep isl_space *space); +__isl_give isl_printer *isl_printer_print_space(__isl_take isl_printer *p, + __isl_keep isl_space *space); +void isl_space_dump(__isl_keep isl_space *space); diff --git a/preproc-headers/b1b2247dd156415daf938078d2258d5ffe33a5890f5a2665e1b07af4d4ab80c2 b/preproc-headers/b1b2247dd156415daf938078d2258d5ffe33a5890f5a2665e1b07af4d4ab80c2 new file mode 100644 index 0000000..467753c --- /dev/null +++ b/preproc-headers/b1b2247dd156415daf938078d2258d5ffe33a5890f5a2665e1b07af4d4ab80c2 @@ -0,0 +1,130 @@ +#line 13 +#include +#include +#include +#include +#include +#include +#include + + + + + +struct isl_constraint; +typedef struct isl_constraint isl_constraint; + +struct isl_constraint; struct isl_constraint_list; typedef struct isl_constraint_list isl_constraint_list; isl_ctx *isl_constraint_list_get_ctx(__isl_keep isl_constraint_list *list); __isl_give isl_constraint_list *isl_constraint_list_from_constraint( __isl_take isl_constraint *el); __isl_give isl_constraint_list *isl_constraint_list_alloc(isl_ctx *ctx, int n); __isl_give isl_constraint_list *isl_constraint_list_copy( __isl_keep isl_constraint_list *list); __isl_null isl_constraint_list *isl_constraint_list_free( __isl_take isl_constraint_list *list); __isl_give isl_constraint_list *isl_constraint_list_add( __isl_take isl_constraint_list *list, __isl_take isl_constraint *el); __isl_give isl_constraint_list *isl_constraint_list_insert( __isl_take isl_constraint_list *list, unsigned pos, __isl_take struct isl_constraint *el); __isl_give isl_constraint_list *isl_constraint_list_drop( __isl_take isl_constraint_list *list, unsigned first, unsigned n); __isl_give isl_constraint_list *isl_constraint_list_clear( __isl_take isl_constraint_list *list); __isl_give isl_constraint_list *isl_constraint_list_swap( __isl_take isl_constraint_list *list, unsigned pos1, unsigned pos2); __isl_give isl_constraint_list *isl_constraint_list_reverse( __isl_take isl_constraint_list *list); __isl_give isl_constraint_list *isl_constraint_list_concat( __isl_take isl_constraint_list *list1, __isl_take isl_constraint_list *list2); isl_size isl_constraint_list_size(__isl_keep isl_constraint_list *list); isl_size isl_constraint_list_n_constraint(__isl_keep isl_constraint_list *list); __isl_give isl_constraint *isl_constraint_list_get_at( __isl_keep isl_constraint_list *list, int index); __isl_give struct isl_constraint *isl_constraint_list_get_constraint( __isl_keep isl_constraint_list *list, int index); __isl_give struct isl_constraint_list *isl_constraint_list_set_constraint( __isl_take struct isl_constraint_list *list, int index, __isl_take struct isl_constraint *el); isl_stat isl_constraint_list_foreach(__isl_keep isl_constraint_list *list, isl_stat (*fn)(__isl_take isl_constraint *el, void *user), void *user); __isl_give isl_constraint_list *isl_constraint_list_map( __isl_take isl_constraint_list *list, __isl_give isl_constraint * (*fn)(__isl_take isl_constraint *el, void *user), void *user); __isl_give isl_constraint_list *isl_constraint_list_sort( __isl_take isl_constraint_list *list, int (*cmp)(__isl_keep struct isl_constraint *a, __isl_keep struct isl_constraint *b, void *user), void *user); isl_stat isl_constraint_list_foreach_scc(__isl_keep isl_constraint_list *list, isl_bool (*follows)(__isl_keep struct isl_constraint *a, __isl_keep struct isl_constraint *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_constraint_list *scc, void *user), void *fn_user); __isl_give char *isl_constraint_list_to_str( __isl_keep isl_constraint_list *list); __isl_give isl_printer *isl_printer_print_constraint_list( __isl_take isl_printer *p, __isl_keep isl_constraint_list *list); void isl_constraint_list_dump(__isl_keep isl_constraint_list *list); + +isl_ctx *isl_constraint_get_ctx(__isl_keep isl_constraint *c); + +__isl_give isl_constraint *isl_constraint_alloc_equality( + __isl_take isl_local_space *ls); +__isl_give isl_constraint *isl_constraint_alloc_inequality( + __isl_take isl_local_space *ls); +__isl_give isl_constraint *isl_equality_alloc(__isl_take isl_local_space *ls); +__isl_give isl_constraint *isl_inequality_alloc(__isl_take isl_local_space *ls); + +struct isl_constraint *isl_constraint_copy(struct isl_constraint *c); +__isl_null isl_constraint *isl_constraint_free(__isl_take isl_constraint *c); + +isl_size isl_basic_map_n_constraint(__isl_keep isl_basic_map *bmap); +isl_size isl_basic_set_n_constraint(__isl_keep isl_basic_set *bset); +isl_stat isl_basic_map_foreach_constraint(__isl_keep isl_basic_map *bmap, + isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user); +isl_stat isl_basic_set_foreach_constraint(__isl_keep isl_basic_set *bset, + isl_stat (*fn)(__isl_take isl_constraint *c, void *user), void *user); +__isl_give isl_constraint_list *isl_basic_map_get_constraint_list( + __isl_keep isl_basic_map *bmap); +__isl_give isl_constraint_list *isl_basic_set_get_constraint_list( + __isl_keep isl_basic_set *bset); +int isl_constraint_is_equal(struct isl_constraint *constraint1, + struct isl_constraint *constraint2); + +isl_stat isl_basic_set_foreach_bound_pair(__isl_keep isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, + isl_stat (*fn)(__isl_take isl_constraint *lower, + __isl_take isl_constraint *upper, + __isl_take isl_basic_set *bset, void *user), void *user); + +__isl_give isl_basic_map *isl_basic_map_add_constraint( + __isl_take isl_basic_map *bmap, __isl_take isl_constraint *constraint); +__isl_give isl_basic_set *isl_basic_set_add_constraint( + __isl_take isl_basic_set *bset, __isl_take isl_constraint *constraint); +__isl_give isl_map *isl_map_add_constraint(__isl_take isl_map *map, + __isl_take isl_constraint *constraint); +__isl_give isl_set *isl_set_add_constraint(__isl_take isl_set *set, + __isl_take isl_constraint *constraint); + +isl_bool isl_basic_map_has_defining_equality( + __isl_keep isl_basic_map *bmap, enum isl_dim_type type, int pos, + __isl_give isl_constraint **c); +isl_bool isl_basic_set_has_defining_equality( + struct isl_basic_set *bset, enum isl_dim_type type, int pos, + struct isl_constraint **constraint); +isl_bool isl_basic_set_has_defining_inequalities( + struct isl_basic_set *bset, enum isl_dim_type type, int pos, + struct isl_constraint **lower, + struct isl_constraint **upper); + +__isl_give isl_space *isl_constraint_get_space( + __isl_keep isl_constraint *constraint); +__isl_give isl_local_space *isl_constraint_get_local_space( + __isl_keep isl_constraint *constraint); +isl_size isl_constraint_dim(__isl_keep isl_constraint *constraint, + enum isl_dim_type type); + +isl_bool isl_constraint_involves_dims(__isl_keep isl_constraint *constraint, + enum isl_dim_type type, unsigned first, unsigned n); + +const char *isl_constraint_get_dim_name(__isl_keep isl_constraint *constraint, + enum isl_dim_type type, unsigned pos); +__isl_give isl_val *isl_constraint_get_constant_val( + __isl_keep isl_constraint *constraint); +__isl_give isl_val *isl_constraint_get_coefficient_val( + __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos); +__isl_give isl_constraint *isl_constraint_set_constant_si( + __isl_take isl_constraint *constraint, int v); +__isl_give isl_constraint *isl_constraint_set_constant_val( + __isl_take isl_constraint *constraint, __isl_take isl_val *v); +__isl_give isl_constraint *isl_constraint_set_coefficient_si( + __isl_take isl_constraint *constraint, + enum isl_dim_type type, int pos, int v); +__isl_give isl_constraint *isl_constraint_set_coefficient_val( + __isl_take isl_constraint *constraint, + enum isl_dim_type type, int pos, __isl_take isl_val *v); + +__isl_give isl_aff *isl_constraint_get_div(__isl_keep isl_constraint *constraint, + int pos); + +struct isl_constraint *isl_constraint_negate(struct isl_constraint *constraint); + +isl_bool isl_constraint_is_equality(__isl_keep isl_constraint *constraint); +isl_bool isl_constraint_is_div_constraint( + __isl_keep isl_constraint *constraint); + +isl_bool isl_constraint_is_lower_bound(__isl_keep isl_constraint *constraint, + enum isl_dim_type type, unsigned pos); +isl_bool isl_constraint_is_upper_bound(__isl_keep isl_constraint *constraint, + enum isl_dim_type type, unsigned pos); + +__isl_give isl_basic_map *isl_basic_map_from_constraint( + __isl_take isl_constraint *constraint); +__isl_give isl_basic_set *isl_basic_set_from_constraint( + __isl_take isl_constraint *constraint); + +__isl_give isl_aff *isl_constraint_get_bound( + __isl_keep isl_constraint *constraint, enum isl_dim_type type, int pos); +__isl_give isl_aff *isl_constraint_get_aff( + __isl_keep isl_constraint *constraint); +__isl_give isl_constraint *isl_equality_from_aff(__isl_take isl_aff *aff); +__isl_give isl_constraint *isl_inequality_from_aff(__isl_take isl_aff *aff); + +int isl_constraint_plain_cmp(__isl_keep isl_constraint *c1, + __isl_keep isl_constraint *c2); +int isl_constraint_cmp_last_non_zero(__isl_keep isl_constraint *c1, + __isl_keep isl_constraint *c2); + +__isl_give isl_printer *isl_printer_print_constraint(__isl_take isl_printer *p, + __isl_keep isl_constraint *c); +void isl_constraint_dump(__isl_keep isl_constraint *c); diff --git a/preproc-headers/b73e1aad66190df39c8d0e9ba52970f590665085ea78ac396971a73f8c9b9964 b/preproc-headers/b73e1aad66190df39c8d0e9ba52970f590665085ea78ac396971a73f8c9b9964 new file mode 100644 index 0000000..266d4bf --- /dev/null +++ b/preproc-headers/b73e1aad66190df39c8d0e9ba52970f590665085ea78ac396971a73f8c9b9964 @@ -0,0 +1,125 @@ + + + +#include +#include +#include +#include + + + + + +struct __isl_export isl_ast_build; +typedef struct isl_ast_build isl_ast_build; + + +isl_stat isl_options_set_ast_build_atomic_upper_bound(isl_ctx *ctx, int val); +int isl_options_get_ast_build_atomic_upper_bound(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_prefer_pdiv(isl_ctx *ctx, int val); +int isl_options_get_ast_build_prefer_pdiv(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_detect_min_max(isl_ctx *ctx, int val); +int isl_options_get_ast_build_detect_min_max(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_exploit_nested_bounds(isl_ctx *ctx, int val); +int isl_options_get_ast_build_exploit_nested_bounds(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_group_coscheduled(isl_ctx *ctx, int val); +int isl_options_get_ast_build_group_coscheduled(isl_ctx *ctx); + + + +isl_stat isl_options_set_ast_build_separation_bounds(isl_ctx *ctx, int val); +int isl_options_get_ast_build_separation_bounds(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_scale_strides(isl_ctx *ctx, int val); +int isl_options_get_ast_build_scale_strides(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_allow_else(isl_ctx *ctx, int val); +int isl_options_get_ast_build_allow_else(isl_ctx *ctx); + +isl_stat isl_options_set_ast_build_allow_or(isl_ctx *ctx, int val); +int isl_options_get_ast_build_allow_or(isl_ctx *ctx); + +isl_ctx *isl_ast_build_get_ctx(__isl_keep isl_ast_build *build); + +__isl_constructor +__isl_give isl_ast_build *isl_ast_build_alloc(isl_ctx *ctx); +__isl_export +__isl_give isl_ast_build *isl_ast_build_from_context(__isl_take isl_set *set); + +__isl_give isl_space *isl_ast_build_get_schedule_space( + __isl_keep isl_ast_build *build); +__isl_export +__isl_give isl_union_map *isl_ast_build_get_schedule( + __isl_keep isl_ast_build *build); + +__isl_give isl_ast_build *isl_ast_build_restrict( + __isl_take isl_ast_build *build, __isl_take isl_set *set); + +__isl_give isl_ast_build *isl_ast_build_copy( + __isl_keep isl_ast_build *build); +__isl_null isl_ast_build *isl_ast_build_free( + __isl_take isl_ast_build *build); + +__isl_give isl_ast_build *isl_ast_build_set_options( + __isl_take isl_ast_build *build, + __isl_take isl_union_map *options); +__isl_give isl_ast_build *isl_ast_build_set_iterators( + __isl_take isl_ast_build *build, + __isl_take isl_id_list *iterators); +__isl_export +__isl_give isl_ast_build *isl_ast_build_set_at_each_domain( + __isl_take isl_ast_build *build, + __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node, + __isl_keep isl_ast_build *build, void *user), void *user); +__isl_give isl_ast_build *isl_ast_build_set_before_each_for( + __isl_take isl_ast_build *build, + __isl_give isl_id *(*fn)(__isl_keep isl_ast_build *build, + void *user), void *user); +__isl_give isl_ast_build *isl_ast_build_set_after_each_for( + __isl_take isl_ast_build *build, + __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node, + __isl_keep isl_ast_build *build, void *user), void *user); +__isl_give isl_ast_build *isl_ast_build_set_before_each_mark( + __isl_take isl_ast_build *build, + isl_stat (*fn)(__isl_keep isl_id *mark, __isl_keep isl_ast_build *build, + void *user), void *user); +__isl_give isl_ast_build *isl_ast_build_set_after_each_mark( + __isl_take isl_ast_build *build, + __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_node *node, + __isl_keep isl_ast_build *build, void *user), void *user); +__isl_give isl_ast_build *isl_ast_build_set_create_leaf( + __isl_take isl_ast_build *build, + __isl_give isl_ast_node *(*fn)(__isl_take isl_ast_build *build, + void *user), void *user); + +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_expr_from_set( + __isl_keep isl_ast_build *build, __isl_take isl_set *set); +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_expr_from_pw_aff( + __isl_keep isl_ast_build *build, __isl_take isl_pw_aff *pa); +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_access_from_pw_multi_aff( + __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_access_from_multi_pw_aff( + __isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa); +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_call_from_pw_multi_aff( + __isl_keep isl_ast_build *build, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_ast_expr *isl_ast_build_call_from_multi_pw_aff( + __isl_keep isl_ast_build *build, __isl_take isl_multi_pw_aff *mpa); + +__isl_overload +__isl_give isl_ast_node *isl_ast_build_node_from_schedule( + __isl_keep isl_ast_build *build, __isl_take isl_schedule *schedule); +__isl_export +__isl_give isl_ast_node *isl_ast_build_node_from_schedule_map( + __isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule); +__isl_give isl_ast_node *isl_ast_build_ast_from_schedule( + __isl_keep isl_ast_build *build, __isl_take isl_union_map *schedule); diff --git a/preproc-headers/bf37233eabe4e4eb1b852542c0a66ff0bdce95b1e4776d38aeeb7bb53214f6a2 b/preproc-headers/bf37233eabe4e4eb1b852542c0a66ff0bdce95b1e4776d38aeeb7bb53214f6a2 new file mode 100644 index 0000000..8e2d05c --- /dev/null +++ b/preproc-headers/bf37233eabe4e4eb1b852542c0a66ff0bdce95b1e4776d38aeeb7bb53214f6a2 @@ -0,0 +1,91 @@ + + + +#include +#include +#include +#include + + + + + +struct isl_local_space; +typedef struct isl_local_space isl_local_space; + +isl_ctx *isl_local_space_get_ctx(__isl_keep isl_local_space *ls); + +__isl_give isl_local_space *isl_local_space_from_space(__isl_take isl_space *dim); + +__isl_give isl_local_space *isl_local_space_copy( + __isl_keep isl_local_space *ls); +__isl_null isl_local_space *isl_local_space_free( + __isl_take isl_local_space *ls); + +isl_bool isl_local_space_is_params(__isl_keep isl_local_space *ls); +isl_bool isl_local_space_is_set(__isl_keep isl_local_space *ls); + +__isl_give isl_local_space *isl_local_space_set_tuple_id( + __isl_take isl_local_space *ls, + enum isl_dim_type type, __isl_take isl_id *id); + +isl_size isl_local_space_dim(__isl_keep isl_local_space *ls, + enum isl_dim_type type); +isl_bool isl_local_space_has_dim_name(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +const char *isl_local_space_get_dim_name(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_local_space *isl_local_space_set_dim_name( + __isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned pos, const char *s); +isl_bool isl_local_space_has_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_local_space_get_dim_id(__isl_keep isl_local_space *ls, + enum isl_dim_type type, unsigned pos); +__isl_give isl_local_space *isl_local_space_set_dim_id( + __isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +__isl_give isl_space *isl_local_space_get_space(__isl_keep isl_local_space *ls); +__isl_give isl_aff *isl_local_space_get_div(__isl_keep isl_local_space *ls, + int pos); + +int isl_local_space_find_dim_by_name(__isl_keep isl_local_space *ls, + enum isl_dim_type type, const char *name); + +__isl_give isl_local_space *isl_local_space_domain( + __isl_take isl_local_space *ls); +__isl_give isl_local_space *isl_local_space_range( + __isl_take isl_local_space *ls); +__isl_give isl_local_space *isl_local_space_from_domain( + __isl_take isl_local_space *ls); +__isl_give isl_local_space *isl_local_space_add_dims( + __isl_take isl_local_space *ls, enum isl_dim_type type, unsigned n); +__isl_give isl_local_space *isl_local_space_drop_dims( + __isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_local_space *isl_local_space_insert_dims( + __isl_take isl_local_space *ls, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_local_space *isl_local_space_set_from_params( + __isl_take isl_local_space *ls); + +__isl_give isl_local_space *isl_local_space_intersect( + __isl_take isl_local_space *ls1, __isl_take isl_local_space *ls2); + +__isl_give isl_local_space *isl_local_space_wrap( + __isl_take isl_local_space *ls); + +isl_bool isl_local_space_is_equal(__isl_keep isl_local_space *ls1, + __isl_keep isl_local_space *ls2); + +__isl_give isl_basic_map *isl_local_space_lifting( + __isl_take isl_local_space *ls); + +__isl_give isl_local_space *isl_local_space_flatten_domain( + __isl_take isl_local_space *ls); +__isl_give isl_local_space *isl_local_space_flatten_range( + __isl_take isl_local_space *ls); + +__isl_give isl_printer *isl_printer_print_local_space(__isl_take isl_printer *p, + __isl_keep isl_local_space *ls); +void isl_local_space_dump(__isl_keep isl_local_space *ls); diff --git a/preproc-headers/c2531089626ef4db9e56e4419a44bc82d1a3723db001097257d1e1f860b3961c b/preproc-headers/c2531089626ef4db9e56e4419a44bc82d1a3723db001097257d1e1f860b3961c new file mode 100644 index 0000000..addf3ee --- /dev/null +++ b/preproc-headers/c2531089626ef4db9e56e4419a44bc82d1a3723db001097257d1e1f860b3961c @@ -0,0 +1,294 @@ + + + +#include +#include +#include +#include +#include +#include +#include + + + + + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_from_domain( + __isl_take isl_union_set *domain); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_from_extension( + __isl_take isl_union_map *extension); +__isl_give isl_schedule_node *isl_schedule_node_copy( + __isl_keep isl_schedule_node *node); +__isl_null isl_schedule_node *isl_schedule_node_free( + __isl_take isl_schedule_node *node); + +__isl_export +isl_bool isl_schedule_node_is_equal(__isl_keep isl_schedule_node *node1, + __isl_keep isl_schedule_node *node2); + +isl_ctx *isl_schedule_node_get_ctx(__isl_keep isl_schedule_node *node); +__isl_subclass(isl_schedule_node) +enum isl_schedule_node_type isl_schedule_node_get_type( + __isl_keep isl_schedule_node *node); +enum isl_schedule_node_type isl_schedule_node_get_parent_type( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_schedule *isl_schedule_node_get_schedule( + __isl_keep isl_schedule_node *node); + +__isl_export +isl_stat isl_schedule_node_foreach_descendant_top_down( + __isl_keep isl_schedule_node *node, + isl_bool (*fn)(__isl_keep isl_schedule_node *node, void *user), + void *user); +__isl_export +isl_bool isl_schedule_node_every_descendant(__isl_keep isl_schedule_node *node, + isl_bool (*test)(__isl_keep isl_schedule_node *node, void *user), + void *user); +__isl_export +isl_stat isl_schedule_node_foreach_ancestor_top_down( + __isl_keep isl_schedule_node *node, + isl_stat (*fn)(__isl_keep isl_schedule_node *node, void *user), + void *user); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_map_descendant_bottom_up( + __isl_take isl_schedule_node *node, + __isl_give isl_schedule_node *(*fn)(__isl_take isl_schedule_node *node, + void *user), void *user); + +__isl_export +isl_size isl_schedule_node_get_tree_depth(__isl_keep isl_schedule_node *node); +__isl_export +isl_bool isl_schedule_node_has_parent(__isl_keep isl_schedule_node *node); +__isl_export +isl_bool isl_schedule_node_has_children(__isl_keep isl_schedule_node *node); +__isl_export +isl_bool isl_schedule_node_has_previous_sibling( + __isl_keep isl_schedule_node *node); +__isl_export +isl_bool isl_schedule_node_has_next_sibling(__isl_keep isl_schedule_node *node); +__isl_export +isl_size isl_schedule_node_n_children(__isl_keep isl_schedule_node *node); +__isl_export +isl_size isl_schedule_node_get_child_position( + __isl_keep isl_schedule_node *node); +__isl_export +isl_size isl_schedule_node_get_ancestor_child_position( + __isl_keep isl_schedule_node *node, + __isl_keep isl_schedule_node *ancestor); +__isl_give isl_schedule_node *isl_schedule_node_get_child( + __isl_keep isl_schedule_node *node, int pos); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_get_shared_ancestor( + __isl_keep isl_schedule_node *node1, + __isl_keep isl_schedule_node *node2); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_root( + __isl_take isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_parent( + __isl_take isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_ancestor( + __isl_take isl_schedule_node *node, int generation); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_child( + __isl_take isl_schedule_node *node, int pos); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_first_child( + __isl_take isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_previous_sibling( + __isl_take isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_next_sibling( + __isl_take isl_schedule_node *node); + +__isl_export +isl_bool isl_schedule_node_is_subtree_anchored( + __isl_keep isl_schedule_node *node); + +__isl_give isl_schedule_node *isl_schedule_node_group( + __isl_take isl_schedule_node *node, __isl_take isl_id *group_id); + +__isl_give isl_schedule_node *isl_schedule_node_sequence_splice_child( + __isl_take isl_schedule_node *node, int pos); + +__isl_give isl_space *isl_schedule_node_band_get_space( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_multi_union_pw_aff *isl_schedule_node_band_get_partial_schedule( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_map *isl_schedule_node_band_get_partial_schedule_union_map( + __isl_keep isl_schedule_node *node); +enum isl_ast_loop_type isl_schedule_node_band_member_get_ast_loop_type( + __isl_keep isl_schedule_node *node, int pos); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_member_set_ast_loop_type( + __isl_take isl_schedule_node *node, int pos, + enum isl_ast_loop_type type); +enum isl_ast_loop_type isl_schedule_node_band_member_get_isolate_ast_loop_type( + __isl_keep isl_schedule_node *node, int pos); +__isl_give isl_schedule_node * +isl_schedule_node_band_member_set_isolate_ast_loop_type( + __isl_take isl_schedule_node *node, int pos, + enum isl_ast_loop_type type); +__isl_export +__isl_give isl_union_set *isl_schedule_node_band_get_ast_build_options( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_set_ast_build_options( + __isl_take isl_schedule_node *node, __isl_take isl_union_set *options); +__isl_export +__isl_give isl_set *isl_schedule_node_band_get_ast_isolate_option( + __isl_keep isl_schedule_node *node); +__isl_export +isl_size isl_schedule_node_band_n_member(__isl_keep isl_schedule_node *node); +__isl_export +isl_bool isl_schedule_node_band_member_get_coincident( + __isl_keep isl_schedule_node *node, int pos); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_member_set_coincident( + __isl_take isl_schedule_node *node, int pos, int coincident); +__isl_export +isl_bool isl_schedule_node_band_get_permutable( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_set_permutable( + __isl_take isl_schedule_node *node, int permutable); + +isl_stat isl_options_set_tile_scale_tile_loops(isl_ctx *ctx, int val); +int isl_options_get_tile_scale_tile_loops(isl_ctx *ctx); +isl_stat isl_options_set_tile_shift_point_loops(isl_ctx *ctx, int val); +int isl_options_get_tile_shift_point_loops(isl_ctx *ctx); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_scale( + __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_scale_down( + __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_mod( + __isl_take isl_schedule_node *node, __isl_take isl_multi_val *mv); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_shift( + __isl_take isl_schedule_node *node, + __isl_take isl_multi_union_pw_aff *shift); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_tile( + __isl_take isl_schedule_node *node, __isl_take isl_multi_val *sizes); +__isl_give isl_schedule_node *isl_schedule_node_band_sink( + __isl_take isl_schedule_node *node); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_band_split( + __isl_take isl_schedule_node *node, int pos); + +__isl_export +__isl_give isl_set *isl_schedule_node_context_get_context( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_set *isl_schedule_node_domain_get_domain( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_map *isl_schedule_node_expansion_get_expansion( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_pw_multi_aff *isl_schedule_node_expansion_get_contraction( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_map *isl_schedule_node_extension_get_extension( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_set *isl_schedule_node_filter_get_filter( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_set *isl_schedule_node_guard_get_guard( + __isl_keep isl_schedule_node *node); +__isl_give isl_id *isl_schedule_node_mark_get_id( + __isl_keep isl_schedule_node *node); + +isl_size isl_schedule_node_get_schedule_depth( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_set *isl_schedule_node_get_domain( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_set *isl_schedule_node_get_universe_domain( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_multi_union_pw_aff * +isl_schedule_node_get_prefix_schedule_multi_union_pw_aff( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_pw_multi_aff * +isl_schedule_node_get_prefix_schedule_union_pw_multi_aff( + __isl_keep isl_schedule_node *node); +__isl_export +__isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_union_map( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_map *isl_schedule_node_get_prefix_schedule_relation( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_map *isl_schedule_node_get_subtree_schedule_union_map( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_map *isl_schedule_node_get_subtree_expansion( + __isl_keep isl_schedule_node *node); +__isl_give isl_union_pw_multi_aff *isl_schedule_node_get_subtree_contraction( + __isl_keep isl_schedule_node *node); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_context( + __isl_take isl_schedule_node *node, __isl_take isl_set *context); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_partial_schedule( + __isl_take isl_schedule_node *node, + __isl_take isl_multi_union_pw_aff *schedule); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_filter( + __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_guard( + __isl_take isl_schedule_node *node, __isl_take isl_set *context); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_mark( + __isl_take isl_schedule_node *node, __isl_take isl_id *mark); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_sequence( + __isl_take isl_schedule_node *node, + __isl_take isl_union_set_list *filters); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_insert_set( + __isl_take isl_schedule_node *node, + __isl_take isl_union_set_list *filters); + +__isl_give isl_schedule_node *isl_schedule_node_cut( + __isl_take isl_schedule_node *node); +__isl_give isl_schedule_node *isl_schedule_node_delete( + __isl_take isl_schedule_node *node); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_order_before( + __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_order_after( + __isl_take isl_schedule_node *node, __isl_take isl_union_set *filter); + +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_graft_before( + __isl_take isl_schedule_node *node, + __isl_take isl_schedule_node *graft); +__isl_export +__isl_give isl_schedule_node *isl_schedule_node_graft_after( + __isl_take isl_schedule_node *node, + __isl_take isl_schedule_node *graft); + +__isl_give isl_schedule_node *isl_schedule_node_reset_user( + __isl_take isl_schedule_node *node); +__isl_give isl_schedule_node *isl_schedule_node_align_params( + __isl_take isl_schedule_node *node, __isl_take isl_space *space); + +__isl_give isl_printer *isl_printer_print_schedule_node( + __isl_take isl_printer *p, __isl_keep isl_schedule_node *node); +void isl_schedule_node_dump(__isl_keep isl_schedule_node *node); +__isl_give char *isl_schedule_node_to_str(__isl_keep isl_schedule_node *node); diff --git a/preproc-headers/d40e142630a78275f34f1011aa90891962fd5d0d4850b752e1068d5457f5cf7a b/preproc-headers/d40e142630a78275f34f1011aa90891962fd5d0d4850b752e1068d5457f5cf7a new file mode 100644 index 0000000..d64ad1e --- /dev/null +++ b/preproc-headers/d40e142630a78275f34f1011aa90891962fd5d0d4850b752e1068d5457f5cf7a @@ -0,0 +1,33 @@ +#line 13 +#include +#include +#include +#include +#include + + + + + +__isl_give isl_val *isl_basic_set_max_val(__isl_keep isl_basic_set *bset, + __isl_keep isl_aff *obj); +__isl_export +__isl_give isl_val *isl_set_min_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj); +__isl_export +__isl_give isl_val *isl_set_max_val(__isl_keep isl_set *set, + __isl_keep isl_aff *obj); +__isl_give isl_multi_val *isl_union_set_min_multi_union_pw_aff( + __isl_keep isl_union_set *uset, __isl_keep isl_multi_union_pw_aff *obj); + +__isl_give isl_val *isl_union_pw_aff_min_val(__isl_take isl_union_pw_aff *upa); +__isl_give isl_val *isl_union_pw_aff_max_val(__isl_take isl_union_pw_aff *upa); + +__isl_give isl_multi_val *isl_multi_union_pw_aff_min_multi_val( + __isl_take isl_multi_union_pw_aff *mupa); +__isl_give isl_multi_val *isl_multi_union_pw_aff_max_multi_val( + __isl_take isl_multi_union_pw_aff *mupa); + +__isl_export +__isl_give isl_val *isl_basic_set_dim_max_val(__isl_take isl_basic_set *bset, + int pos); diff --git a/preproc-headers/d4d86011cca2702b795d57ca75ff90069696d33238e5be968491f37f62be76de b/preproc-headers/d4d86011cca2702b795d57ca75ff90069696d33238e5be968491f37f62be76de new file mode 100644 index 0000000..3e716f9 --- /dev/null +++ b/preproc-headers/d4d86011cca2702b795d57ca75ff90069696d33238e5be968491f37f62be76de @@ -0,0 +1,769 @@ + + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + + +isl_ctx *isl_qpolynomial_get_ctx(__isl_keep isl_qpolynomial *qp); +__isl_give isl_space *isl_qpolynomial_get_domain_space( + __isl_keep isl_qpolynomial *qp); +__isl_give isl_space *isl_qpolynomial_get_space(__isl_keep isl_qpolynomial *qp); +isl_size isl_qpolynomial_dim(__isl_keep isl_qpolynomial *qp, + enum isl_dim_type type); +isl_bool isl_qpolynomial_involves_dims(__isl_keep isl_qpolynomial *qp, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_val *isl_qpolynomial_get_constant_val( + __isl_keep isl_qpolynomial *qp); + +__isl_give isl_qpolynomial *isl_qpolynomial_set_dim_name( + __isl_take isl_qpolynomial *qp, + enum isl_dim_type type, unsigned pos, const char *s); + +__isl_give isl_qpolynomial *isl_qpolynomial_zero_on_domain( + __isl_take isl_space *domain); +__isl_give isl_qpolynomial *isl_qpolynomial_one_on_domain( + __isl_take isl_space *domain); +__isl_give isl_qpolynomial *isl_qpolynomial_infty_on_domain( + __isl_take isl_space *domain); +__isl_give isl_qpolynomial *isl_qpolynomial_neginfty_on_domain( + __isl_take isl_space *domain); +__isl_give isl_qpolynomial *isl_qpolynomial_nan_on_domain( + __isl_take isl_space *domain); +__isl_give isl_qpolynomial *isl_qpolynomial_val_on_domain( + __isl_take isl_space *space, __isl_take isl_val *val); +__isl_give isl_qpolynomial *isl_qpolynomial_var_on_domain( + __isl_take isl_space *domain, + enum isl_dim_type type, unsigned pos); +__isl_give isl_qpolynomial *isl_qpolynomial_copy(__isl_keep isl_qpolynomial *qp); +__isl_null isl_qpolynomial *isl_qpolynomial_free( + __isl_take isl_qpolynomial *qp); + +isl_bool isl_qpolynomial_plain_is_equal(__isl_keep isl_qpolynomial *qp1, + __isl_keep isl_qpolynomial *qp2); +isl_bool isl_qpolynomial_is_zero(__isl_keep isl_qpolynomial *qp); +isl_bool isl_qpolynomial_is_nan(__isl_keep isl_qpolynomial *qp); +isl_bool isl_qpolynomial_is_infty(__isl_keep isl_qpolynomial *qp); +isl_bool isl_qpolynomial_is_neginfty(__isl_keep isl_qpolynomial *qp); +int isl_qpolynomial_sgn(__isl_keep isl_qpolynomial *qp); + +__isl_give isl_qpolynomial *isl_qpolynomial_neg(__isl_take isl_qpolynomial *qp); +__isl_give isl_qpolynomial *isl_qpolynomial_add(__isl_take isl_qpolynomial *qp1, + __isl_take isl_qpolynomial *qp2); +__isl_give isl_qpolynomial *isl_qpolynomial_sub(__isl_take isl_qpolynomial *qp1, + __isl_take isl_qpolynomial *qp2); +__isl_give isl_qpolynomial *isl_qpolynomial_mul(__isl_take isl_qpolynomial *qp1, + __isl_take isl_qpolynomial *qp2); +__isl_give isl_qpolynomial *isl_qpolynomial_pow(__isl_take isl_qpolynomial *qp, + unsigned power); +__isl_give isl_qpolynomial *isl_qpolynomial_scale_val( + __isl_take isl_qpolynomial *qp, __isl_take isl_val *v); +__isl_give isl_qpolynomial *isl_qpolynomial_scale_down_val( + __isl_take isl_qpolynomial *qp, __isl_take isl_val *v); + +__isl_give isl_qpolynomial *isl_qpolynomial_insert_dims( + __isl_take isl_qpolynomial *qp, enum isl_dim_type type, + unsigned first, unsigned n); +__isl_give isl_qpolynomial *isl_qpolynomial_add_dims( + __isl_take isl_qpolynomial *qp, enum isl_dim_type type, unsigned n); +__isl_give isl_qpolynomial *isl_qpolynomial_move_dims( + __isl_take isl_qpolynomial *qp, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_qpolynomial *isl_qpolynomial_project_domain_on_params( + __isl_take isl_qpolynomial *qp); +__isl_give isl_qpolynomial *isl_qpolynomial_drop_dims( + __isl_take isl_qpolynomial *qp, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_qpolynomial *isl_qpolynomial_substitute( + __isl_take isl_qpolynomial *qp, + enum isl_dim_type type, unsigned first, unsigned n, + __isl_keep isl_qpolynomial **subs); + +isl_stat isl_qpolynomial_as_polynomial_on_domain(__isl_keep isl_qpolynomial *qp, + __isl_keep isl_basic_set *bset, + isl_stat (*fn)(__isl_take isl_basic_set *bset, + __isl_take isl_qpolynomial *poly, void *user), void *user); + +__isl_give isl_qpolynomial *isl_qpolynomial_homogenize( + __isl_take isl_qpolynomial *poly); + +__isl_give isl_qpolynomial *isl_qpolynomial_align_params( + __isl_take isl_qpolynomial *qp, __isl_take isl_space *model); + +isl_ctx *isl_term_get_ctx(__isl_keep isl_term *term); + +__isl_give isl_term *isl_term_copy(__isl_keep isl_term *term); +__isl_null isl_term *isl_term_free(__isl_take isl_term *term); + +isl_size isl_term_dim(__isl_keep isl_term *term, enum isl_dim_type type); +__isl_give isl_val *isl_term_get_coefficient_val(__isl_keep isl_term *term); +isl_size isl_term_get_exp(__isl_keep isl_term *term, + enum isl_dim_type type, unsigned pos); +__isl_give isl_aff *isl_term_get_div(__isl_keep isl_term *term, unsigned pos); + +isl_stat isl_qpolynomial_foreach_term(__isl_keep isl_qpolynomial *qp, + isl_stat (*fn)(__isl_take isl_term *term, void *user), void *user); + +__isl_give isl_val *isl_qpolynomial_eval(__isl_take isl_qpolynomial *qp, + __isl_take isl_point *pnt); + +__isl_give isl_qpolynomial *isl_qpolynomial_gist_params( + __isl_take isl_qpolynomial *qp, __isl_take isl_set *context); +__isl_give isl_qpolynomial *isl_qpolynomial_gist( + __isl_take isl_qpolynomial *qp, __isl_take isl_set *context); + +__isl_give isl_qpolynomial *isl_qpolynomial_from_constraint( + __isl_take isl_constraint *c, enum isl_dim_type type, unsigned pos); +__isl_give isl_qpolynomial *isl_qpolynomial_from_term(__isl_take isl_term *term); +__isl_give isl_qpolynomial *isl_qpolynomial_from_aff(__isl_take isl_aff *aff); +__isl_give isl_basic_map *isl_basic_map_from_qpolynomial( + __isl_take isl_qpolynomial *qp); + +__isl_give isl_printer *isl_printer_print_qpolynomial( + __isl_take isl_printer *p, __isl_keep isl_qpolynomial *qp); +void isl_qpolynomial_print(__isl_keep isl_qpolynomial *qp, FILE *out, + unsigned output_format); +void isl_qpolynomial_dump(__isl_keep isl_qpolynomial *qp); + +isl_ctx *isl_pw_qpolynomial_get_ctx(__isl_keep isl_pw_qpolynomial *pwqp); + +isl_bool isl_pw_qpolynomial_involves_nan(__isl_keep isl_pw_qpolynomial *pwqp); +isl_bool isl_pw_qpolynomial_plain_is_equal(__isl_keep isl_pw_qpolynomial *pwqp1, + __isl_keep isl_pw_qpolynomial *pwqp2); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_zero( + __isl_take isl_space *space); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_alloc(__isl_take isl_set *set, + __isl_take isl_qpolynomial *qp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_qpolynomial( + __isl_take isl_qpolynomial *qp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_copy( + __isl_keep isl_pw_qpolynomial *pwqp); +__isl_null isl_pw_qpolynomial *isl_pw_qpolynomial_free( + __isl_take isl_pw_qpolynomial *pwqp); + +isl_bool isl_pw_qpolynomial_is_zero(__isl_keep isl_pw_qpolynomial *pwqp); + +__isl_give isl_space *isl_pw_qpolynomial_get_domain_space( + __isl_keep isl_pw_qpolynomial *pwqp); +__isl_give isl_space *isl_pw_qpolynomial_get_space( + __isl_keep isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_domain_space( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_space *dim); +isl_size isl_pw_qpolynomial_dim(__isl_keep isl_pw_qpolynomial *pwqp, + enum isl_dim_type type); +isl_bool isl_pw_qpolynomial_involves_param_id( + __isl_keep isl_pw_qpolynomial *pwqp, __isl_keep isl_id *id); +isl_bool isl_pw_qpolynomial_involves_dims(__isl_keep isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned first, unsigned n); +isl_bool isl_pw_qpolynomial_has_equal_space( + __isl_keep isl_pw_qpolynomial *pwqp1, + __isl_keep isl_pw_qpolynomial *pwqp2); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_set_dim_name( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned pos, const char *s); + +int isl_pw_qpolynomial_find_dim_by_name(__isl_keep isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, const char *name); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_reset_user( + __isl_take isl_pw_qpolynomial *pwqp); + +__isl_export +__isl_give isl_set *isl_pw_qpolynomial_domain(__isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_domain( + __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial * +isl_pw_qpolynomial_intersect_domain_wrapped_domain( + __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial * +isl_pw_qpolynomial_intersect_domain_wrapped_range( + __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_intersect_params( + __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_subtract_domain( + __isl_take isl_pw_qpolynomial *pwpq, __isl_take isl_set *set); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_project_domain_on_params( + __isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_range( + __isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_dims( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_dims( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_drop_unused_params( + __isl_take isl_pw_qpolynomial *pwqp); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add( + __isl_take isl_pw_qpolynomial *pwqp1, + __isl_take isl_pw_qpolynomial *pwqp2); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_sub( + __isl_take isl_pw_qpolynomial *pwqp1, + __isl_take isl_pw_qpolynomial *pwqp2); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_disjoint( + __isl_take isl_pw_qpolynomial *pwqp1, + __isl_take isl_pw_qpolynomial *pwqp2); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_neg( + __isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_mul( + __isl_take isl_pw_qpolynomial *pwqp1, + __isl_take isl_pw_qpolynomial *pwqp2); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_scale_val( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_val *v); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_scale_down_val( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_val *v); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_pow( + __isl_take isl_pw_qpolynomial *pwqp, unsigned exponent); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_insert_dims( + __isl_take isl_pw_qpolynomial *pwqp, enum isl_dim_type type, + unsigned first, unsigned n); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_add_dims( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned n); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_move_dims( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_fix_val( + __isl_take isl_pw_qpolynomial *pwqp, + enum isl_dim_type type, unsigned n, __isl_take isl_val *v); + +__isl_export +__isl_give isl_val *isl_pw_qpolynomial_eval( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_point *pnt); + +__isl_give isl_val *isl_pw_qpolynomial_max(__isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_val *isl_pw_qpolynomial_min(__isl_take isl_pw_qpolynomial *pwqp); + +isl_size isl_pw_qpolynomial_n_piece(__isl_keep isl_pw_qpolynomial *pwqp); +isl_stat isl_pw_qpolynomial_foreach_piece(__isl_keep isl_pw_qpolynomial *pwqp, + isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, + void *user), void *user); +isl_stat isl_pw_qpolynomial_foreach_lifted_piece( + __isl_keep isl_pw_qpolynomial *pwqp, + isl_stat (*fn)(__isl_take isl_set *set, __isl_take isl_qpolynomial *qp, + void *user), void *user); +isl_bool isl_pw_qpolynomial_isa_qpolynomial( + __isl_keep isl_pw_qpolynomial *pwqp); +__isl_give isl_qpolynomial *isl_pw_qpolynomial_as_qpolynomial( + __isl_take isl_pw_qpolynomial *pwqp); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_from_pw_aff( + __isl_take isl_pw_aff *pwaff); + +__isl_constructor +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_read_from_file(isl_ctx *ctx, + FILE *input); +__isl_give char *isl_pw_qpolynomial_to_str(__isl_keep isl_pw_qpolynomial *pwqp); +__isl_give isl_printer *isl_printer_print_pw_qpolynomial( + __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial *pwqp); +void isl_pw_qpolynomial_print(__isl_keep isl_pw_qpolynomial *pwqp, FILE *out, + unsigned output_format); +void isl_pw_qpolynomial_dump(__isl_keep isl_pw_qpolynomial *pwqp); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_coalesce( + __isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context); +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_gist_params( + __isl_take isl_pw_qpolynomial *pwqp, __isl_take isl_set *context); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_split_periods( + __isl_take isl_pw_qpolynomial *pwqp, int max_periods); + +__isl_give isl_pw_qpolynomial *isl_basic_set_multiplicative_call( + __isl_take isl_basic_set *bset, + __isl_give isl_pw_qpolynomial *(*fn)(__isl_take isl_basic_set *bset)); + +isl_ctx *isl_qpolynomial_fold_get_ctx(__isl_keep isl_qpolynomial_fold *fold); +enum isl_fold isl_qpolynomial_fold_get_type(__isl_keep isl_qpolynomial_fold *fold); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_empty(enum isl_fold type, + __isl_take isl_space *dim); +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_alloc( + enum isl_fold type, __isl_take isl_qpolynomial *qp); +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_copy( + __isl_keep isl_qpolynomial_fold *fold); +__isl_null isl_qpolynomial_fold *isl_qpolynomial_fold_free( + __isl_take isl_qpolynomial_fold *fold); + +isl_bool isl_qpolynomial_fold_is_empty(__isl_keep isl_qpolynomial_fold *fold); +isl_bool isl_qpolynomial_fold_is_nan(__isl_keep isl_qpolynomial_fold *fold); +int isl_qpolynomial_fold_plain_is_equal(__isl_keep isl_qpolynomial_fold *fold1, + __isl_keep isl_qpolynomial_fold *fold2); + +__isl_give isl_space *isl_qpolynomial_fold_get_domain_space( + __isl_keep isl_qpolynomial_fold *fold); +__isl_give isl_space *isl_qpolynomial_fold_get_space( + __isl_keep isl_qpolynomial_fold *fold); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_fold( + __isl_take isl_qpolynomial_fold *fold1, + __isl_take isl_qpolynomial_fold *fold2); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_val( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v); +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_scale_down_val( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_val *v); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_move_dims( + __isl_take isl_qpolynomial_fold *fold, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_substitute( + __isl_take isl_qpolynomial_fold *fold, + enum isl_dim_type type, unsigned first, unsigned n, + __isl_keep isl_qpolynomial **subs); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fix_val( + __isl_take isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type type, unsigned n, __isl_take isl_val *v); + +__isl_give isl_val *isl_qpolynomial_fold_eval( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_point *pnt); + +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist_params( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); +__isl_give isl_qpolynomial_fold *isl_qpolynomial_fold_gist( + __isl_take isl_qpolynomial_fold *fold, __isl_take isl_set *context); + +isl_stat isl_qpolynomial_fold_foreach_qpolynomial( + __isl_keep isl_qpolynomial_fold *fold, + isl_stat (*fn)(__isl_take isl_qpolynomial *qp, void *user), void *user); + +__isl_give isl_printer *isl_printer_print_qpolynomial_fold( + __isl_take isl_printer *p, __isl_keep isl_qpolynomial_fold *fold); +void isl_qpolynomial_fold_print(__isl_keep isl_qpolynomial_fold *fold, FILE *out, + unsigned output_format); +void isl_qpolynomial_fold_dump(__isl_keep isl_qpolynomial_fold *fold); + +isl_ctx *isl_pw_qpolynomial_fold_get_ctx(__isl_keep isl_pw_qpolynomial_fold *pwf); +enum isl_fold isl_pw_qpolynomial_fold_get_type( + __isl_keep isl_pw_qpolynomial_fold *pwf); + +isl_bool isl_pw_qpolynomial_fold_involves_nan( + __isl_keep isl_pw_qpolynomial_fold *pwf); +isl_bool isl_pw_qpolynomial_fold_plain_is_equal( + __isl_keep isl_pw_qpolynomial_fold *pwf1, + __isl_keep isl_pw_qpolynomial_fold *pwf2); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_pw_qpolynomial( + enum isl_fold type, __isl_take isl_pw_qpolynomial *pwqp); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_alloc( + enum isl_fold type, + __isl_take isl_set *set, __isl_take isl_qpolynomial_fold *fold); +__isl_give isl_pw_qpolynomial_fold * +isl_pw_qpolynomial_fold_from_qpolynomial_fold( + __isl_take isl_qpolynomial_fold *fold); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_copy( + __isl_keep isl_pw_qpolynomial_fold *pwf); +__isl_null isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_free( + __isl_take isl_pw_qpolynomial_fold *pwf); + +isl_bool isl_pw_qpolynomial_fold_is_zero( + __isl_keep isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_space *isl_pw_qpolynomial_fold_get_domain_space( + __isl_keep isl_pw_qpolynomial_fold *pwf); +__isl_give isl_space *isl_pw_qpolynomial_fold_get_space( + __isl_keep isl_pw_qpolynomial_fold *pwf); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_space( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_space *dim); +isl_size isl_pw_qpolynomial_fold_dim(__isl_keep isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type type); +isl_bool isl_pw_qpolynomial_fold_involves_param_id( + __isl_keep isl_pw_qpolynomial_fold *pwf, __isl_keep isl_id *id); +isl_bool isl_pw_qpolynomial_fold_has_equal_space( + __isl_keep isl_pw_qpolynomial_fold *pwf1, + __isl_keep isl_pw_qpolynomial_fold *pwf2); + +size_t isl_pw_qpolynomial_fold_size(__isl_keep isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_zero( + __isl_take isl_space *space, enum isl_fold type); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_set_dim_name( + __isl_take isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type type, unsigned pos, const char *s); + +int isl_pw_qpolynomial_fold_find_dim_by_name( + __isl_keep isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type type, const char *name); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_reset_user( + __isl_take isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_set *isl_pw_qpolynomial_fold_domain( + __isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_domain( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial_fold * +isl_pw_qpolynomial_fold_intersect_domain_wrapped_domain( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial_fold * +isl_pw_qpolynomial_fold_intersect_domain_wrapped_range( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_intersect_params( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_subtract_domain( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *set); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add( + __isl_take isl_pw_qpolynomial_fold *pwf1, + __isl_take isl_pw_qpolynomial_fold *pwf2); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_fold( + __isl_take isl_pw_qpolynomial_fold *pwf1, + __isl_take isl_pw_qpolynomial_fold *pwf2); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_add_disjoint( + __isl_take isl_pw_qpolynomial_fold *pwf1, + __isl_take isl_pw_qpolynomial_fold *pwf2); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_val( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_scale_down_val( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_val *v); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_project_domain_on_params( + __isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_from_range( + __isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_dims( + __isl_take isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_move_dims( + __isl_take isl_pw_qpolynomial_fold *pwf, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_drop_unused_params( + __isl_take isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_val *isl_pw_qpolynomial_fold_eval( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_point *pnt); + +isl_size isl_pw_qpolynomial_fold_n_piece( + __isl_keep isl_pw_qpolynomial_fold *pwf); +isl_stat isl_pw_qpolynomial_fold_foreach_piece( + __isl_keep isl_pw_qpolynomial_fold *pwf, + isl_stat (*fn)(__isl_take isl_set *set, + __isl_take isl_qpolynomial_fold *fold, void *user), void *user); +isl_stat isl_pw_qpolynomial_fold_foreach_lifted_piece( + __isl_keep isl_pw_qpolynomial_fold *pwf, + isl_stat (*fn)(__isl_take isl_set *set, + __isl_take isl_qpolynomial_fold *fold, void *user), void *user); +isl_bool isl_pw_qpolynomial_fold_isa_qpolynomial_fold( + __isl_keep isl_pw_qpolynomial_fold *pwf); +__isl_give isl_qpolynomial_fold *isl_pw_qpolynomial_fold_as_qpolynomial_fold( + __isl_take isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold( + __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold *pwf); +void isl_pw_qpolynomial_fold_print(__isl_keep isl_pw_qpolynomial_fold *pwf, + FILE *out, unsigned output_format); +void isl_pw_qpolynomial_fold_dump(__isl_keep isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_coalesce( + __isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_gist_params( + __isl_take isl_pw_qpolynomial_fold *pwf, __isl_take isl_set *context); + +__isl_give isl_val *isl_pw_qpolynomial_fold_max( + __isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_val *isl_pw_qpolynomial_fold_min( + __isl_take isl_pw_qpolynomial_fold *pwf); + +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_bound( + __isl_take isl_pw_qpolynomial *pwqp, enum isl_fold type, + isl_bool *tight); +__isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_bound( + __isl_take isl_pw_qpolynomial_fold *pwf, isl_bool *tight); +__isl_give isl_pw_qpolynomial_fold *isl_set_apply_pw_qpolynomial_fold( + __isl_take isl_set *set, __isl_take isl_pw_qpolynomial_fold *pwf, + isl_bool *tight); +__isl_give isl_pw_qpolynomial_fold *isl_map_apply_pw_qpolynomial_fold( + __isl_take isl_map *map, __isl_take isl_pw_qpolynomial_fold *pwf, + isl_bool *tight); + +__isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_to_polynomial( + __isl_take isl_pw_qpolynomial *pwqp, int sign); + +isl_ctx *isl_union_pw_qpolynomial_get_ctx( + __isl_keep isl_union_pw_qpolynomial *upwqp); + +isl_size isl_union_pw_qpolynomial_dim( + __isl_keep isl_union_pw_qpolynomial *upwqp, enum isl_dim_type type); + +isl_bool isl_union_pw_qpolynomial_involves_nan( + __isl_keep isl_union_pw_qpolynomial *upwqp); +isl_bool isl_union_pw_qpolynomial_plain_is_equal( + __isl_keep isl_union_pw_qpolynomial *upwqp1, + __isl_keep isl_union_pw_qpolynomial *upwqp2); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_from_pw_qpolynomial(__isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero_ctx( + isl_ctx *ctx); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero_space( + __isl_take isl_space *space); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_zero( + __isl_take isl_space *space); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add_pw_qpolynomial( + __isl_take isl_union_pw_qpolynomial *upwqp, + __isl_take isl_pw_qpolynomial *pwqp); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_copy( + __isl_keep isl_union_pw_qpolynomial *upwqp); +__isl_null isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_free( + __isl_take isl_union_pw_qpolynomial *upwqp); + +__isl_constructor +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_read_from_str( + isl_ctx *ctx, const char *str); +__isl_give char *isl_union_pw_qpolynomial_to_str( + __isl_keep isl_union_pw_qpolynomial *upwqp); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_neg( + __isl_take isl_union_pw_qpolynomial *upwqp); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_add( + __isl_take isl_union_pw_qpolynomial *upwqp1, + __isl_take isl_union_pw_qpolynomial *upwqp2); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_sub( + __isl_take isl_union_pw_qpolynomial *upwqp1, + __isl_take isl_union_pw_qpolynomial *upwqp2); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_mul( + __isl_take isl_union_pw_qpolynomial *upwqp1, + __isl_take isl_union_pw_qpolynomial *upwqp2); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_val( + __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_scale_down_val( + __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_val *v); + +__isl_export +__isl_give isl_union_set *isl_union_pw_qpolynomial_domain( + __isl_take isl_union_pw_qpolynomial *upwqp); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_domain( + __isl_take isl_union_pw_qpolynomial *upwpq, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial * +isl_union_pw_qpolynomial_intersect_domain_wrapped_domain( + __isl_take isl_union_pw_qpolynomial *upwpq, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial * +isl_union_pw_qpolynomial_intersect_domain_wrapped_range( + __isl_take isl_union_pw_qpolynomial *upwpq, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_intersect_params( + __isl_take isl_union_pw_qpolynomial *upwpq, + __isl_take isl_set *set); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_subtract_domain( + __isl_take isl_union_pw_qpolynomial *upwpq, + __isl_take isl_union_set *uset); + +__isl_give isl_space *isl_union_pw_qpolynomial_get_space( + __isl_keep isl_union_pw_qpolynomial *upwqp); +__isl_give isl_pw_qpolynomial_list * +isl_union_pw_qpolynomial_get_pw_qpolynomial_list( + __isl_keep isl_union_pw_qpolynomial *upwqp); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_set_dim_name( + __isl_take isl_union_pw_qpolynomial *upwqp, + enum isl_dim_type type, unsigned pos, const char *s); + +int isl_union_pw_qpolynomial_find_dim_by_name( + __isl_keep isl_union_pw_qpolynomial *upwqp, + enum isl_dim_type type, const char *name); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_drop_dims( + __isl_take isl_union_pw_qpolynomial *upwqp, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_reset_user( + __isl_take isl_union_pw_qpolynomial *upwqp); + +__isl_export +__isl_give isl_val *isl_union_pw_qpolynomial_eval( + __isl_take isl_union_pw_qpolynomial *upwqp, __isl_take isl_point *pnt); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_coalesce( + __isl_take isl_union_pw_qpolynomial *upwqp); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist( + __isl_take isl_union_pw_qpolynomial *upwqp, + __isl_take isl_union_set *context); +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_gist_params( + __isl_take isl_union_pw_qpolynomial *upwqp, + __isl_take isl_set *context); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_align_params( + __isl_take isl_union_pw_qpolynomial *upwqp, + __isl_take isl_space *model); + +isl_size isl_union_pw_qpolynomial_n_pw_qpolynomial( + __isl_keep isl_union_pw_qpolynomial *upwqp); +isl_stat isl_union_pw_qpolynomial_foreach_pw_qpolynomial( + __isl_keep isl_union_pw_qpolynomial *upwqp, + isl_stat (*fn)(__isl_take isl_pw_qpolynomial *pwqp, void *user), + void *user); +__isl_give isl_pw_qpolynomial *isl_union_pw_qpolynomial_extract_pw_qpolynomial( + __isl_keep isl_union_pw_qpolynomial *upwqp, __isl_take isl_space *dim); + +__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial( + __isl_take isl_printer *p, __isl_keep isl_union_pw_qpolynomial *upwqp); + +isl_ctx *isl_union_pw_qpolynomial_fold_get_ctx( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); + +isl_size isl_union_pw_qpolynomial_fold_dim( + __isl_keep isl_union_pw_qpolynomial_fold *upwf, enum isl_dim_type type); + +isl_bool isl_union_pw_qpolynomial_fold_involves_nan( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); +isl_bool isl_union_pw_qpolynomial_fold_plain_is_equal( + __isl_keep isl_union_pw_qpolynomial_fold *upwf1, + __isl_keep isl_union_pw_qpolynomial_fold *upwf2); + +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_from_pw_qpolynomial_fold(__isl_take isl_pw_qpolynomial_fold *pwf); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_zero_ctx(isl_ctx *ctx, enum isl_fold type); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_zero_space(__isl_take isl_space *space, + enum isl_fold type); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_zero( + __isl_take isl_space *space, enum isl_fold type); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold_pw_qpolynomial_fold( + __isl_take isl_union_pw_qpolynomial_fold *upwqp, + __isl_take isl_pw_qpolynomial_fold *pwqp); +__isl_null isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_free( + __isl_take isl_union_pw_qpolynomial_fold *upwf); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_copy( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); + +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_fold( + __isl_take isl_union_pw_qpolynomial_fold *upwf1, + __isl_take isl_union_pw_qpolynomial_fold *upwf2); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_add_union_pw_qpolynomial( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_pw_qpolynomial *upwqp); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_scale_val( + __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_scale_down_val( + __isl_take isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_val *v); + +__isl_give isl_union_set *isl_union_pw_qpolynomial_fold_domain( + __isl_take isl_union_pw_qpolynomial_fold *upwf); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_intersect_domain( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_intersect_domain_wrapped_domain( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_intersect_domain_wrapped_range( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_set *uset); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_intersect_params( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_set *set); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_subtract_domain( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_set *uset); + +enum isl_fold isl_union_pw_qpolynomial_fold_get_type( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); +__isl_give isl_space *isl_union_pw_qpolynomial_fold_get_space( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); +__isl_give isl_pw_qpolynomial_fold_list * +isl_union_pw_qpolynomial_fold_get_pw_qpolynomial_fold_list( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); + +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_set_dim_name( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + enum isl_dim_type type, unsigned pos, const char *s); + +int isl_union_pw_qpolynomial_fold_find_dim_by_name( + __isl_keep isl_union_pw_qpolynomial_fold *upwf, + enum isl_dim_type type, const char *name); + +__isl_give isl_union_pw_qpolynomial_fold * + isl_union_pw_qpolynomial_fold_drop_dims( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_reset_user( + __isl_take isl_union_pw_qpolynomial_fold *upwf); + +__isl_give isl_val *isl_union_pw_qpolynomial_fold_eval( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_point *pnt); + +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_coalesce( + __isl_take isl_union_pw_qpolynomial_fold *upwf); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_gist( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_union_set *context); +__isl_give isl_union_pw_qpolynomial_fold * +isl_union_pw_qpolynomial_fold_gist_params( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_set *context); + +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_align_params( + __isl_take isl_union_pw_qpolynomial_fold *upwf, + __isl_take isl_space *model); + +isl_size isl_union_pw_qpolynomial_fold_n_pw_qpolynomial_fold( + __isl_keep isl_union_pw_qpolynomial_fold *upwf); +isl_stat isl_union_pw_qpolynomial_fold_foreach_pw_qpolynomial_fold( + __isl_keep isl_union_pw_qpolynomial_fold *upwf, + isl_stat (*fn)(__isl_take isl_pw_qpolynomial_fold *pwf, + void *user), void *user); +__isl_give isl_pw_qpolynomial_fold *isl_union_pw_qpolynomial_fold_extract_pw_qpolynomial_fold( + __isl_keep isl_union_pw_qpolynomial_fold *upwf, __isl_take isl_space *dim); + +__isl_give isl_printer *isl_printer_print_union_pw_qpolynomial_fold( + __isl_take isl_printer *p, + __isl_keep isl_union_pw_qpolynomial_fold *upwf); + +__isl_give isl_union_pw_qpolynomial_fold *isl_union_pw_qpolynomial_bound( + __isl_take isl_union_pw_qpolynomial *upwqp, + enum isl_fold type, isl_bool *tight); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_set_apply_union_pw_qpolynomial_fold( + __isl_take isl_union_set *uset, + __isl_take isl_union_pw_qpolynomial_fold *upwf, isl_bool *tight); +__isl_give isl_union_pw_qpolynomial_fold *isl_union_map_apply_union_pw_qpolynomial_fold( + __isl_take isl_union_map *umap, + __isl_take isl_union_pw_qpolynomial_fold *upwf, isl_bool *tight); + +__isl_give isl_union_pw_qpolynomial *isl_union_pw_qpolynomial_to_polynomial( + __isl_take isl_union_pw_qpolynomial *upwqp, int sign); + +isl_ctx *isl_pw_qpolynomial_list_get_ctx(__isl_keep isl_pw_qpolynomial_list *list); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_from_pw_qpolynomial( __isl_take isl_pw_qpolynomial *el); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_alloc(isl_ctx *ctx, int n); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_copy( __isl_keep isl_pw_qpolynomial_list *list); __isl_null isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_free( __isl_take isl_pw_qpolynomial_list *list); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_add( __isl_take isl_pw_qpolynomial_list *list, __isl_take isl_pw_qpolynomial *el); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_insert( __isl_take isl_pw_qpolynomial_list *list, unsigned pos, __isl_take struct isl_pw_qpolynomial *el); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_drop( __isl_take isl_pw_qpolynomial_list *list, unsigned first, unsigned n); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_clear( __isl_take isl_pw_qpolynomial_list *list); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_swap( __isl_take isl_pw_qpolynomial_list *list, unsigned pos1, unsigned pos2); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_reverse( __isl_take isl_pw_qpolynomial_list *list); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_concat( __isl_take isl_pw_qpolynomial_list *list1, __isl_take isl_pw_qpolynomial_list *list2); isl_size isl_pw_qpolynomial_list_size(__isl_keep isl_pw_qpolynomial_list *list); isl_size isl_pw_qpolynomial_list_n_pw_qpolynomial(__isl_keep isl_pw_qpolynomial_list *list); __isl_give isl_pw_qpolynomial *isl_pw_qpolynomial_list_get_at( __isl_keep isl_pw_qpolynomial_list *list, int index); __isl_give struct isl_pw_qpolynomial *isl_pw_qpolynomial_list_get_pw_qpolynomial( __isl_keep isl_pw_qpolynomial_list *list, int index); __isl_give struct isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_set_pw_qpolynomial( __isl_take struct isl_pw_qpolynomial_list *list, int index, __isl_take struct isl_pw_qpolynomial *el); isl_stat isl_pw_qpolynomial_list_foreach(__isl_keep isl_pw_qpolynomial_list *list, isl_stat (*fn)(__isl_take isl_pw_qpolynomial *el, void *user), void *user); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_map( __isl_take isl_pw_qpolynomial_list *list, __isl_give isl_pw_qpolynomial * (*fn)(__isl_take isl_pw_qpolynomial *el, void *user), void *user); __isl_give isl_pw_qpolynomial_list *isl_pw_qpolynomial_list_sort( __isl_take isl_pw_qpolynomial_list *list, int (*cmp)(__isl_keep struct isl_pw_qpolynomial *a, __isl_keep struct isl_pw_qpolynomial *b, void *user), void *user); isl_stat isl_pw_qpolynomial_list_foreach_scc(__isl_keep isl_pw_qpolynomial_list *list, isl_bool (*follows)(__isl_keep struct isl_pw_qpolynomial *a, __isl_keep struct isl_pw_qpolynomial *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_pw_qpolynomial_list *scc, void *user), void *fn_user); __isl_give char *isl_pw_qpolynomial_list_to_str( __isl_keep isl_pw_qpolynomial_list *list); __isl_give isl_printer *isl_printer_print_pw_qpolynomial_list( __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_list *list); void isl_pw_qpolynomial_list_dump(__isl_keep isl_pw_qpolynomial_list *list); +isl_ctx *isl_pw_qpolynomial_fold_list_get_ctx(__isl_keep isl_pw_qpolynomial_fold_list *list); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_from_pw_qpolynomial_fold( __isl_take isl_pw_qpolynomial_fold *el); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_alloc(isl_ctx *ctx, int n); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_copy( __isl_keep isl_pw_qpolynomial_fold_list *list); __isl_null isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_free( __isl_take isl_pw_qpolynomial_fold_list *list); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_add( __isl_take isl_pw_qpolynomial_fold_list *list, __isl_take isl_pw_qpolynomial_fold *el); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_insert( __isl_take isl_pw_qpolynomial_fold_list *list, unsigned pos, __isl_take struct isl_pw_qpolynomial_fold *el); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_drop( __isl_take isl_pw_qpolynomial_fold_list *list, unsigned first, unsigned n); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_clear( __isl_take isl_pw_qpolynomial_fold_list *list); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_swap( __isl_take isl_pw_qpolynomial_fold_list *list, unsigned pos1, unsigned pos2); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_reverse( __isl_take isl_pw_qpolynomial_fold_list *list); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_concat( __isl_take isl_pw_qpolynomial_fold_list *list1, __isl_take isl_pw_qpolynomial_fold_list *list2); isl_size isl_pw_qpolynomial_fold_list_size(__isl_keep isl_pw_qpolynomial_fold_list *list); isl_size isl_pw_qpolynomial_fold_list_n_pw_qpolynomial_fold(__isl_keep isl_pw_qpolynomial_fold_list *list); __isl_give isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_list_get_at( __isl_keep isl_pw_qpolynomial_fold_list *list, int index); __isl_give struct isl_pw_qpolynomial_fold *isl_pw_qpolynomial_fold_list_get_pw_qpolynomial_fold( __isl_keep isl_pw_qpolynomial_fold_list *list, int index); __isl_give struct isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_set_pw_qpolynomial_fold( __isl_take struct isl_pw_qpolynomial_fold_list *list, int index, __isl_take struct isl_pw_qpolynomial_fold *el); isl_stat isl_pw_qpolynomial_fold_list_foreach(__isl_keep isl_pw_qpolynomial_fold_list *list, isl_stat (*fn)(__isl_take isl_pw_qpolynomial_fold *el, void *user), void *user); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_map( __isl_take isl_pw_qpolynomial_fold_list *list, __isl_give isl_pw_qpolynomial_fold * (*fn)(__isl_take isl_pw_qpolynomial_fold *el, void *user), void *user); __isl_give isl_pw_qpolynomial_fold_list *isl_pw_qpolynomial_fold_list_sort( __isl_take isl_pw_qpolynomial_fold_list *list, int (*cmp)(__isl_keep struct isl_pw_qpolynomial_fold *a, __isl_keep struct isl_pw_qpolynomial_fold *b, void *user), void *user); isl_stat isl_pw_qpolynomial_fold_list_foreach_scc(__isl_keep isl_pw_qpolynomial_fold_list *list, isl_bool (*follows)(__isl_keep struct isl_pw_qpolynomial_fold *a, __isl_keep struct isl_pw_qpolynomial_fold *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_pw_qpolynomial_fold_list *scc, void *user), void *fn_user); __isl_give char *isl_pw_qpolynomial_fold_list_to_str( __isl_keep isl_pw_qpolynomial_fold_list *list); __isl_give isl_printer *isl_printer_print_pw_qpolynomial_fold_list( __isl_take isl_printer *p, __isl_keep isl_pw_qpolynomial_fold_list *list); void isl_pw_qpolynomial_fold_list_dump(__isl_keep isl_pw_qpolynomial_fold_list *list); diff --git a/preproc-headers/db16d31de902815eccf86dbbe5fb30a5286460669d9ad1c797b7c35587bac52b b/preproc-headers/db16d31de902815eccf86dbbe5fb30a5286460669d9ad1c797b7c35587bac52b new file mode 100644 index 0000000..62c8d37 --- /dev/null +++ b/preproc-headers/db16d31de902815eccf86dbbe5fb30a5286460669d9ad1c797b7c35587bac52b @@ -0,0 +1,142 @@ + + + +#include + +#include +#include +#include +#include +#include +#include +#line 21 +typedef int (*isl_access_level_before)(void *first, void *second); + +struct isl_restriction; +typedef struct isl_restriction isl_restriction; + +__isl_null isl_restriction *isl_restriction_free( + __isl_take isl_restriction *restr); +__isl_give isl_restriction *isl_restriction_empty( + __isl_take isl_map *source_map); +__isl_give isl_restriction *isl_restriction_none( + __isl_take isl_map *source_map); +__isl_give isl_restriction *isl_restriction_input( + __isl_take isl_set *source_restr, __isl_take isl_set *sink_restr); +__isl_give isl_restriction *isl_restriction_output( + __isl_take isl_set *source_restr); + +isl_ctx *isl_restriction_get_ctx(__isl_keep isl_restriction *restr); + +typedef __isl_give isl_restriction *(*isl_access_restrict)( + __isl_keep isl_map *source_map, __isl_keep isl_set *sink, + void *source_user, void *user); + +struct isl_access_info; +typedef struct isl_access_info isl_access_info; +struct isl_flow; +typedef struct isl_flow isl_flow; + +__isl_give isl_access_info *isl_access_info_alloc(__isl_take isl_map *sink, + void *sink_user, isl_access_level_before fn, int max_source); +__isl_give isl_access_info *isl_access_info_set_restrict( + __isl_take isl_access_info *acc, isl_access_restrict fn, void *user); +__isl_give isl_access_info *isl_access_info_add_source( + __isl_take isl_access_info *acc, __isl_take isl_map *source, + int must, void *source_user); +__isl_null isl_access_info *isl_access_info_free( + __isl_take isl_access_info *acc); + +isl_ctx *isl_access_info_get_ctx(__isl_keep isl_access_info *acc); + +__isl_give isl_flow *isl_access_info_compute_flow(__isl_take isl_access_info *acc); +isl_stat isl_flow_foreach(__isl_keep isl_flow *deps, + isl_stat (*fn)(__isl_take isl_map *dep, int must, void *dep_user, + void *user), + void *user); +__isl_give isl_map *isl_flow_get_no_source(__isl_keep isl_flow *deps, int must); +__isl_null isl_flow *isl_flow_free(__isl_take isl_flow *deps); + +isl_ctx *isl_flow_get_ctx(__isl_keep isl_flow *deps); + +struct __isl_export isl_union_access_info; +typedef struct isl_union_access_info isl_union_access_info; +struct __isl_export isl_union_flow; +typedef struct isl_union_flow isl_union_flow; + +__isl_constructor +__isl_give isl_union_access_info *isl_union_access_info_from_sink( + __isl_take isl_union_map *sink); +__isl_export +__isl_give isl_union_access_info *isl_union_access_info_set_must_source( + __isl_take isl_union_access_info *access, + __isl_take isl_union_map *must_source); +__isl_export +__isl_give isl_union_access_info *isl_union_access_info_set_may_source( + __isl_take isl_union_access_info *access, + __isl_take isl_union_map *may_source); +__isl_export +__isl_give isl_union_access_info *isl_union_access_info_set_kill( + __isl_take isl_union_access_info *access, + __isl_take isl_union_map *kill); +__isl_export +__isl_give isl_union_access_info *isl_union_access_info_set_schedule( + __isl_take isl_union_access_info *access, + __isl_take isl_schedule *schedule); +__isl_export +__isl_give isl_union_access_info *isl_union_access_info_set_schedule_map( + __isl_take isl_union_access_info *access, + __isl_take isl_union_map *schedule_map); +__isl_give isl_union_access_info *isl_union_access_info_copy( + __isl_keep isl_union_access_info *access); +__isl_null isl_union_access_info *isl_union_access_info_free( + __isl_take isl_union_access_info *access); + +isl_ctx *isl_union_access_info_get_ctx( + __isl_keep isl_union_access_info *access); + +__isl_give isl_union_access_info *isl_union_access_info_read_from_file( + isl_ctx *ctx, FILE *input); +__isl_give isl_printer *isl_printer_print_union_access_info( + __isl_take isl_printer *p, __isl_keep isl_union_access_info *access); +__isl_give char *isl_union_access_info_to_str( + __isl_keep isl_union_access_info *access); + +__isl_export +__isl_give isl_union_flow *isl_union_access_info_compute_flow( + __isl_take isl_union_access_info *access); + +isl_ctx *isl_union_flow_get_ctx(__isl_keep isl_union_flow *flow); +__isl_give isl_union_flow *isl_union_flow_copy( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_must_dependence( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_may_dependence( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_full_must_dependence( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_full_may_dependence( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_must_no_source( + __isl_keep isl_union_flow *flow); +__isl_export +__isl_give isl_union_map *isl_union_flow_get_may_no_source( + __isl_keep isl_union_flow *flow); +__isl_null isl_union_flow *isl_union_flow_free(__isl_take isl_union_flow *flow); + +__isl_give isl_printer *isl_printer_print_union_flow( + __isl_take isl_printer *p, __isl_keep isl_union_flow *flow); +__isl_give char *isl_union_flow_to_str(__isl_keep isl_union_flow *flow); + +int isl_union_map_compute_flow(__isl_take isl_union_map *sink, + __isl_take isl_union_map *must_source, + __isl_take isl_union_map *may_source, + __isl_take isl_union_map *schedule, + __isl_give isl_union_map **must_dep, __isl_give isl_union_map **may_dep, + __isl_give isl_union_map **must_no_source, + __isl_give isl_union_map **may_no_source); diff --git a/preproc-headers/dc67b0ce3dea88efbe42948e9040cc208b9889f90297e90e03be992a03f27686 b/preproc-headers/dc67b0ce3dea88efbe42948e9040cc208b9889f90297e90e03be992a03f27686 new file mode 100644 index 0000000..9af832b --- /dev/null +++ b/preproc-headers/dc67b0ce3dea88efbe42948e9040cc208b9889f90297e90e03be992a03f27686 @@ -0,0 +1,230 @@ + + + +#include +#include +#include +#include +#include +#include +#include + + + + + +isl_stat isl_options_set_ast_iterator_type(isl_ctx *ctx, const char *val); +const char *isl_options_get_ast_iterator_type(isl_ctx *ctx); + +isl_stat isl_options_set_ast_always_print_block(isl_ctx *ctx, int val); +int isl_options_get_ast_always_print_block(isl_ctx *ctx); + +__isl_give isl_ast_expr *isl_ast_expr_from_val(__isl_take isl_val *v); +__isl_give isl_ast_expr *isl_ast_expr_from_id(__isl_take isl_id *id); +__isl_give isl_ast_expr *isl_ast_expr_neg(__isl_take isl_ast_expr *expr); +__isl_give isl_ast_expr *isl_ast_expr_add(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_sub(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_mul(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_div(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_pdiv_q(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_pdiv_r(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_and(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_and_then(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_or(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_or_else(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_le(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_lt(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_ge(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_gt(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_eq(__isl_take isl_ast_expr *expr1, + __isl_take isl_ast_expr *expr2); +__isl_give isl_ast_expr *isl_ast_expr_access(__isl_take isl_ast_expr *array, + __isl_take isl_ast_expr_list *indices); +__isl_give isl_ast_expr *isl_ast_expr_call(__isl_take isl_ast_expr *function, + __isl_take isl_ast_expr_list *arguments); +__isl_give isl_ast_expr *isl_ast_expr_address_of(__isl_take isl_ast_expr *expr); + +__isl_give isl_ast_expr *isl_ast_expr_copy(__isl_keep isl_ast_expr *expr); +__isl_null isl_ast_expr *isl_ast_expr_free(__isl_take isl_ast_expr *expr); + +isl_ctx *isl_ast_expr_get_ctx(__isl_keep isl_ast_expr *expr); +__isl_subclass(isl_ast_expr) +enum isl_ast_expr_type isl_ast_expr_get_type(__isl_keep isl_ast_expr *expr); +__isl_export +__isl_give isl_val *isl_ast_expr_int_get_val(__isl_keep isl_ast_expr *expr); +__isl_give isl_val *isl_ast_expr_get_val(__isl_keep isl_ast_expr *expr); +__isl_export +__isl_give isl_id *isl_ast_expr_id_get_id(__isl_keep isl_ast_expr *expr); +__isl_give isl_id *isl_ast_expr_get_id(__isl_keep isl_ast_expr *expr); + +__isl_subclass(isl_ast_expr_op) +enum isl_ast_expr_op_type isl_ast_expr_op_get_type( + __isl_keep isl_ast_expr *expr); +enum isl_ast_expr_op_type isl_ast_expr_get_op_type( + __isl_keep isl_ast_expr *expr); +__isl_export +isl_size isl_ast_expr_op_get_n_arg(__isl_keep isl_ast_expr *expr); +isl_size isl_ast_expr_get_op_n_arg(__isl_keep isl_ast_expr *expr); +__isl_export +__isl_give isl_ast_expr *isl_ast_expr_op_get_arg(__isl_keep isl_ast_expr *expr, + int pos); +__isl_give isl_ast_expr *isl_ast_expr_get_op_arg(__isl_keep isl_ast_expr *expr, + int pos); +__isl_give isl_ast_expr *isl_ast_expr_set_op_arg(__isl_take isl_ast_expr *expr, + int pos, __isl_take isl_ast_expr *arg); + +isl_bool isl_ast_expr_is_equal(__isl_keep isl_ast_expr *expr1, + __isl_keep isl_ast_expr *expr2); + +__isl_give isl_ast_expr *isl_ast_expr_substitute_ids( + __isl_take isl_ast_expr *expr, __isl_take isl_id_to_ast_expr *id2expr); + +__isl_give isl_printer *isl_printer_print_ast_expr(__isl_take isl_printer *p, + __isl_keep isl_ast_expr *expr); +void isl_ast_expr_dump(__isl_keep isl_ast_expr *expr); +__isl_give char *isl_ast_expr_to_str(__isl_keep isl_ast_expr *expr); +__isl_export +__isl_give char *isl_ast_expr_to_C_str(__isl_keep isl_ast_expr *expr); + +__isl_give isl_ast_node *isl_ast_node_alloc_user(__isl_take isl_ast_expr *expr); +__isl_give isl_ast_node *isl_ast_node_copy(__isl_keep isl_ast_node *node); +__isl_null isl_ast_node *isl_ast_node_free(__isl_take isl_ast_node *node); + +isl_ctx *isl_ast_node_get_ctx(__isl_keep isl_ast_node *node); +__isl_subclass(isl_ast_node) +enum isl_ast_node_type isl_ast_node_get_type(__isl_keep isl_ast_node *node); + +__isl_give isl_ast_node *isl_ast_node_set_annotation( + __isl_take isl_ast_node *node, __isl_take isl_id *annotation); +__isl_give isl_id *isl_ast_node_get_annotation(__isl_keep isl_ast_node *node); + +__isl_export +__isl_give isl_ast_expr *isl_ast_node_for_get_iterator( + __isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_expr *isl_ast_node_for_get_init( + __isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_expr *isl_ast_node_for_get_cond( + __isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_expr *isl_ast_node_for_get_inc( + __isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_node *isl_ast_node_for_get_body( + __isl_keep isl_ast_node *node); +__isl_export +isl_bool isl_ast_node_for_is_degenerate(__isl_keep isl_ast_node *node); + +__isl_export +__isl_give isl_ast_expr *isl_ast_node_if_get_cond( + __isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_node *isl_ast_node_if_get_then_node( + __isl_keep isl_ast_node *node); +__isl_give isl_ast_node *isl_ast_node_if_get_then( + __isl_keep isl_ast_node *node); +__isl_export +isl_bool isl_ast_node_if_has_else_node(__isl_keep isl_ast_node *node); +isl_bool isl_ast_node_if_has_else(__isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_node *isl_ast_node_if_get_else_node( + __isl_keep isl_ast_node *node); +__isl_give isl_ast_node *isl_ast_node_if_get_else( + __isl_keep isl_ast_node *node); + +__isl_export +__isl_give isl_ast_node_list *isl_ast_node_block_get_children( + __isl_keep isl_ast_node *node); + +__isl_export +__isl_give isl_id *isl_ast_node_mark_get_id(__isl_keep isl_ast_node *node); +__isl_export +__isl_give isl_ast_node *isl_ast_node_mark_get_node( + __isl_keep isl_ast_node *node); + +__isl_export +__isl_give isl_ast_expr *isl_ast_node_user_get_expr( + __isl_keep isl_ast_node *node); + +isl_stat isl_ast_node_foreach_descendant_top_down( + __isl_keep isl_ast_node *node, + isl_bool (*fn)(__isl_keep isl_ast_node *node, void *user), void *user); + +__isl_give isl_printer *isl_printer_print_ast_node(__isl_take isl_printer *p, + __isl_keep isl_ast_node *node); +void isl_ast_node_dump(__isl_keep isl_ast_node *node); +__isl_give char *isl_ast_node_to_str(__isl_keep isl_ast_node *node); + +__isl_give isl_ast_print_options *isl_ast_print_options_alloc(isl_ctx *ctx); +__isl_give isl_ast_print_options *isl_ast_print_options_copy( + __isl_keep isl_ast_print_options *options); +__isl_null isl_ast_print_options *isl_ast_print_options_free( + __isl_take isl_ast_print_options *options); +isl_ctx *isl_ast_print_options_get_ctx( + __isl_keep isl_ast_print_options *options); + +__isl_give isl_ast_print_options *isl_ast_print_options_set_print_user( + __isl_take isl_ast_print_options *options, + __isl_give isl_printer *(*print_user)(__isl_take isl_printer *p, + __isl_take isl_ast_print_options *options, + __isl_keep isl_ast_node *node, void *user), + void *user); +__isl_give isl_ast_print_options *isl_ast_print_options_set_print_for( + __isl_take isl_ast_print_options *options, + __isl_give isl_printer *(*print_for)(__isl_take isl_printer *p, + __isl_take isl_ast_print_options *options, + __isl_keep isl_ast_node *node, void *user), + void *user); + +isl_stat isl_options_set_ast_print_macro_once(isl_ctx *ctx, int val); +int isl_options_get_ast_print_macro_once(isl_ctx *ctx); + +isl_stat isl_ast_expr_foreach_ast_expr_op_type(__isl_keep isl_ast_expr *expr, + isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); +isl_stat isl_ast_expr_foreach_ast_op_type(__isl_keep isl_ast_expr *expr, + isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); +isl_stat isl_ast_node_foreach_ast_expr_op_type(__isl_keep isl_ast_node *node, + isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); +isl_stat isl_ast_node_foreach_ast_op_type(__isl_keep isl_ast_node *node, + isl_stat (*fn)(enum isl_ast_expr_op_type type, void *user), void *user); +__isl_give isl_printer *isl_ast_expr_op_type_set_print_name( + __isl_take isl_printer *p, enum isl_ast_expr_op_type type, + __isl_keep const char *name); +__isl_give isl_printer *isl_ast_op_type_set_print_name( + __isl_take isl_printer *p, enum isl_ast_expr_op_type type, + __isl_keep const char *name); +__isl_give isl_printer *isl_ast_expr_op_type_print_macro( + enum isl_ast_expr_op_type type, __isl_take isl_printer *p); +__isl_give isl_printer *isl_ast_op_type_print_macro( + enum isl_ast_expr_op_type type, __isl_take isl_printer *p); +__isl_give isl_printer *isl_ast_expr_print_macros( + __isl_keep isl_ast_expr *expr, __isl_take isl_printer *p); +__isl_give isl_printer *isl_ast_node_print_macros( + __isl_keep isl_ast_node *node, __isl_take isl_printer *p); +__isl_give isl_printer *isl_ast_node_print(__isl_keep isl_ast_node *node, + __isl_take isl_printer *p, + __isl_take isl_ast_print_options *options); +__isl_give isl_printer *isl_ast_node_for_print(__isl_keep isl_ast_node *node, + __isl_take isl_printer *p, + __isl_take isl_ast_print_options *options); +__isl_give isl_printer *isl_ast_node_if_print(__isl_keep isl_ast_node *node, + __isl_take isl_printer *p, + __isl_take isl_ast_print_options *options); + +__isl_export +__isl_give char *isl_ast_node_to_C_str(__isl_keep isl_ast_node *node); diff --git a/preproc-headers/e2498d10a929860891e1d4412fce643ab84163d592e3d0a663ca1468f22b2126 b/preproc-headers/e2498d10a929860891e1d4412fce643ab84163d592e3d0a663ca1468f22b2126 new file mode 100644 index 0000000..dc8f214 --- /dev/null +++ b/preproc-headers/e2498d10a929860891e1d4412fce643ab84163d592e3d0a663ca1468f22b2126 @@ -0,0 +1,187 @@ + + + +#include +#include + + + + + +isl_size isl_union_set_dim(__isl_keep isl_union_set *uset, + enum isl_dim_type type); + +__isl_constructor +__isl_give isl_union_set *isl_union_set_from_basic_set( + __isl_take isl_basic_set *bset); +__isl_constructor +__isl_give isl_union_set *isl_union_set_from_set(__isl_take isl_set *set); +__isl_overload +__isl_give isl_union_set *isl_union_set_empty_ctx(isl_ctx *ctx); +__isl_give isl_union_set *isl_union_set_empty_space( + __isl_take isl_space *space); +__isl_give isl_union_set *isl_union_set_empty(__isl_take isl_space *space); +__isl_give isl_union_set *isl_union_set_copy(__isl_keep isl_union_set *uset); +__isl_null isl_union_set *isl_union_set_free(__isl_take isl_union_set *uset); + +isl_ctx *isl_union_set_get_ctx(__isl_keep isl_union_set *uset); +__isl_export +__isl_give isl_space *isl_union_set_get_space(__isl_keep isl_union_set *uset); + +__isl_give isl_union_set *isl_union_set_reset_user( + __isl_take isl_union_set *uset); + +__isl_export +__isl_give isl_union_set *isl_union_set_universe( + __isl_take isl_union_set *uset); +__isl_give isl_set *isl_union_set_params(__isl_take isl_union_set *uset); + +__isl_export +__isl_give isl_union_set *isl_union_set_detect_equalities( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_affine_hull( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_polyhedral_hull( + __isl_take isl_union_set *uset); +__isl_give isl_union_set *isl_union_set_remove_redundancies( + __isl_take isl_union_set *uset); +__isl_give isl_union_set *isl_union_set_simple_hull( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_coalesce( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_compute_divs( + __isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_lexmin(__isl_take isl_union_set *uset); +__isl_export +__isl_give isl_union_set *isl_union_set_lexmax(__isl_take isl_union_set *uset); + +__isl_give isl_union_set *isl_union_set_add_set(__isl_take isl_union_set *uset, + __isl_take isl_set *set); +__isl_export +__isl_give isl_union_set *isl_union_set_union(__isl_take isl_union_set *uset1, + __isl_take isl_union_set *uset2); +__isl_export +__isl_give isl_union_set *isl_union_set_subtract( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); +__isl_export +__isl_give isl_union_set *isl_union_set_intersect( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); +__isl_export +__isl_give isl_union_set *isl_union_set_intersect_params( + __isl_take isl_union_set *uset, __isl_take isl_set *set); +__isl_give isl_union_set *isl_union_set_product(__isl_take isl_union_set *uset1, + __isl_take isl_union_set *uset2); +__isl_export +__isl_give isl_union_set *isl_union_set_gist(__isl_take isl_union_set *uset, + __isl_take isl_union_set *context); +__isl_export +__isl_give isl_union_set *isl_union_set_gist_params( + __isl_take isl_union_set *uset, __isl_take isl_set *set); + +__isl_export +__isl_give isl_union_set *isl_union_set_apply( + __isl_take isl_union_set *uset, __isl_take isl_union_map *umap); +__isl_overload +__isl_give isl_union_set *isl_union_set_preimage_multi_aff( + __isl_take isl_union_set *uset, __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_union_set *isl_union_set_preimage_pw_multi_aff( + __isl_take isl_union_set *uset, __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_union_set *isl_union_set_preimage_union_pw_multi_aff( + __isl_take isl_union_set *uset, + __isl_take isl_union_pw_multi_aff *upma); + +__isl_give isl_union_set *isl_union_set_project_out( + __isl_take isl_union_set *uset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_union_set *isl_union_set_project_out_all_params( + __isl_take isl_union_set *uset); +__isl_give isl_union_set *isl_union_set_remove_divs( + __isl_take isl_union_set *bset); + +isl_bool isl_union_set_is_params(__isl_keep isl_union_set *uset); +__isl_export +isl_bool isl_union_set_is_empty(__isl_keep isl_union_set *uset); + +__isl_export +isl_bool isl_union_set_is_subset(__isl_keep isl_union_set *uset1, + __isl_keep isl_union_set *uset2); +__isl_export +isl_bool isl_union_set_is_equal(__isl_keep isl_union_set *uset1, + __isl_keep isl_union_set *uset2); +__isl_export +isl_bool isl_union_set_is_disjoint(__isl_keep isl_union_set *uset1, + __isl_keep isl_union_set *uset2); +__isl_export +isl_bool isl_union_set_is_strict_subset(__isl_keep isl_union_set *uset1, + __isl_keep isl_union_set *uset2); + +uint32_t isl_union_set_get_hash(__isl_keep isl_union_set *uset); + +isl_size isl_union_set_n_set(__isl_keep isl_union_set *uset); +__isl_export +isl_stat isl_union_set_foreach_set(__isl_keep isl_union_set *uset, + isl_stat (*fn)(__isl_take isl_set *set, void *user), void *user); +__isl_export +isl_bool isl_union_set_every_set(__isl_keep isl_union_set *uset, + isl_bool (*test)(__isl_keep isl_set *set, void *user), void *user); +__isl_give isl_basic_set_list *isl_union_set_get_basic_set_list( + __isl_keep isl_union_set *uset); +__isl_give isl_set_list *isl_union_set_get_set_list( + __isl_keep isl_union_set *uset); +isl_bool isl_union_set_contains(__isl_keep isl_union_set *uset, + __isl_keep isl_space *space); +__isl_export +__isl_give isl_set *isl_union_set_extract_set(__isl_keep isl_union_set *uset, + __isl_take isl_space *dim); +__isl_export +isl_bool isl_union_set_isa_set(__isl_keep isl_union_set *uset); +__isl_give isl_set *isl_set_from_union_set(__isl_take isl_union_set *uset); +__isl_export +isl_stat isl_union_set_foreach_point(__isl_keep isl_union_set *uset, + isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user); + +__isl_give isl_basic_set *isl_union_set_sample(__isl_take isl_union_set *uset); +__isl_export +__isl_give isl_point *isl_union_set_sample_point( + __isl_take isl_union_set *uset); + +__isl_constructor +__isl_give isl_union_set *isl_union_set_from_point(__isl_take isl_point *pnt); + +__isl_give isl_union_set *isl_union_set_lift(__isl_take isl_union_set *uset); + +__isl_give isl_union_map *isl_union_set_lex_lt_union_set( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); +__isl_give isl_union_map *isl_union_set_lex_le_union_set( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); +__isl_give isl_union_map *isl_union_set_lex_gt_union_set( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); +__isl_give isl_union_map *isl_union_set_lex_ge_union_set( + __isl_take isl_union_set *uset1, __isl_take isl_union_set *uset2); + +__isl_give isl_union_set *isl_union_set_coefficients( + __isl_take isl_union_set *bset); +__isl_give isl_union_set *isl_union_set_solutions( + __isl_take isl_union_set *bset); + +__isl_give isl_union_set *isl_union_set_read_from_file(isl_ctx *ctx, + FILE *input); +__isl_constructor +__isl_give isl_union_set *isl_union_set_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give char *isl_union_set_to_str(__isl_keep isl_union_set *uset); +__isl_give isl_printer *isl_printer_print_union_set(__isl_take isl_printer *p, + __isl_keep isl_union_set *uset); +void isl_union_set_dump(__isl_keep isl_union_set *uset); + +isl_ctx *isl_union_set_list_get_ctx(__isl_keep isl_union_set_list *list); __isl_constructor __isl_give isl_union_set_list *isl_union_set_list_from_union_set( __isl_take isl_union_set *el); __isl_constructor __isl_give isl_union_set_list *isl_union_set_list_alloc(isl_ctx *ctx, int n); __isl_give isl_union_set_list *isl_union_set_list_copy( __isl_keep isl_union_set_list *list); __isl_null isl_union_set_list *isl_union_set_list_free( __isl_take isl_union_set_list *list); __isl_export __isl_give isl_union_set_list *isl_union_set_list_add( __isl_take isl_union_set_list *list, __isl_take isl_union_set *el); __isl_give isl_union_set_list *isl_union_set_list_insert( __isl_take isl_union_set_list *list, unsigned pos, __isl_take struct isl_union_set *el); __isl_give isl_union_set_list *isl_union_set_list_drop( __isl_take isl_union_set_list *list, unsigned first, unsigned n); __isl_export __isl_give isl_union_set_list *isl_union_set_list_clear( __isl_take isl_union_set_list *list); __isl_give isl_union_set_list *isl_union_set_list_swap( __isl_take isl_union_set_list *list, unsigned pos1, unsigned pos2); __isl_give isl_union_set_list *isl_union_set_list_reverse( __isl_take isl_union_set_list *list); __isl_export __isl_give isl_union_set_list *isl_union_set_list_concat( __isl_take isl_union_set_list *list1, __isl_take isl_union_set_list *list2); __isl_export isl_size isl_union_set_list_size(__isl_keep isl_union_set_list *list); isl_size isl_union_set_list_n_union_set(__isl_keep isl_union_set_list *list); __isl_export __isl_give isl_union_set *isl_union_set_list_get_at( __isl_keep isl_union_set_list *list, int index); __isl_give struct isl_union_set *isl_union_set_list_get_union_set( __isl_keep isl_union_set_list *list, int index); __isl_give struct isl_union_set_list *isl_union_set_list_set_union_set( __isl_take struct isl_union_set_list *list, int index, __isl_take struct isl_union_set *el); __isl_export isl_stat isl_union_set_list_foreach(__isl_keep isl_union_set_list *list, isl_stat (*fn)(__isl_take isl_union_set *el, void *user), void *user); __isl_give isl_union_set_list *isl_union_set_list_map( __isl_take isl_union_set_list *list, __isl_give isl_union_set * (*fn)(__isl_take isl_union_set *el, void *user), void *user); __isl_give isl_union_set_list *isl_union_set_list_sort( __isl_take isl_union_set_list *list, int (*cmp)(__isl_keep struct isl_union_set *a, __isl_keep struct isl_union_set *b, void *user), void *user); isl_stat isl_union_set_list_foreach_scc(__isl_keep isl_union_set_list *list, isl_bool (*follows)(__isl_keep struct isl_union_set *a, __isl_keep struct isl_union_set *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_union_set_list *scc, void *user), void *fn_user); __isl_give char *isl_union_set_list_to_str( __isl_keep isl_union_set_list *list); __isl_give isl_printer *isl_printer_print_union_set_list( __isl_take isl_printer *p, __isl_keep isl_union_set_list *list); void isl_union_set_list_dump(__isl_keep isl_union_set_list *list); + +__isl_give isl_union_set *isl_union_set_list_union( + __isl_take isl_union_set_list *list); diff --git a/preproc-headers/f50fac0beb24a73d2849670fd30f37a78e4f1961a2930783fd2528b302f720b5 b/preproc-headers/f50fac0beb24a73d2849670fd30f37a78e4f1961a2930783fd2528b302f720b5 new file mode 100644 index 0000000..019aa3a --- /dev/null +++ b/preproc-headers/f50fac0beb24a73d2849670fd30f37a78e4f1961a2930783fd2528b302f720b5 @@ -0,0 +1,546 @@ +#line 13 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + + + + +isl_size isl_basic_set_n_dim(__isl_keep isl_basic_set *bset); +isl_size isl_basic_set_n_param(__isl_keep isl_basic_set *bset); +isl_size isl_basic_set_total_dim(__isl_keep const isl_basic_set *bset); +isl_size isl_basic_set_dim(__isl_keep isl_basic_set *bset, + enum isl_dim_type type); + +isl_size isl_set_n_dim(__isl_keep isl_set *set); +isl_size isl_set_n_param(__isl_keep isl_set *set); +isl_size isl_set_dim(__isl_keep isl_set *set, enum isl_dim_type type); + +isl_ctx *isl_basic_set_get_ctx(__isl_keep isl_basic_set *bset); +isl_ctx *isl_set_get_ctx(__isl_keep isl_set *set); +__isl_give isl_space *isl_basic_set_get_space(__isl_keep isl_basic_set *bset); +__isl_export +__isl_give isl_space *isl_set_get_space(__isl_keep isl_set *set); +__isl_give isl_set *isl_set_reset_space(__isl_take isl_set *set, + __isl_take isl_space *dim); + +__isl_give isl_aff *isl_basic_set_get_div(__isl_keep isl_basic_set *bset, + int pos); + +__isl_give isl_local_space *isl_basic_set_get_local_space( + __isl_keep isl_basic_set *bset); + +const char *isl_basic_set_get_tuple_name(__isl_keep isl_basic_set *bset); +isl_bool isl_set_has_tuple_name(__isl_keep isl_set *set); +const char *isl_set_get_tuple_name(__isl_keep isl_set *set); +__isl_give isl_basic_set *isl_basic_set_set_tuple_name( + __isl_take isl_basic_set *set, const char *s); +__isl_give isl_set *isl_set_set_tuple_name(__isl_take isl_set *set, + const char *s); +const char *isl_basic_set_get_dim_name(__isl_keep isl_basic_set *bset, + enum isl_dim_type type, unsigned pos); +__isl_give isl_basic_set *isl_basic_set_set_dim_name( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, const char *s); +isl_bool isl_set_has_dim_name(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +const char *isl_set_get_dim_name(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +__isl_give isl_set *isl_set_set_dim_name(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, const char *s); + +__isl_give isl_id *isl_basic_set_get_dim_id(__isl_keep isl_basic_set *bset, + enum isl_dim_type type, unsigned pos); +__isl_give isl_basic_set *isl_basic_set_set_tuple_id( + __isl_take isl_basic_set *bset, __isl_take isl_id *id); +__isl_give isl_set *isl_set_set_dim_id(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_id *id); +isl_bool isl_set_has_dim_id(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +__isl_give isl_id *isl_set_get_dim_id(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +__isl_give isl_set *isl_set_set_tuple_id(__isl_take isl_set *set, + __isl_take isl_id *id); +__isl_give isl_set *isl_set_reset_tuple_id(__isl_take isl_set *set); +isl_bool isl_set_has_tuple_id(__isl_keep isl_set *set); +__isl_give isl_id *isl_set_get_tuple_id(__isl_keep isl_set *set); +__isl_give isl_set *isl_set_reset_user(__isl_take isl_set *set); + +int isl_set_find_dim_by_id(__isl_keep isl_set *set, enum isl_dim_type type, + __isl_keep isl_id *id); +int isl_set_find_dim_by_name(__isl_keep isl_set *set, enum isl_dim_type type, + const char *name); + +int isl_basic_set_is_rational(__isl_keep isl_basic_set *bset); + +__isl_null isl_basic_set *isl_basic_set_free(__isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_copy(__isl_keep isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_empty(__isl_take isl_space *space); +__isl_give isl_basic_set *isl_basic_set_universe(__isl_take isl_space *space); +__isl_give isl_basic_set *isl_basic_set_nat_universe( + __isl_take isl_space *space); +__isl_give isl_basic_set *isl_basic_set_positive_orthant( + __isl_take isl_space *space); +void isl_basic_set_print_internal(__isl_keep isl_basic_set *bset, + FILE *out, int indent); +__isl_export +__isl_give isl_basic_set *isl_basic_set_intersect( + __isl_take isl_basic_set *bset1, + __isl_take isl_basic_set *bset2); +__isl_export +__isl_give isl_basic_set *isl_basic_set_intersect_params( + __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); +__isl_export +__isl_give isl_basic_set *isl_basic_set_apply( + __isl_take isl_basic_set *bset, + __isl_take isl_basic_map *bmap); +__isl_give isl_basic_set *isl_basic_set_preimage_multi_aff( + __isl_take isl_basic_set *bset, __isl_take isl_multi_aff *ma); +__isl_export +__isl_give isl_basic_set *isl_basic_set_affine_hull( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_remove_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_export +__isl_give isl_basic_set *isl_basic_set_sample(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_basic_set *isl_basic_set_detect_equalities( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_remove_redundancies( + __isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_remove_redundancies(__isl_take isl_set *set); +__isl_give isl_basic_set *isl_basic_set_list_intersect( + __isl_take struct isl_basic_set_list *list); + +__isl_give isl_set *isl_set_list_union(__isl_take isl_set_list *list); + +__isl_give isl_basic_set *isl_basic_set_read_from_file(isl_ctx *ctx, + FILE *input); +__isl_constructor +__isl_give isl_basic_set *isl_basic_set_read_from_str(isl_ctx *ctx, + const char *str); +__isl_give isl_set *isl_set_read_from_file(isl_ctx *ctx, FILE *input); +__isl_constructor +__isl_give isl_set *isl_set_read_from_str(isl_ctx *ctx, const char *str); +void isl_basic_set_dump(__isl_keep isl_basic_set *bset); +void isl_set_dump(__isl_keep isl_set *set); +__isl_give isl_printer *isl_printer_print_basic_set( + __isl_take isl_printer *printer, __isl_keep isl_basic_set *bset); +__isl_give isl_printer *isl_printer_print_set(__isl_take isl_printer *printer, + __isl_keep isl_set *map); +__isl_give isl_basic_set *isl_basic_set_fix_si(__isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_set *isl_basic_set_fix_val(__isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); +__isl_give isl_set *isl_set_fix_si(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_set *isl_set_lower_bound_si(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_set *isl_basic_set_lower_bound_val( + __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos, + __isl_take isl_val *value); +__isl_give isl_set *isl_set_lower_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value); +__isl_give isl_set *isl_set_upper_bound_si(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, int value); +__isl_give isl_basic_set *isl_basic_set_upper_bound_val( + __isl_take isl_basic_set *bset, enum isl_dim_type type, unsigned pos, + __isl_take isl_val *value); +__isl_give isl_set *isl_set_upper_bound_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *value); + +__isl_give isl_set *isl_set_equate(__isl_take isl_set *set, + enum isl_dim_type type1, int pos1, enum isl_dim_type type2, int pos2); + +__isl_export +isl_bool isl_basic_set_is_equal(__isl_keep isl_basic_set *bset1, + __isl_keep isl_basic_set *bset2); +isl_bool isl_basic_set_is_disjoint(__isl_keep isl_basic_set *bset1, + __isl_keep isl_basic_set *bset2); + +__isl_give isl_set *isl_basic_set_partial_lexmin( + __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_set *isl_basic_set_partial_lexmax( + __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_set *isl_set_partial_lexmin( + __isl_take isl_set *set, __isl_take isl_set *dom, + __isl_give isl_set **empty); +__isl_give isl_set *isl_set_partial_lexmax( + __isl_take isl_set *set, __isl_take isl_set *dom, + __isl_give isl_set **empty); +__isl_export +__isl_give isl_set *isl_basic_set_lexmin(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_set *isl_basic_set_lexmax(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_set *isl_set_lexmin(__isl_take isl_set *set); +__isl_export +__isl_give isl_set *isl_set_lexmax(__isl_take isl_set *set); +__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmin_pw_multi_aff( + __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_give isl_pw_multi_aff *isl_basic_set_partial_lexmax_pw_multi_aff( + __isl_take isl_basic_set *bset, __isl_take isl_basic_set *dom, + __isl_give isl_set **empty); +__isl_export +__isl_give isl_pw_multi_aff *isl_set_lexmin_pw_multi_aff( + __isl_take isl_set *set); +__isl_export +__isl_give isl_pw_multi_aff *isl_set_lexmax_pw_multi_aff( + __isl_take isl_set *set); + +__isl_export +__isl_give isl_set *isl_basic_set_union( + __isl_take isl_basic_set *bset1, + __isl_take isl_basic_set *bset2); + +int isl_basic_set_compare_at(__isl_keep isl_basic_set *bset1, + __isl_keep isl_basic_set *bset2, int pos); +int isl_set_follows_at(__isl_keep isl_set *set1, + __isl_keep isl_set *set2, int pos); + +__isl_export +__isl_give isl_basic_set *isl_basic_set_params(__isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_from_params( + __isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_set *isl_set_params(__isl_take isl_set *set); +__isl_give isl_set *isl_set_from_params(__isl_take isl_set *set); + +__isl_export +__isl_give isl_set *isl_set_bind(__isl_take isl_set *set, + __isl_take isl_multi_id *tuple); +__isl_export +__isl_give isl_set *isl_set_unbind_params(__isl_take isl_set *set, + __isl_take isl_multi_id *tuple); +__isl_export +__isl_give isl_map *isl_set_unbind_params_insert_domain( + __isl_take isl_set *set, __isl_take isl_multi_id *domain); + +isl_stat isl_basic_set_dims_get_sign(__isl_keep isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, unsigned n, int *signs); + +isl_bool isl_basic_set_plain_is_universe(__isl_keep isl_basic_set *bset); +isl_bool isl_basic_set_is_universe(__isl_keep isl_basic_set *bset); +isl_bool isl_basic_set_plain_is_empty(__isl_keep isl_basic_set *bset); +__isl_export +isl_bool isl_basic_set_is_empty(__isl_keep isl_basic_set *bset); +isl_bool isl_basic_set_is_bounded(__isl_keep isl_basic_set *bset); +__isl_export +isl_bool isl_basic_set_is_subset(__isl_keep isl_basic_set *bset1, + __isl_keep isl_basic_set *bset2); +isl_bool isl_basic_set_plain_is_equal(__isl_keep isl_basic_set *bset1, + __isl_keep isl_basic_set *bset2); + +__isl_export +__isl_give isl_set *isl_set_empty(__isl_take isl_space *space); +__isl_export +__isl_give isl_set *isl_set_universe(__isl_take isl_space *space); +__isl_give isl_set *isl_set_nat_universe(__isl_take isl_space *dim); +__isl_give isl_set *isl_set_copy(__isl_keep isl_set *set); +__isl_null isl_set *isl_set_free(__isl_take isl_set *set); +__isl_constructor +__isl_give isl_set *isl_set_from_basic_set(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_basic_set *isl_set_sample(__isl_take isl_set *set); +__isl_export +__isl_give isl_point *isl_basic_set_sample_point(__isl_take isl_basic_set *bset); +__isl_export +__isl_give isl_point *isl_set_sample_point(__isl_take isl_set *set); +__isl_export +__isl_give isl_set *isl_set_detect_equalities(__isl_take isl_set *set); +__isl_export +__isl_give isl_basic_set *isl_set_affine_hull(__isl_take isl_set *set); +__isl_give isl_basic_set *isl_set_convex_hull(__isl_take isl_set *set); +__isl_export +__isl_give isl_basic_set *isl_set_polyhedral_hull(__isl_take isl_set *set); +__isl_give isl_basic_set *isl_set_simple_hull(__isl_take isl_set *set); +__isl_export +__isl_give isl_basic_set *isl_set_unshifted_simple_hull( + __isl_take isl_set *set); +__isl_give isl_basic_set *isl_set_plain_unshifted_simple_hull( + __isl_take isl_set *set); +__isl_give isl_basic_set *isl_set_unshifted_simple_hull_from_set_list( + __isl_take isl_set *set, __isl_take isl_set_list *list); +__isl_give isl_basic_set *isl_set_bounded_simple_hull(__isl_take isl_set *set); + +__isl_give isl_set *isl_set_union_disjoint( + __isl_take isl_set *set1, __isl_take isl_set *set2); +__isl_export +__isl_give isl_set *isl_set_union( + __isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_export +__isl_give isl_set *isl_set_product(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_give isl_basic_set *isl_basic_set_flat_product( + __isl_take isl_basic_set *bset1, __isl_take isl_basic_set *bset2); +__isl_give isl_set *isl_set_flat_product(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_export +__isl_give isl_set *isl_set_intersect( + __isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_export +__isl_give isl_set *isl_set_intersect_params(__isl_take isl_set *set, + __isl_take isl_set *params); +__isl_give isl_set *isl_set_intersect_factor_domain(__isl_take isl_set *set, + __isl_take isl_set *domain); +__isl_give isl_set *isl_set_intersect_factor_range(__isl_take isl_set *set, + __isl_take isl_set *range); +__isl_export +__isl_give isl_set *isl_set_subtract( + __isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_export +__isl_give isl_set *isl_set_complement(__isl_take isl_set *set); +__isl_export +__isl_give isl_set *isl_set_apply( + __isl_take isl_set *set, + __isl_take isl_map *map); +__isl_overload +__isl_give isl_set *isl_set_preimage_multi_aff(__isl_take isl_set *set, + __isl_take isl_multi_aff *ma); +__isl_overload +__isl_give isl_set *isl_set_preimage_pw_multi_aff(__isl_take isl_set *set, + __isl_take isl_pw_multi_aff *pma); +__isl_overload +__isl_give isl_set *isl_set_preimage_multi_pw_aff(__isl_take isl_set *set, + __isl_take isl_multi_pw_aff *mpa); +__isl_give isl_set *isl_set_fix_val(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, __isl_take isl_val *v); +struct isl_set *isl_set_fix_dim_si(struct isl_set *set, + unsigned dim, int value); +__isl_give isl_basic_set *isl_basic_set_insert_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned pos, unsigned n); +__isl_give isl_set *isl_set_insert_dims(__isl_take isl_set *set, + enum isl_dim_type type, unsigned pos, unsigned n); +__isl_give isl_basic_set *isl_basic_set_add_dims(__isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned n); +__isl_give isl_set *isl_set_add_dims(__isl_take isl_set *set, + enum isl_dim_type type, unsigned n); +__isl_give isl_basic_set *isl_basic_set_move_dims(__isl_take isl_basic_set *bset, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_set *isl_set_move_dims(__isl_take isl_set *set, + enum isl_dim_type dst_type, unsigned dst_pos, + enum isl_dim_type src_type, unsigned src_pos, unsigned n); +__isl_give isl_basic_set *isl_basic_set_project_out( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_overload +__isl_give isl_set *isl_set_project_out_param_id(__isl_take isl_set *set, + __isl_take isl_id *id); +__isl_overload +__isl_give isl_set *isl_set_project_out_param_id_list(__isl_take isl_set *set, + __isl_take isl_id_list *list); +__isl_give isl_set *isl_set_project_out(__isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_export +__isl_give isl_set *isl_set_project_out_all_params(__isl_take isl_set *set); +__isl_give isl_map *isl_set_project_onto_map(__isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_set *isl_basic_set_remove_divs( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_basic_set_eliminate( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_set *isl_set_eliminate(__isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_set *isl_set_eliminate_dims(__isl_take isl_set *set, + unsigned first, unsigned n); +__isl_give isl_set *isl_set_remove_dims(__isl_take isl_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_set *isl_basic_set_remove_divs_involving_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_set *isl_set_remove_divs_involving_dims(__isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_set *isl_basic_set_remove_unknown_divs( + __isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_remove_unknown_divs(__isl_take isl_set *set); +__isl_give isl_set *isl_set_remove_divs(__isl_take isl_set *set); +__isl_give isl_set *isl_set_split_dims(__isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); + +__isl_give isl_basic_set *isl_basic_set_drop_constraints_involving_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_basic_set *isl_basic_set_drop_constraints_not_involving_dims( + __isl_take isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_set *isl_set_drop_constraints_involving_dims( + __isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); +__isl_give isl_set *isl_set_drop_constraints_not_involving_dims( + __isl_take isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); + +isl_bool isl_basic_set_involves_dims(__isl_keep isl_basic_set *bset, + enum isl_dim_type type, unsigned first, unsigned n); +isl_bool isl_set_involves_dims(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned first, unsigned n); + +void isl_set_print_internal(__isl_keep isl_set *set, FILE *out, int indent); +isl_bool isl_set_plain_is_empty(__isl_keep isl_set *set); +isl_bool isl_set_plain_is_universe(__isl_keep isl_set *set); +isl_bool isl_set_is_params(__isl_keep isl_set *set); +__isl_export +isl_bool isl_set_is_empty(__isl_keep isl_set *set); +isl_bool isl_set_is_bounded(__isl_keep isl_set *set); +__isl_export +isl_bool isl_set_is_subset(__isl_keep isl_set *set1, __isl_keep isl_set *set2); +__isl_export +isl_bool isl_set_is_strict_subset(__isl_keep isl_set *set1, + __isl_keep isl_set *set2); +__isl_export +isl_bool isl_set_is_equal(__isl_keep isl_set *set1, __isl_keep isl_set *set2); +__isl_export +isl_bool isl_set_is_disjoint(__isl_keep isl_set *set1, + __isl_keep isl_set *set2); +__isl_export +isl_bool isl_set_is_singleton(__isl_keep isl_set *set); +isl_bool isl_set_is_box(__isl_keep isl_set *set); +isl_bool isl_set_has_equal_space(__isl_keep isl_set *set1, + __isl_keep isl_set *set2); + +__isl_give isl_set *isl_set_sum(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_give isl_basic_set *isl_basic_set_neg(__isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_neg(__isl_take isl_set *set); + +__isl_give isl_set *isl_set_make_disjoint(__isl_take isl_set *set); +__isl_give isl_set *isl_basic_set_compute_divs(__isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_compute_divs(__isl_take isl_set *set); +ISL_DEPRECATED +__isl_give isl_set *isl_set_align_divs(__isl_take isl_set *set); + +__isl_give isl_val *isl_set_plain_get_val_if_fixed(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +isl_bool isl_set_dim_is_bounded(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +isl_bool isl_set_dim_has_lower_bound(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +isl_bool isl_set_dim_has_upper_bound(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +isl_bool isl_set_dim_has_any_lower_bound(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); +isl_bool isl_set_dim_has_any_upper_bound(__isl_keep isl_set *set, + enum isl_dim_type type, unsigned pos); + +__isl_export +__isl_give isl_basic_set *isl_basic_set_gist(__isl_take isl_basic_set *bset, + __isl_take isl_basic_set *context); +__isl_give isl_set *isl_set_gist_basic_set(__isl_take isl_set *set, + __isl_take isl_basic_set *context); +__isl_export +__isl_give isl_set *isl_set_gist(__isl_take isl_set *set, + __isl_take isl_set *context); +__isl_give isl_set *isl_set_gist_params(__isl_take isl_set *set, + __isl_take isl_set *context); +isl_stat isl_set_dim_residue_class_val(__isl_keep isl_set *set, + int pos, __isl_give isl_val **modulo, __isl_give isl_val **residue); + +__isl_give isl_stride_info *isl_set_get_stride_info(__isl_keep isl_set *set, + int pos); +__isl_export +__isl_give isl_val *isl_set_get_stride(__isl_keep isl_set *set, int pos); + +__isl_export +__isl_give isl_set *isl_set_coalesce(__isl_take isl_set *set); + +int isl_set_plain_cmp(__isl_keep isl_set *set1, __isl_keep isl_set *set2); +isl_bool isl_set_plain_is_equal(__isl_keep isl_set *set1, + __isl_keep isl_set *set2); +isl_bool isl_set_plain_is_disjoint(__isl_keep isl_set *set1, + __isl_keep isl_set *set2); + +uint32_t isl_set_get_hash(struct isl_set *set); + +isl_size isl_set_n_basic_set(__isl_keep isl_set *set); +__isl_export +isl_stat isl_set_foreach_basic_set(__isl_keep isl_set *set, + isl_stat (*fn)(__isl_take isl_basic_set *bset, void *user), void *user); +__isl_give isl_basic_set_list *isl_set_get_basic_set_list( + __isl_keep isl_set *set); + +__isl_export +isl_stat isl_set_foreach_point(__isl_keep isl_set *set, + isl_stat (*fn)(__isl_take isl_point *pnt, void *user), void *user); +__isl_give isl_val *isl_set_count_val(__isl_keep isl_set *set); + +__isl_constructor +__isl_give isl_basic_set *isl_basic_set_from_point(__isl_take isl_point *pnt); +__isl_constructor +__isl_give isl_set *isl_set_from_point(__isl_take isl_point *pnt); +__isl_give isl_basic_set *isl_basic_set_box_from_points( + __isl_take isl_point *pnt1, __isl_take isl_point *pnt2); +__isl_give isl_set *isl_set_box_from_points(__isl_take isl_point *pnt1, + __isl_take isl_point *pnt2); + +__isl_give isl_basic_set *isl_basic_set_lift(__isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_lift(__isl_take isl_set *set); + +__isl_give isl_map *isl_set_lex_le_set(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_give isl_map *isl_set_lex_lt_set(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_give isl_map *isl_set_lex_ge_set(__isl_take isl_set *set1, + __isl_take isl_set *set2); +__isl_give isl_map *isl_set_lex_gt_set(__isl_take isl_set *set1, + __isl_take isl_set *set2); + +int isl_set_size(__isl_keep isl_set *set); + +__isl_give isl_basic_set *isl_basic_set_align_params( + __isl_take isl_basic_set *bset, __isl_take isl_space *model); +__isl_give isl_set *isl_set_align_params(__isl_take isl_set *set, + __isl_take isl_space *model); +__isl_give isl_basic_set *isl_basic_set_drop_unused_params( + __isl_take isl_basic_set *bset); +__isl_give isl_set *isl_set_drop_unused_params(__isl_take isl_set *set); + +__isl_give isl_mat *isl_basic_set_equalities_matrix( + __isl_keep isl_basic_set *bset, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); +__isl_give isl_mat *isl_basic_set_inequalities_matrix( + __isl_keep isl_basic_set *bset, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); +__isl_give isl_basic_set *isl_basic_set_from_constraint_matrices( + __isl_take isl_space *dim, + __isl_take isl_mat *eq, __isl_take isl_mat *ineq, enum isl_dim_type c1, + enum isl_dim_type c2, enum isl_dim_type c3, enum isl_dim_type c4); + +__isl_give isl_basic_set *isl_basic_set_from_multi_aff( + __isl_take isl_multi_aff *ma); + +__isl_give isl_set *isl_set_from_multi_aff(__isl_take isl_multi_aff *ma); + +__isl_give isl_mat *isl_basic_set_reduced_basis(__isl_keep isl_basic_set *bset); + +__isl_give isl_basic_set *isl_basic_set_coefficients( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_set_list *isl_basic_set_list_coefficients( + __isl_take isl_basic_set_list *list); +__isl_give isl_basic_set *isl_set_coefficients(__isl_take isl_set *set); +__isl_give isl_basic_set *isl_basic_set_solutions( + __isl_take isl_basic_set *bset); +__isl_give isl_basic_set *isl_set_solutions(__isl_take isl_set *set); + +__isl_give isl_pw_aff *isl_set_dim_max(__isl_take isl_set *set, int pos); +__isl_give isl_pw_aff *isl_set_dim_min(__isl_take isl_set *set, int pos); + +__isl_give char *isl_basic_set_to_str(__isl_keep isl_basic_set *bset); +__isl_give char *isl_set_to_str(__isl_keep isl_set *set); diff --git a/preproc-headers/f5e918ac8556215393136c8e294bd4b6c81edee5edf110c389374a60bcc6be72 b/preproc-headers/f5e918ac8556215393136c8e294bd4b6c81edee5edf110c389374a60bcc6be72 new file mode 100644 index 0000000..8a036a9 --- /dev/null +++ b/preproc-headers/f5e918ac8556215393136c8e294bd4b6c81edee5edf110c389374a60bcc6be72 @@ -0,0 +1,31 @@ + + + +#include +#include + + + + + +struct __isl_subclass(isl_map) isl_basic_map; +typedef struct isl_basic_map isl_basic_map; +struct isl_basic_map; struct isl_basic_map_list; typedef struct isl_basic_map_list isl_basic_map_list; +struct __isl_subclass(isl_union_map) isl_map; +typedef struct isl_map isl_map; +struct isl_map; struct isl_map_list; typedef struct isl_map_list isl_map_list; + + +struct __isl_subclass(isl_set) isl_basic_set; +typedef struct isl_basic_set isl_basic_set; +struct isl_basic_set; struct isl_basic_set_list; typedef struct isl_basic_set_list isl_basic_set_list; + + + +struct __isl_subclass(isl_union_set) isl_set; +typedef struct isl_set isl_set; +struct isl_set; struct isl_set_list; typedef struct isl_set_list isl_set_list; + + +isl_ctx *isl_basic_set_list_get_ctx(__isl_keep isl_basic_set_list *list); __isl_give isl_basic_set_list *isl_basic_set_list_from_basic_set( __isl_take isl_basic_set *el); __isl_give isl_basic_set_list *isl_basic_set_list_alloc(isl_ctx *ctx, int n); __isl_give isl_basic_set_list *isl_basic_set_list_copy( __isl_keep isl_basic_set_list *list); __isl_null isl_basic_set_list *isl_basic_set_list_free( __isl_take isl_basic_set_list *list); __isl_give isl_basic_set_list *isl_basic_set_list_add( __isl_take isl_basic_set_list *list, __isl_take isl_basic_set *el); __isl_give isl_basic_set_list *isl_basic_set_list_insert( __isl_take isl_basic_set_list *list, unsigned pos, __isl_take struct isl_basic_set *el); __isl_give isl_basic_set_list *isl_basic_set_list_drop( __isl_take isl_basic_set_list *list, unsigned first, unsigned n); __isl_give isl_basic_set_list *isl_basic_set_list_clear( __isl_take isl_basic_set_list *list); __isl_give isl_basic_set_list *isl_basic_set_list_swap( __isl_take isl_basic_set_list *list, unsigned pos1, unsigned pos2); __isl_give isl_basic_set_list *isl_basic_set_list_reverse( __isl_take isl_basic_set_list *list); __isl_give isl_basic_set_list *isl_basic_set_list_concat( __isl_take isl_basic_set_list *list1, __isl_take isl_basic_set_list *list2); isl_size isl_basic_set_list_size(__isl_keep isl_basic_set_list *list); isl_size isl_basic_set_list_n_basic_set(__isl_keep isl_basic_set_list *list); __isl_give isl_basic_set *isl_basic_set_list_get_at( __isl_keep isl_basic_set_list *list, int index); __isl_give struct isl_basic_set *isl_basic_set_list_get_basic_set( __isl_keep isl_basic_set_list *list, int index); __isl_give struct isl_basic_set_list *isl_basic_set_list_set_basic_set( __isl_take struct isl_basic_set_list *list, int index, __isl_take struct isl_basic_set *el); isl_stat isl_basic_set_list_foreach(__isl_keep isl_basic_set_list *list, isl_stat (*fn)(__isl_take isl_basic_set *el, void *user), void *user); __isl_give isl_basic_set_list *isl_basic_set_list_map( __isl_take isl_basic_set_list *list, __isl_give isl_basic_set * (*fn)(__isl_take isl_basic_set *el, void *user), void *user); __isl_give isl_basic_set_list *isl_basic_set_list_sort( __isl_take isl_basic_set_list *list, int (*cmp)(__isl_keep struct isl_basic_set *a, __isl_keep struct isl_basic_set *b, void *user), void *user); isl_stat isl_basic_set_list_foreach_scc(__isl_keep isl_basic_set_list *list, isl_bool (*follows)(__isl_keep struct isl_basic_set *a, __isl_keep struct isl_basic_set *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_basic_set_list *scc, void *user), void *fn_user); __isl_give char *isl_basic_set_list_to_str( __isl_keep isl_basic_set_list *list); __isl_give isl_printer *isl_printer_print_basic_set_list( __isl_take isl_printer *p, __isl_keep isl_basic_set_list *list); void isl_basic_set_list_dump(__isl_keep isl_basic_set_list *list); +isl_ctx *isl_set_list_get_ctx(__isl_keep isl_set_list *list); __isl_give isl_set_list *isl_set_list_from_set( __isl_take isl_set *el); __isl_give isl_set_list *isl_set_list_alloc(isl_ctx *ctx, int n); __isl_give isl_set_list *isl_set_list_copy( __isl_keep isl_set_list *list); __isl_null isl_set_list *isl_set_list_free( __isl_take isl_set_list *list); __isl_give isl_set_list *isl_set_list_add( __isl_take isl_set_list *list, __isl_take isl_set *el); __isl_give isl_set_list *isl_set_list_insert( __isl_take isl_set_list *list, unsigned pos, __isl_take struct isl_set *el); __isl_give isl_set_list *isl_set_list_drop( __isl_take isl_set_list *list, unsigned first, unsigned n); __isl_give isl_set_list *isl_set_list_clear( __isl_take isl_set_list *list); __isl_give isl_set_list *isl_set_list_swap( __isl_take isl_set_list *list, unsigned pos1, unsigned pos2); __isl_give isl_set_list *isl_set_list_reverse( __isl_take isl_set_list *list); __isl_give isl_set_list *isl_set_list_concat( __isl_take isl_set_list *list1, __isl_take isl_set_list *list2); isl_size isl_set_list_size(__isl_keep isl_set_list *list); isl_size isl_set_list_n_set(__isl_keep isl_set_list *list); __isl_give isl_set *isl_set_list_get_at( __isl_keep isl_set_list *list, int index); __isl_give struct isl_set *isl_set_list_get_set( __isl_keep isl_set_list *list, int index); __isl_give struct isl_set_list *isl_set_list_set_set( __isl_take struct isl_set_list *list, int index, __isl_take struct isl_set *el); isl_stat isl_set_list_foreach(__isl_keep isl_set_list *list, isl_stat (*fn)(__isl_take isl_set *el, void *user), void *user); __isl_give isl_set_list *isl_set_list_map( __isl_take isl_set_list *list, __isl_give isl_set * (*fn)(__isl_take isl_set *el, void *user), void *user); __isl_give isl_set_list *isl_set_list_sort( __isl_take isl_set_list *list, int (*cmp)(__isl_keep struct isl_set *a, __isl_keep struct isl_set *b, void *user), void *user); isl_stat isl_set_list_foreach_scc(__isl_keep isl_set_list *list, isl_bool (*follows)(__isl_keep struct isl_set *a, __isl_keep struct isl_set *b, void *user), void *follows_user, isl_stat (*fn)(__isl_take isl_set_list *scc, void *user), void *fn_user); __isl_give char *isl_set_list_to_str( __isl_keep isl_set_list *list); __isl_give isl_printer *isl_printer_print_set_list( __isl_take isl_printer *p, __isl_keep isl_set_list *list); void isl_set_list_dump(__isl_keep isl_set_list *list); diff --git a/regenerate-isl-declaration-macros-expanded.sh b/regenerate-isl-declaration-macros-expanded.sh deleted file mode 100755 index 84492a9..0000000 --- a/regenerate-isl-declaration-macros-expanded.sh +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/bash - -set -e -set -x - -INCLUDEPATH=isl/include -OUTFILE=isl_declaration_macros_expanded.h -DEFINES="-DISLPY_ISL_VERSION=15" - -#INCLUDEPATH=$HOME/pool/include -#OUTFILE=isl_declaration_macros_expanded_v14.h -#DEFINES="-DISLPY_ISL_VERSION=14" - -cc -E $DEFINES -I$INCLUDEPATH -Iisl-supplementary \ - -imacros $INCLUDEPATH/isl/list.h \ - -imacros $INCLUDEPATH/isl/multi.h \ - -o $OUTFILE \ - isl_declaration_macros.h - -sed -i s/__islpy_/__isl_/g isl_declaration_macros_expanded.h diff --git a/setup.cfg b/setup.cfg index 6faef2e..5129242 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,3 @@ [flake8] -ignore = E126,E127,E128,E123,E226,E241,E242,E265 +ignore = E126,E127,E128,E123,E226,E241,E242,E265,W503,E402 max-line-length=85 diff --git a/setup.py b/setup.py index 4ce9aa8..6c30453 100644 --- a/setup.py +++ b/setup.py @@ -1,18 +1,48 @@ #!/usr/bin/env python +__copyright__ = """ +Copyright (C) 2011-20 Andreas Kloeckner +""" + +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + def get_config_schema(): - from aksetup_helper import ConfigSchema, \ - IncludeDir, LibraryDir, Libraries, BoostLibraries, \ - Switch, StringListOption, make_boost_base_options + from aksetup_helper import (ConfigSchema, + IncludeDir, LibraryDir, Libraries, + Switch, StringListOption) - return ConfigSchema(make_boost_base_options() + [ - BoostLibraries("python"), + default_cxxflags = [ + # Required for pybind11: + # https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes + "-fvisibility=hidden" + ] - Switch("USE_SHIPPED_BOOST", True, "Use included Boost library"), + return ConfigSchema([ Switch("USE_SHIPPED_ISL", True, "Use included copy of isl"), Switch("USE_SHIPPED_IMATH", True, "Use included copy of imath in isl"), + Switch("USE_GMP", True, "Use gmp in external isl"), Switch("USE_BARVINOK", False, "Include wrapper for Barvinok"), + Switch("USE_IMATH_SIO", False, "When using imath, use small-integer " + "optimization"), IncludeDir("GMP", []), LibraryDir("GMP", []), @@ -26,7 +56,7 @@ def get_config_schema(): LibraryDir("BARVINOK", []), Libraries("BARVINOK", ["barvinok", "polylibgmp"]), - StringListOption("CXXFLAGS", [], + StringListOption("CXXFLAGS", default_cxxflags, help="Any extra C++ compiler options to include"), StringListOption("LDFLAGS", [], help="Any extra linker options to include"), @@ -35,36 +65,62 @@ def get_config_schema(): def main(): from aksetup_helper import (hack_distutils, - get_config, setup, Extension, - set_up_shipped_boost_if_requested, - check_git_submodules) + check_pybind11, get_pybind_include, + get_config, setup, check_git_submodules, Extension, + PybindBuildExtCommand) + check_pybind11() check_git_submodules() hack_distutils(what_opt=None) conf = get_config(get_config_schema(), warn_about_no_config=False) - EXTRA_OBJECTS, EXTRA_DEFINES = set_up_shipped_boost_if_requested("islpy", conf) + CXXFLAGS = conf["CXXFLAGS"] # noqa: N806 + + EXTRA_OBJECTS = [] # noqa: N806 + EXTRA_DEFINES = {} # noqa: N806 - INCLUDE_DIRS = conf["BOOST_INC_DIR"] + ["src/wrapper"] - LIBRARY_DIRS = conf["BOOST_LIB_DIR"] - LIBRARIES = conf["BOOST_PYTHON_LIBNAME"] + INCLUDE_DIRS = ["src/wrapper"] # noqa: N806 + LIBRARY_DIRS = [] # noqa: N806 + LIBRARIES = [] # noqa: N806 if conf["USE_SHIPPED_ISL"]: from glob import glob - ISL_BLACKLIST = [ - "_templ.c", "mp_get", + isl_blacklist = [ + "_templ.c", + "_templ_yaml.c", + "mp_get", + "extract_key.c", "isl_multi_templ.c", "isl_multi_apply_set.c", "isl_multi_gist.c", + "isl_multi_coalesce.c", "isl_multi_intersect.c", "isl_multi_floor.c", "isl_multi_apply_union_set.c", + "isl_multi_cmp.c", + "isl_multi_pw_aff_explicit_domain.c", + "isl_multi_hash.c", + "isl_multi_dims.c", + "isl_multi_explicit_domain.c", + "isl_multi_no_explicit_domain.c", + "isl_multi_align_set.c", + "isl_multi_align_union_set.c", + "isl_multi_union_pw_aff_explicit_domain.c", + "isl_union_templ.c", + "isl_union_multi.c", + "isl_union_eval.c", + "isl_union_neg.c", + "isl_union_single.c", + "isl_pw_hash.c", + "isl_pw_eval.c", + "isl_pw_union_opt.c", + "isl_pw_union_opt.c", ] for fn in glob("isl/*.c"): blacklisted = False - for bl in ISL_BLACKLIST: + for bl in isl_blacklist: if bl in fn: blacklisted = True break @@ -80,10 +136,16 @@ def main(): if "imath" in fn: if not conf["USE_SHIPPED_IMATH"]: continue + + if "sioimath" in fn and not conf["USE_IMATH_SIO"]: + continue + if "isl_val_imath" in fn and conf["USE_IMATH_SIO"]: + continue + if "isl_ast_int.c" in fn and conf["USE_SHIPPED_IMATH"]: continue - inf = open(fn, "rt") + inf = open(fn, "r", encoding="utf-8") try: contents = inf.read() finally: @@ -99,11 +161,17 @@ def main(): "isl/imath/imath.c", "isl/imath/imrat.c", "isl/imath/gmp_compat.c", - "isl/imath_wrap/imath.c", - "isl/imath_wrap/imrat.c", - "isl/imath_wrap/gmp_compat.c", + #"isl/imath_wrap/imath.c", + #"isl/imath_wrap/imrat.c", + #"isl/imath_wrap/gmp_compat.c", ]) EXTRA_DEFINES["USE_IMATH_FOR_MP"] = 1 + if conf["USE_IMATH_SIO"]: + EXTRA_DEFINES["USE_SMALL_INT_OPT"] = 1 + + import sys + if sys.platform in ['linux', 'linux2', 'darwin']: + CXXFLAGS.insert(0, "-std=gnu99") conf["ISL_INC_DIR"].append("isl/imath") else: @@ -138,22 +206,28 @@ def main(): INCLUDE_DIRS.extend(conf["ISL_INC_DIR"]) - if not (conf["USE_SHIPPED_ISL"] and conf["USE_SHIPPED_IMATH"]): + if not (conf["USE_SHIPPED_ISL"] and conf["USE_SHIPPED_IMATH"]) and \ + conf["USE_GMP"]: INCLUDE_DIRS.extend(conf["GMP_INC_DIR"]) LIBRARY_DIRS.extend(conf["GMP_LIB_DIR"]) LIBRARIES.extend(conf["GMP_LIBNAME"]) init_filename = "islpy/version.py" - exec(compile(open(init_filename, "r").read(), init_filename, "exec"), conf) + with open(init_filename, "r") as version_f: + version_py = version_f.read() + exec(compile(version_py, init_filename, "exec"), conf) from gen_wrap import gen_wrapper gen_wrapper(wrapper_dirs, include_barvinok=conf["USE_BARVINOK"], isl_version=EXTRA_DEFINES.get("ISLPY_ISL_VERSION")) + with open("README.rst", "rt") as readme_f: + readme = readme_f.read() + setup(name="islpy", version=conf["VERSION_TEXT"], description="Wrapper around isl, an integer set library", - long_description=open("README.rst", "rt").read(), + long_description=readme, author="Andreas Kloeckner", author_email="inform@tiker.net", license="MIT", @@ -167,12 +241,7 @@ def main(): 'Natural Language :: English', 'Programming Language :: C++', 'Programming Language :: Python', - 'Programming Language :: Python :: 2.5', - 'Programming Language :: Python :: 2.6', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.2', - 'Programming Language :: Python :: 3.3', 'Topic :: Multimedia :: Graphics :: 3D Modeling', 'Topic :: Scientific/Engineering', 'Topic :: Scientific/Engineering :: Mathematics', @@ -183,6 +252,10 @@ def main(): packages=["islpy"], + python_requires="~=3.6", + setup_requires=[ + "pybind11", + ], install_requires=[ "pytest>=2", # "Mako>=0.3.6", @@ -197,14 +270,19 @@ def main(): "src/wrapper/wrap_isl_part2.cpp", "src/wrapper/wrap_isl_part3.cpp", ] + EXTRA_OBJECTS, - include_dirs=INCLUDE_DIRS, + include_dirs=INCLUDE_DIRS + [ + get_pybind_include(), + get_pybind_include(user=True) + ], library_dirs=LIBRARY_DIRS, libraries=LIBRARIES, define_macros=list(EXTRA_DEFINES.items()), - extra_compile_args=conf["CXXFLAGS"], + extra_compile_args=CXXFLAGS, extra_link_args=conf["LDFLAGS"], ), - ]) + ], + cmdclass={'build_ext': PybindBuildExtCommand}, + ) if __name__ == '__main__': diff --git a/src/wrapper/wrap_helpers.hpp b/src/wrapper/wrap_helpers.hpp index 083bc3a..bbdd141 100644 --- a/src/wrapper/wrap_helpers.hpp +++ b/src/wrapper/wrap_helpers.hpp @@ -3,32 +3,17 @@ - -#include -#include -#include - - - - -namespace py = boost::python; - - - - -#if (BOOST_VERSION/100) < 1035 -#warning ******************************************************************* -#warning **** Your version of Boost C++ is likely too old for islpy. **** -#warning ******************************************************************* -#endif +#include +#include +namespace py = pybind11; #define PYTHON_ERROR(TYPE, REASON) \ { \ PyErr_SetString(PyExc_##TYPE, REASON); \ - throw boost::python::error_already_set(); \ + throw pybind11::error_already_set(); \ } #define ENUM_VALUE(PREFIX, NAME) \ @@ -38,13 +23,13 @@ namespace py = boost::python; def(#NAME, &cls::NAME) #define DEF_SIMPLE_METHOD_WITH_ARGS(NAME, ARGS) \ - def(#NAME, &cls::NAME, boost::python::args ARGS) + def(#NAME, &cls::NAME, pybind11::args ARGS) #define DEF_SIMPLE_FUNCTION(NAME) \ - boost::python::def(#NAME, &NAME) + pybind11::def(#NAME, &NAME) #define DEF_SIMPLE_FUNCTION_WITH_ARGS(NAME, ARGS) \ - boost::python::def(#NAME, &NAME, boost::python::args ARGS) + pybind11::def(#NAME, &NAME, pybind11::args ARGS) #define DEF_SIMPLE_RO_MEMBER(NAME) \ def_readonly(#NAME, &cls::NAME) @@ -52,25 +37,12 @@ namespace py = boost::python; #define DEF_SIMPLE_RW_MEMBER(NAME) \ def_readwrite(#NAME, &cls::NAME) -#define PYTHON_FOREACH(NAME, ITERABLE) \ - BOOST_FOREACH(boost::python::object NAME, \ - std::make_pair( \ - boost::python::stl_input_iterator(ITERABLE), \ - boost::python::stl_input_iterator())) - -#define COPY_PY_LIST(TYPE, NAME) \ - std::copy( \ - boost::python::stl_input_iterator(py_##NAME), \ - boost::python::stl_input_iterator(), \ - std::back_inserter(NAME)); - namespace { template - inline boost::python::handle<> handle_from_new_ptr(T *ptr) + inline pybind11::object handle_from_new_ptr(T *ptr) { - return boost::python::handle<>( - typename boost::python::manage_new_object::apply::type()(ptr)); + return py::cast(ptr, py::return_value_policy::take_ownership); } } diff --git a/src/wrapper/wrap_isl.cpp b/src/wrapper/wrap_isl.cpp index fbea3ee..ab53ee8 100644 --- a/src/wrapper/wrap_isl.cpp +++ b/src/wrapper/wrap_isl.cpp @@ -1,8 +1,8 @@ #include "wrap_isl.hpp" -void islpy_expose_part1(); -void islpy_expose_part2(); -void islpy_expose_part3(); +void islpy_expose_part1(py::module &m); +void islpy_expose_part2(py::module &m); +void islpy_expose_part3(py::module &m); namespace isl { @@ -10,31 +10,29 @@ namespace isl } - -namespace -{ - py::handle<> ISLError; - - void translate_isl_error(const isl::error &err) - { - PyErr_SetObject(ISLError.get(), py::object(err.what()).ptr()); - } -} - - - -BOOST_PYTHON_MODULE(_isl) +PYBIND11_MODULE(_isl, m) { - ISLError = py::handle<>(PyErr_NewException("islpy.Error", PyExc_RuntimeError, NULL)); - py::scope().attr("Error") = ISLError; - py::register_exception_translator(translate_isl_error); - - py::docstring_options doc_opt(true, false, false); + static py::exception ISLError(m, "Error", NULL); + py::register_exception_translator( + [](std::exception_ptr p) + { + try + { + if (p) std::rethrow_exception(p); + } + catch (isl::error &err) + { + py::object err_obj = py::cast(err); + PyErr_SetObject(ISLError.ptr(), err_obj.ptr()); + } + }); + + // py::docstring_options doc_opt(true, false, false); /* { typedef isl_options cls; - py::class_("Options") + py::class_(m, "Options") .DEF_SIMPLE_RW_MEMBER(lp_solver) .DEF_SIMPLE_RW_MEMBER(ilp_solver) .DEF_SIMPLE_RW_MEMBER(pip) @@ -55,7 +53,7 @@ BOOST_PYTHON_MODULE(_isl) */ #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) - py::enum_("error") + py::enum_(m, "error") .ENUM_VALUE(isl_error_, none) .ENUM_VALUE(isl_error_, abort) .ENUM_VALUE(isl_error_, unknown) @@ -64,13 +62,13 @@ BOOST_PYTHON_MODULE(_isl) .ENUM_VALUE(isl_error_, unsupported) ; - py::enum_("stat") + py::enum_(m, "stat") .ENUM_VALUE(isl_stat_, error) .ENUM_VALUE(isl_stat_, ok) ; #endif - py::enum_("dim_type") + py::enum_(m, "dim_type") .ENUM_VALUE(isl_dim_, cst) .ENUM_VALUE(isl_dim_, param) .value("in_", isl_dim_in) @@ -80,13 +78,13 @@ BOOST_PYTHON_MODULE(_isl) .ENUM_VALUE(isl_dim_, all) ; - py::enum_("fold") + py::enum_(m, "fold") .ENUM_VALUE(isl_fold_, min) .ENUM_VALUE(isl_fold_, max) .ENUM_VALUE(isl_fold_, list) ; - py::enum_("ast_op_type") + py::enum_(m, "ast_op_type") .ENUM_VALUE(isl_ast_op_, error) .ENUM_VALUE(isl_ast_op_, and) .ENUM_VALUE(isl_ast_op_, and_then) @@ -114,14 +112,14 @@ BOOST_PYTHON_MODULE(_isl) .ENUM_VALUE(isl_ast_op_, member) ; - py::enum_("ast_expr_type") + py::enum_(m, "ast_expr_type") .ENUM_VALUE(isl_ast_expr_, error) .ENUM_VALUE(isl_ast_expr_, op) .ENUM_VALUE(isl_ast_expr_, id) .ENUM_VALUE(isl_ast_expr_, int) ; - py::enum_("ast_node_type") + py::enum_(m, "ast_node_type") .ENUM_VALUE(isl_ast_node_, error) .ENUM_VALUE(isl_ast_node_, for) .ENUM_VALUE(isl_ast_node_, if) @@ -130,7 +128,7 @@ BOOST_PYTHON_MODULE(_isl) ; #define FORMAT_ATTR(name) cls_format.attr(#name) = ISL_FORMAT_##name - py::class_ cls_format("format", py::no_init); + py::class_ cls_format(m, "format"); FORMAT_ATTR(ISL); FORMAT_ATTR(POLYLIB); FORMAT_ATTR(POLYLIB_CONSTRAINTS); @@ -139,9 +137,9 @@ BOOST_PYTHON_MODULE(_isl) FORMAT_ATTR(LATEX); FORMAT_ATTR(EXT_POLYLIB); - islpy_expose_part1(); - islpy_expose_part2(); - islpy_expose_part3(); + islpy_expose_part1(m); + islpy_expose_part2(m); + islpy_expose_part3(m); py::implicitly_convertible(); py::implicitly_convertible(); diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index e852589..311c9c2 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -1,5 +1,6 @@ #include "wrap_helpers.hpp" #include +#include #include #include #include @@ -13,8 +14,8 @@ #include #include #include +#include #include -#include #include #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) #include @@ -28,15 +29,15 @@ #include #endif +#include #include -#include -#include +#include // TODO: flow.h // TODO: better error reporting -namespace py = boost::python; +namespace py = pybind11; namespace isl { @@ -50,7 +51,7 @@ namespace isl struct ctx; - typedef boost::unordered_map ctx_use_map_t; + typedef std::unordered_map ctx_use_map_t; extern ctx_use_map_t ctx_use_map; inline void deref_ctx(isl_ctx *ctx) @@ -144,31 +145,26 @@ namespace isl WRAP_CLASS(multi_val); WRAP_CLASS(vec); WRAP_CLASS(mat); - WRAP_CLASS(id); + WRAP_CLASS(fixed_box); WRAP_CLASS(aff); - struct pw_aff { WRAP_CLASS_CONTENT(pw_aff); MAKE_CAST_CTOR(pw_aff, aff, isl_pw_aff_from_aff); }; - -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(union_pw_aff); -#endif - WRAP_CLASS(multi_aff); WRAP_CLASS(multi_pw_aff); WRAP_CLASS(pw_multi_aff); WRAP_CLASS(union_pw_multi_aff); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(multi_union_pw_aff); -#endif + + WRAP_CLASS(id); + WRAP_CLASS(multi_id); WRAP_CLASS(constraint); WRAP_CLASS(space); - struct local_space { WRAP_CLASS_CONTENT(local_space); @@ -205,6 +201,7 @@ namespace isl WRAP_CLASS(vertex); WRAP_CLASS(cell); WRAP_CLASS(vertices); + WRAP_CLASS(stride_info); WRAP_CLASS(qpolynomial); WRAP_CLASS(pw_qpolynomial); @@ -214,34 +211,31 @@ namespace isl WRAP_CLASS(union_pw_qpolynomial_fold); WRAP_CLASS(term); - // matches order in isl_declaration_macros.h + // matches order in gen_wrap.py WRAP_CLASS(id_list); - WRAP_CLASS(val_list); - WRAP_CLASS(aff_list); - WRAP_CLASS(pw_aff_list); - WRAP_CLASS(constraint_list); - WRAP_CLASS(basic_set_list); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(basic_map_list); -#endif WRAP_CLASS(set_list); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(map_list); WRAP_CLASS(union_set_list); -#endif - + WRAP_CLASS(constraint_list); + WRAP_CLASS(aff_list); + WRAP_CLASS(pw_aff_list); + WRAP_CLASS(pw_multi_aff_list); WRAP_CLASS(ast_expr_list); WRAP_CLASS(ast_node_list); - WRAP_CLASS(band_list); + WRAP_CLASS(pw_qpolynomial_list); + WRAP_CLASS(pw_qpolynomial_fold_list); + WRAP_CLASS(union_pw_aff_list); + WRAP_CLASS(union_pw_multi_aff_list); + WRAP_CLASS(union_map_list); // end match WRAP_CLASS(id_to_ast_expr); - WRAP_CLASS(band); WRAP_CLASS(schedule); WRAP_CLASS(schedule_constraints); #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) @@ -261,23 +255,6 @@ namespace isl WRAP_CLASS(ast_build); WRAP_CLASS(ast_print_options); - inline ctx *alloc_ctx() - { - isl_ctx *result = isl_ctx_alloc(); - if (result) - { - try - { return new ctx(result); } - catch (...) - { - isl_ctx_free(result); - throw; - } - } - else - PYTHON_ERROR(RuntimeError, "failed to create context"); - } - class format { }; inline void my_decref(void *user) @@ -291,7 +268,7 @@ namespace isl #define MAKE_WRAP(name, py_name) \ - py::class_ wrap_##name(#py_name, py::no_init); \ + py::class_ wrap_##name(m, #py_name); \ wrap_##name.def("is_valid", &isl::name::is_valid, "Return whether current object is still valid."); \ wrap_##name.attr("_base_name") = #name; \ wrap_##name.attr("_isl_name") = "isl_"#name; diff --git a/src/wrapper/wrap_isl_part1.cpp b/src/wrapper/wrap_isl_part1.cpp index 0181aaf..c667941 100644 --- a/src/wrapper/wrap_isl_part1.cpp +++ b/src/wrapper/wrap_isl_part1.cpp @@ -20,20 +20,36 @@ namespace islpy } } -void islpy_expose_part1() +void islpy_expose_part1(py::module &m) { { typedef isl::ctx cls; - py::class_, boost::noncopyable> - wrap_ctx("Context", py::no_init); - wrap_ctx.def("__init__", py::make_constructor(isl::alloc_ctx)); + py::class_ > + wrap_ctx(m, "Context"); + wrap_ctx.def(py::init( + []() + { + isl_ctx *result = isl_ctx_alloc(); + if (result) + { + try + { return new isl::ctx(result); } + catch (...) + { + isl_ctx_free(result); + throw; + } + } + else + PYTHON_ERROR(RuntimeError, "failed to create context"); + })); wrap_ctx.attr("_base_name") = "ctx"; wrap_ctx.attr("_isl_name") = "isl_ctx"; } #define CONST(NAME) cls.attr(#NAME) = ISL_##NAME { - py::class_ cls("constants", py::no_init); + py::class_ cls(m, "constants"); CONST(BOUND_BERNSTEIN); CONST(BOUND_RANGE); CONST(ON_ERROR_WARN); @@ -46,24 +62,23 @@ void islpy_expose_part1() // {{{ lists MAKE_WRAP(id_list, IdList); - MAKE_WRAP(val_list, ValList); - MAKE_WRAP(aff_list, AffList); - MAKE_WRAP(pw_aff_list, PwAffList); - MAKE_WRAP(basic_set_list, BasicSetList); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(basic_map_list, BasicMapList); -#endif MAKE_WRAP(set_list, SetList); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(map_list, MapList); MAKE_WRAP(union_set_list, UnionSetList); -#endif - + MAKE_WRAP(constraint_list, ConstraintList); + MAKE_WRAP(aff_list, AffList); + MAKE_WRAP(pw_aff_list, PwAffList); + MAKE_WRAP(pw_multi_aff_list, PwMultiAffList); MAKE_WRAP(ast_expr_list, AstExprList); MAKE_WRAP(ast_node_list, AstNodeList); - MAKE_WRAP(band_list, BandList); + MAKE_WRAP(pw_qpolynomial_list, PwQPolynomialList); + MAKE_WRAP(pw_qpolynomial_fold_list, PwQPolynomialFoldList); + MAKE_WRAP(union_pw_aff_list, UnionPwAffList); + MAKE_WRAP(union_pw_multi_aff_list, UnionPwMultiAffList); + MAKE_WRAP(union_map_list, UnionMapList); // }}} @@ -79,42 +94,44 @@ void islpy_expose_part1() MAKE_WRAP(multi_val, MultiVal); MAKE_WRAP(vec, Vec); MAKE_WRAP(mat, Mat); + MAKE_WRAP(fixed_box, FixedBox); MAKE_WRAP(aff, Aff); - wrap_aff.enable_pickling(); + // wrap_aff.enable_pickling(); MAKE_WRAP(pw_aff, PwAff); - wrap_pw_aff.enable_pickling(); + // wrap_pw_aff.enable_pickling(); #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(union_pw_aff, UnionPwAff); - wrap_union_pw_aff.enable_pickling(); + // wrap_union_pw_aff.enable_pickling(); #endif + MAKE_WRAP(multi_id, MultiId); MAKE_WRAP(multi_aff, MultiAff); - wrap_multi_aff.enable_pickling(); + // wrap_multi_aff.enable_pickling(); MAKE_WRAP(multi_pw_aff, MultiPwAff); - wrap_multi_pw_aff.enable_pickling(); + // wrap_multi_pw_aff.enable_pickling(); MAKE_WRAP(pw_multi_aff, PwMultiAff); - wrap_pw_multi_aff.enable_pickling(); + // wrap_pw_multi_aff.enable_pickling(); MAKE_WRAP(union_pw_multi_aff, UnionPwMultiAff); - wrap_union_pw_multi_aff.enable_pickling(); + // wrap_union_pw_multi_aff.enable_pickling(); #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(multi_union_pw_aff, MultiUnionPwAff); - wrap_multi_union_pw_aff.enable_pickling(); + // wrap_multi_union_pw_aff.enable_pickling(); #endif MAKE_WRAP(id, Id); - wrap_id.def("__eq__", islpy::id_eq, py::args("self", "other"), + wrap_id.def("__eq__", islpy::id_eq, py::arg("other"), "__eq__(self, other)\n\n" ":param self: :class:`Id`\n" ":param other: :class:`Id`\n" ":return: bool "); - wrap_id.def("__ne__", islpy::id_ne, py::args("self", "other"), + wrap_id.def("__ne__", islpy::id_ne, py::arg("other"), "__ne__(self, other)\n\n" ":param self: :class:`Id`\n" ":param other: :class:`Id`\n" ":return: bool "); MAKE_WRAP(constraint, Constraint); - wrap_constraint.enable_pickling(); + // wrap_constraint.enable_pickling(); MAKE_WRAP(space, Space); MAKE_WRAP(local_space, LocalSpace); diff --git a/src/wrapper/wrap_isl_part2.cpp b/src/wrapper/wrap_isl_part2.cpp index 4c8e795..cb3bc0e 100644 --- a/src/wrapper/wrap_isl_part2.cpp +++ b/src/wrapper/wrap_isl_part2.cpp @@ -5,28 +5,29 @@ namespace isl #include "gen-wrap-part2.inc" } -void islpy_expose_part2() +void islpy_expose_part2(py::module &m) { MAKE_WRAP(basic_set, BasicSet); - wrap_basic_set.enable_pickling(); + // wrap_basic_set.enable_pickling(); MAKE_WRAP(basic_map, BasicMap); - wrap_basic_map.enable_pickling(); + // wrap_basic_map.enable_pickling(); MAKE_WRAP(set, Set); - wrap_set.enable_pickling(); + // wrap_set.enable_pickling(); MAKE_WRAP(map, Map); - wrap_map.enable_pickling(); + // wrap_map.enable_pickling(); MAKE_WRAP(union_set, UnionSet); - wrap_union_set.enable_pickling(); + // wrap_union_set.enable_pickling(); MAKE_WRAP(union_map, UnionMap); - wrap_union_map.enable_pickling(); + // wrap_union_map.enable_pickling(); MAKE_WRAP(point, Point); - wrap_point.enable_pickling(); + // wrap_point.enable_pickling(); MAKE_WRAP(vertex, Vertex); - wrap_vertex.enable_pickling(); + // wrap_vertex.enable_pickling(); MAKE_WRAP(cell, Cell); - wrap_cell.enable_pickling(); + // wrap_cell.enable_pickling(); MAKE_WRAP(vertices, Vertices); + MAKE_WRAP(stride_info, StrideInfo); #include "gen-expose-part2.inc" } diff --git a/src/wrapper/wrap_isl_part3.cpp b/src/wrapper/wrap_isl_part3.cpp index db82d44..e04d32e 100644 --- a/src/wrapper/wrap_isl_part3.cpp +++ b/src/wrapper/wrap_isl_part3.cpp @@ -5,7 +5,7 @@ namespace isl #include "gen-wrap-part3.inc" } -void islpy_expose_part3() +void islpy_expose_part3(py::module &m) { MAKE_WRAP(qpolynomial_fold, QPolynomialFold); MAKE_WRAP(pw_qpolynomial_fold, PwQPolynomialFold); @@ -17,7 +17,6 @@ void islpy_expose_part3() MAKE_WRAP(term, Term); - MAKE_WRAP(band, Band); MAKE_WRAP(schedule, Schedule); MAKE_WRAP(schedule_constraints, ScheduleConstraints); #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) diff --git a/test/test_isl.py b/test/test_isl.py index 68fc700..3902ddc 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -1,6 +1,30 @@ +# encoding: utf-8 from __future__ import division, print_function +__copyright__ = "Copyright (C) 2011-15 Andreas Kloeckner" + +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + import islpy as isl +import pytest # noqa def test_basics(): @@ -36,7 +60,7 @@ def test_error_on_invalid_index(): p = my_set.sample_point() try: p.get_coordinate_val(isl.dim_type.set, 99999999) - except RuntimeError: + except isl.Error: pass else: assert False @@ -53,7 +77,7 @@ def test_pwqpoly(): pwqp.foreach_piece(piece_handler) -def test_id_user(): +def no_test_id_user(): ctx = isl.Context() foo = isl.Id("foo", context=ctx) # noqa t = (1, 2) @@ -84,7 +108,8 @@ def test_pickling(): for inst in instances: inst2 = loads(dumps(inst)) - assert inst.plain_is_equal(inst2) + assert inst.space == inst2.space + assert inst.is_equal(inst2) def test_get_id_dict(): @@ -133,10 +158,240 @@ def test_eval_pw_qpolynomial(): pwq.eval_with_dict(dict(n=10)) +def test_schedule(): + schedule = isl.Map("{S[t,i,j] -> [t,i,j]: 0 < t < 20 and 0 < i < j < 100}") + accesses = isl.Map("{S[t,i,j] -> bar[t%2, i+1, j-1]}") + context = isl.Set("{:}") + build = isl.AstBuild.from_context(context) + + def callback(node, build): + schedulemap = build.get_schedule() + accessmap = accesses.apply_domain(schedulemap) + aff = isl.PwMultiAff.from_map(isl.Map.from_union_map(accessmap)) + access = build.call_from_pw_multi_aff(aff) + return isl.AstNode.alloc_user(access) + + build, callback_handle = build.set_at_each_domain(callback) + + ast = build.ast_from_schedule(schedule) + + def cb_print_user(printer, options, node): + print("Callback user called") + printer = printer.print_str("Callback user") + return printer + + def cb_print_for(printer, options, node): + print("Callback for called") + printer = printer.print_str("Callback For") + return printer + + opts = isl.AstPrintOptions.alloc(isl.DEFAULT_CONTEXT) + opts, cb_print_user_handle = opts.set_print_user(cb_print_user) + opts, cb_print_for_handle = opts.set_print_for(cb_print_for) + + printer = isl.Printer.to_str(isl.DEFAULT_CONTEXT) + printer = printer.set_output_format(isl.format.C) + printer.print_str("// Start\n") + printer = ast.print_(printer, opts) + printer.print_str("// End") + + print(printer.get_str()) + + +def test_union_map(): + d = isl.UnionSet("[start, num] -> {S[i,j] : start <= i,j < start + num}") + s = isl.UnionMap("{S[i,j] -> [i,j]}").intersect_domain(d) + aw = isl.UnionMap("{S[i,j] -> B[1024 i + j]}") + aw.compute_flow(aw, aw, s) + + +def test_schedule_dump(): + ctx = isl.Context() + s = isl.UnionSet.read_from_str(ctx, + "{ S_2[i, j, k] : i <= 99 and i >= 0; S_3[i] : " + "i <= 99 and i >= 0; S_0[]; S_1[i] : i <= 99 and i >= 0 }") + cst = isl.ScheduleConstraints.on_domain(s) + schedule = isl.ScheduleConstraints.compute_schedule(cst) + schedule.dump() + + +def test_from_union_map(): + ctx = isl.Context() + m = isl.UnionMap.read_from_str(ctx, + "[m, n] -> { S_0[] -> [0, 0, 0, 0]; S_1[i] -> [i, 1, 0, 0]; S_3[i] -> " + "[1 + i, 3, 0, 0]; S_2[i, j, k] -> [i, 2, j, k] : " + "j <= -1 + m and j >= 0 and k <= -1 + n and k >= 0 }") + + isl.MultiUnionPwAff.from_union_map(m) + + +def test_get_schedule_map(): + ctx = isl.Context() + ss = isl.UnionSet.read_from_str( + ctx, "[m, n] -> { S_2[i, j, k] : " + "j <= -1 + m and j >= 0 and k <= -1 + n and k >= 0 }") + cst1 = isl.ScheduleConstraints.on_domain(ss) + sub_schedule = isl.ScheduleConstraints.compute_schedule(cst1) + sub_schedule.get_map() + + +def test_codegen(): + # courtesy of Marek Pałkowski + + def isl_ast_codegen(S): # noqa: N803 + b = isl.AstBuild.from_context(isl.Set("{:}")) + m = isl.Map.from_domain_and_range(S, S) + m = isl.Map.identity(m.get_space()) + m = isl.Map.from_domain(S) + ast = b.ast_from_schedule(m) + p = isl.Printer.to_str(isl.DEFAULT_CONTEXT) + p = p.set_output_format(isl.format.C) + p.flush() + p = p.print_ast_node(ast) + return p.get_str() + + s = isl.Set("[n,m] -> { [i,j] : 0 <= i <= n and i <= j <= m }") + print(isl_ast_codegen(s)) + + +def test_make_zero_and_vars(): + v = isl.make_zero_and_vars("i,j,k", "n") + + myset = ( + v[0].le_set(v["i"] + v["j"]) + & (v["i"] + v["j"]).lt_set(v["n"]) + & (v[0].le_set(v["i"])) + & (v["i"].le_set(13 + v["n"])) + ) + + print(myset) + + +def test_affs_from_space(): + s = isl.Set("[n] -> {[i,j,k]: 0<=i,j,k " + "{ [i0, i1, i2] : 0 <= i0 < n1 and 0 and 0 <= i2 <= 15 }") + + +def test_lexmin(): + print(isl.Set("""{ [s] : exists a,b,c : + 0 <= a <= 5 and 1 <= b <= 4 and 2 <= c <= 7 and + ((2 <= b and b <= 3) implies (a <= 1 or a >= 3)) and + ((not (c < 5 or b > 3)) implies (a > 2 and c < 3)) and s = a + b + c } + """).lexmin()) + + +def test_align_spaces(): + m1 = isl.BasicMap("[m,n] -> {[i,j,k]->[l,o]:}") + m2 = isl.BasicMap("[m,n] -> {[j,k,l,i]->[o]:}") + + result = isl.align_spaces(m1, m2) + assert result.get_var_dict() == m2.get_var_dict() + + a1 = isl.Aff("[t0, t1, t2] -> { [(32)] }") + a2 = isl.Aff("[t1, t0] -> { [(0)] }") + + with pytest.raises(isl.Error): + a1_aligned = isl.align_spaces(a1, a2) + + a1_aligned = isl.align_spaces(a1, a2, obj_bigger_ok=True) + a2_aligned = isl.align_spaces(a2, a1) + + assert a1_aligned == isl.Aff("[t1, t0, t2] -> { [(32)] }") + assert a2_aligned == isl.Aff("[t1, t0, t2] -> { [(0)] }") + + +def test_pass_numpy_int(): + np = pytest.importorskip("numpy") + + s = isl.BasicMap("{[i,j]: 0<=i,j<15}") + c0 = s.get_constraints()[0] + + c1 = c0.set_constant_val(np.int32(5)) + print(c1) + + +def test_isl_align_two(): + a1 = isl.Aff("[t0, t1, t2] -> { [(32)] }") + a2 = isl.Aff("[t1, t0] -> { [(0)] }") + + a1_aligned, a2_aligned = isl.align_two(a1, a2) + assert a1_aligned == isl.Aff("[t1, t0, t2] -> { [(32)] }") + assert a2_aligned == isl.Aff("[t1, t0, t2] -> { [(0)] }") + + b1 = isl.BasicSet("[n0, n1, n2] -> { [i0, i1] : }") + b2 = isl.BasicSet("[n0, n2, n1, n3] -> { [i1, i0, i2] : }") + + b1_aligned, b2_aligned = isl.align_two(b1, b2) + assert b1_aligned == isl.BasicSet("[n0, n2, n1, n3] -> { [i1, i0, i2] : }") + assert b2_aligned == isl.BasicSet("[n0, n2, n1, n3] -> { [i1, i0, i2] : }") + + +def test_bound(): + print(isl.PwQPolynomial("""[n, m] -> {[i, j] -> i * m + j : + 0 <= i < n and 0 <= j < m}""").bound(isl.fold.min)) + print(isl.PwQPolynomial("""[n, m] -> {[i, j] -> i * m + j : + 0 <= i < n and 0 <= j < m}""").bound(isl.fold.max)) + + +def test_copy_context(): + ctx = isl.Context() + import copy + assert copy.copy(ctx).data != ctx.data + assert copy.copy(ctx).data != isl.DEFAULT_CONTEXT.data + + +def test_ast_node_list_free(): + # from https://github.com/inducer/islpy/issues/21 + # by Cambridge Yang + + ctx = isl.Context() + schedule_map = isl.UnionMap.read_from_str( + ctx, "[N] -> { S0[i] -> [i, 0] : " + "0 <= i < N; S1[i] -> [i, 1] : 0 <= i < N }") + ast_build = isl.AstBuild.from_context(isl.Set.read_from_str(ctx, "[N] -> { : }")) + ast = ast_build.node_from_schedule_map(schedule_map) + + print(ast.to_C_str()) + # Prints below code: + # for (int c0 = 0; c0 < N; c0 += 1) { + # S0(c0); + # S1(c0); + # } + + # we have S0 and S1 in a ast_node_block, which holds "children" of type + # ASTNodeList + body = ast.for_get_body() + assert body.get_type() == isl.ast_node_type.block + + body.block_get_children() + + if __name__ == "__main__": import sys if len(sys.argv) > 1: exec(sys.argv[1]) else: - from py.test.cmdline import main + from pytest import main main([__file__]) -- GitLab From 884aa16e574108d6d5e77cbb44f7a4ce49760f86 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 13:34:35 -0500 Subject: [PATCH 02/41] Bring over doc from new-style islpy --- doc/conf.py | 50 +++--- doc/index.rst | 5 + doc/misc.rst | 18 +- doc/ref_ast.rst | 32 ++++ doc/ref_containers.rst | 50 ++++++ doc/ref_flow.rst | 36 ++++ doc/ref_fundamental.rst | 221 +++++++++++++++++++++++ doc/ref_schedule.rst | 28 +++ doc/reference.rst | 376 ++++------------------------------------ 9 files changed, 443 insertions(+), 373 deletions(-) create mode 100644 doc/ref_ast.rst create mode 100644 doc/ref_containers.rst create mode 100644 doc/ref_flow.rst create mode 100644 doc/ref_fundamental.rst create mode 100644 doc/ref_schedule.rst diff --git a/doc/conf.py b/doc/conf.py index e3c4c57..fe3c96e 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -25,7 +25,7 @@ # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. -extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.pngmath'] +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.imgmath'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -41,7 +41,7 @@ master_doc = 'index' # General information about the project. project = u'islpy' -copyright = u'2011, Andreas Kloeckner' +copyright = u'2011-16, Andreas Kloeckner' # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the @@ -49,7 +49,9 @@ copyright = u'2011, Andreas Kloeckner' # # The short X.Y version. ver_dic = {} -exec(compile(open("../islpy/version.py").read(), "../islpy/version.py", 'exec'), ver_dic) +with open("../islpy/version.py") as vfile: + exec(compile(vfile.read(), "../islpy/version.py", 'exec'), ver_dic) + version = ".".join(str(x) for x in ver_dic["VERSION"]) # The full version, including alpha/beta/rc tags. release = ver_dic["VERSION_TEXT"] @@ -91,31 +93,23 @@ pygments_style = 'sphinx' # -- Options for HTML output --------------------------------------------------- -try: - import sphinx_bootstrap_theme -except: - from warnings import warn - warn("I would like to use the sphinx bootstrap theme, but can't find it.\n" - "'pip install sphinx_bootstrap_theme' to fix.") -else: - # Activate the theme. - html_theme = 'bootstrap' - html_theme_path = sphinx_bootstrap_theme.get_html_theme_path() - - # Theme options are theme-specific and customize the look and feel of a theme - # further. For a list of options available for each theme, see the - # documentation. - html_theme_options = { - "navbar_fixed_top": "true", - "navbar_site_name": "Contents", - 'bootstrap_version': '3', - 'source_link_position': 'footer', +html_theme = "alabaster" + +html_theme_options = { + "extra_nav_links": { + "🚀 Github": "https://github.com/inducer/islpy", + "💾 Download Releases": "https://pypi.python.org/pypi/islpy", } + } -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -#html_theme_options = {} +html_sidebars = { + '**': [ + 'about.html', + 'navigation.html', + 'relations.html', + 'searchbox.html', + ] +} # Add any paths that contain custom themes here, relative to this directory. #html_theme_path = [] @@ -256,7 +250,7 @@ def autodoc_process_signature(app, what, name, obj, options, signature, def autodoc_process_docstring(app, what, name, obj, options, lines): - from inspect import isclass, isroutine, ismethod + from inspect import isclass, isroutine UNDERSCORE_WHITELIST = ["__len__", "__hash__", "__eq__", "__ne__"] if isclass(obj) and obj.__name__[0].isupper(): methods = [nm for nm in dir(obj) @@ -265,7 +259,7 @@ def autodoc_process_docstring(app, what, name, obj, options, lines): def gen_method_string(meth): result = ":meth:`%s`" % meth - if not ismethod(getattr(obj, meth)): + if getattr(obj, "_" + meth + "_is_static", False): result += " (static)" return result diff --git a/doc/index.rst b/doc/index.rst index 13b7756..f40a673 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -62,6 +62,11 @@ an idea. misc reference + ref_fundamental + ref_ast + ref_flow.rst + ref_schedule + ref_containers Indices and tables ------------------ diff --git a/doc/misc.rst b/doc/misc.rst index ab1d9ec..be06a5b 100644 --- a/doc/misc.rst +++ b/doc/misc.rst @@ -86,14 +86,28 @@ See also :ref:`gen-remarks`. User-visible Changes ==================== -Version 2014.3 +Version 2016.2 -------------- - .. note:: This version is currently in development and can be obtained from islpy's version control. +* Update for isl 0.17 +* Add :func:`make_zero_and_vars` + +Version 2016.1.1 +---------------- + +* Add :func:`make_zero_and_vars` +* Do not turn on small-integer optimization by default + (to avoid build trouble on old compilers) + +Version 2016.1 +-------------- + +* Update for isl 0.16 + Version 2014.2.1 ---------------- diff --git a/doc/ref_ast.rst b/doc/ref_ast.rst new file mode 100644 index 0000000..02e5bed --- /dev/null +++ b/doc/ref_ast.rst @@ -0,0 +1,32 @@ +Reference: Abstract Syntax Trees +================================ + +.. currentmodule:: islpy + +.. versionadded:: 2014.1 + +AST Expression +-------------- + +.. autoclass:: AstExpr + :members: + +AST Node +-------- + +.. autoclass:: AstNode + :members: + +AST Build +--------- + +.. autoclass:: AstBuild + :members: + +AST Print Options +----------------- + +.. autoclass:: AstPrintOptions + :members: + + diff --git a/doc/ref_containers.rst b/doc/ref_containers.rst new file mode 100644 index 0000000..71dbef9 --- /dev/null +++ b/doc/ref_containers.rst @@ -0,0 +1,50 @@ +Reference: Containers +===================== + +.. currentmodule:: islpy + +Lists +^^^^^ + +.. autoclass:: IdList + :members: + +.. autoclass:: ValList + :members: + +.. autoclass:: BasicSetList + :members: + +.. autoclass:: BasicMapList + :members: + +.. autoclass:: SetList + :members: + +.. autoclass:: MapList + :members: + +.. autoclass:: UnionSetList + :members: + +.. autoclass:: AffList + :members: + +.. autoclass:: UnionPwAffList + :members: + +.. autoclass:: BandList + :members: + +.. autoclass:: AstExprList + :members: + +.. autoclass:: AstNodeList + :members: + +Dictionaries +^^^^^^^^^^^^ + +.. autoclass:: IdToAstExpr + :members: + diff --git a/doc/ref_flow.rst b/doc/ref_flow.rst new file mode 100644 index 0000000..65ab844 --- /dev/null +++ b/doc/ref_flow.rst @@ -0,0 +1,36 @@ +Dataflow +^^^^^^^^ + +.. currentmodule:: islpy + +Access Info +----------- + +.. autoclass:: AccessInfo + :members: + +Union Access Info +----------------- + +.. autoclass:: UnionAccessInfo + :members: + +Restriction +----------- + +.. autoclass:: Restriction + :members: + +Flow +---- + +.. autoclass:: Flow + :members: + +Union Flow +---------- + +.. autoclass:: UnionFlow + :members: + + diff --git a/doc/ref_fundamental.rst b/doc/ref_fundamental.rst new file mode 100644 index 0000000..f4e59e7 --- /dev/null +++ b/doc/ref_fundamental.rst @@ -0,0 +1,221 @@ +Reference: Basic Building Blocks +================================ + +.. currentmodule:: islpy + +Context +------- + +.. autoclass:: Context() + :members: + +Id +-- + +.. autoclass:: Id + :members: + +Space +----- + +(formerly called :class:`Dim`. A compatibility alias is in place.) + +.. autoclass:: Space + :members: + +Local Space +----------- + +.. autoclass:: LocalSpace + :members: + +Constraints +----------- + +.. autoclass:: Constraint + :members: + +Value +----- + +.. autoclass:: Val + :members: + +Multi-Value +----------- + +.. autoclass:: MultiVal + :members: + +Vector +------ + +.. autoclass:: Vec + :members: + +Matrix +------ + +.. autoclass:: Mat + :members: + +Sets and Maps +^^^^^^^^^^^^^ + +Basic Set +--------- + +.. autoclass:: BasicSet + :members: + +Basic Map +--------- + +.. autoclass:: BasicMap + :members: + +Set +--- + +.. autoclass:: Set + :members: + +Map +--- + +.. autoclass:: Map + :members: + +Union Set +--------- + +.. autoclass:: UnionSet + :members: + +Union Map +--------- + +.. autoclass:: UnionMap + :members: + +Geometric Entities +^^^^^^^^^^^^^^^^^^ + +Point +----- + +.. autoclass:: Point + :members: + +Vertex +------ + +.. autoclass:: Vertex + :members: + +Vertices +-------- + +.. autoclass:: Vertices + :members: + +Cell +---- + +.. autoclass:: Cell + :members: + +Quasi-Affine Expressions +^^^^^^^^^^^^^^^^^^^^^^^^ + +Quasi-Affine Expression +----------------------- + +.. autoclass:: Aff + :members: + +Piecewise Quasi-Affine Expression +--------------------------------- + +.. autoclass:: PwAff + :members: + +Union of Piecewise Quasi-Affine Expressions +------------------------------------------- + +.. autoclass:: UnionPwAff + :members: + +Multiple Union of Piecewise Quasi-Affine Expressions +---------------------------------------------------- + +.. autoclass:: MultiUnionPwAff + :members: + + +Multiple Affine Expressions +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Multiple Affine Expression +-------------------------- + +.. autoclass:: MultiAff + :members: + +Piecewise Multiple Affine Expression +------------------------------------ + +.. autoclass:: PwMultiAff + :members: + +Union of Piecewise Multiple Affine Expressions +---------------------------------------------- + +.. autoclass:: UnionPwMultiAff + :members: + +Quasipolynomials +^^^^^^^^^^^^^^^^ + +Term +---- + +.. autoclass:: Term + :members: + +QPolynomial +----------- + +.. autoclass:: QPolynomial + :members: + +PwQPolynomial +------------- + +.. autoclass:: PwQPolynomial + :members: + +UnionPwQPolynomial +------------------ + +.. autoclass:: UnionPwQPolynomial + :members: + +QPolynomialFold +--------------- + +.. autoclass:: QPolynomialFold + :members: + +PwQPolynomial +------------- + +.. autoclass:: PwQPolynomialFold + :members: + +UnionPwQPolynomialFold +---------------------- + +.. autoclass:: UnionPwQPolynomialFold + :members: + diff --git a/doc/ref_schedule.rst b/doc/ref_schedule.rst new file mode 100644 index 0000000..e38e5ba --- /dev/null +++ b/doc/ref_schedule.rst @@ -0,0 +1,28 @@ +Reference: Scheduling +===================== + +.. currentmodule:: islpy + +Band +---- + +.. autoclass:: Band + :members: + +Schedule +-------- + +.. autoclass:: Schedule + :members: + +Schedule Node +------------- + +.. autoclass:: ScheduleNode + :members: + +ScheduleConstraints +------------------- + +.. autoclass:: ScheduleConstraints + :members: diff --git a/doc/reference.rst b/doc/reference.rst index 9794fab..7ef6bf4 100644 --- a/doc/reference.rst +++ b/doc/reference.rst @@ -1,22 +1,11 @@ -Reference guide -=============== +Reference guide: Overview +========================= .. module:: islpy .. moduleauthor:: Andreas Kloeckner .. _gen-remarks: -Table of Contents -^^^^^^^^^^^^^^^^^ - -.. toctree:: - :maxdepth: 3 - - reference - -.. Referring to this document makes sphinx spew 'circular reference' warnings. -.. "self" would apparently be the correct way, but it does not work. - General Remarks ^^^^^^^^^^^^^^^ @@ -82,13 +71,36 @@ Error Reporting .. exception:: Error +Convenience +^^^^^^^^^^^ + +.. autofunction:: make_zero_and_vars + +.. autofunction:: affs_from_space + + +Lifetime Helpers +^^^^^^^^^^^^^^^^ + +.. class:: ffi_callback_handle + + Some callbacks, notably those in :class:`AstBuild`, need to outlive the + function call to which they're passed. These callback return a callback + handle that must be kept alive until the callback is no longer needed. + +Global Data +^^^^^^^^^^^ + +.. data:: DEFAULT_CONTEXT + + ISL objects being unpickled or initialized from strings will be instantiated + within this :class:`Context`. + + .. versionadded:: 2015.2 + Symbolic Constants ^^^^^^^^^^^^^^^^^^ -.. autoclass:: format - :members: - :undoc-members: - .. autoclass:: error :members: :undoc-members: @@ -104,10 +116,6 @@ Symbolic Constants :undoc-members: :exclude-members: names, values -.. autoclass:: constants - :members: - :undoc-members: - .. autoclass:: ast_op_type :members: :undoc-members: @@ -120,333 +128,15 @@ Symbolic Constants :members: :undoc-members: -Basic Building Blocks -^^^^^^^^^^^^^^^^^^^^^ - -Context -------- - -.. class:: Context() - -Id --- - -.. autoclass:: Id - :members: - -Space ------ - -(formerly called :class:`Dim`. A compatibility alias is in place.) - -.. autoclass:: Space - :members: - -Local Space ------------ - -.. autoclass:: LocalSpace - :members: - -Constraints ------------ - -.. autoclass:: Constraint - :members: - -Value ------ - -.. autoclass:: Val - :members: - -Multi-Value ------------ - -.. autoclass:: MultiVal - :members: - -Vector ------- - -.. autoclass:: Vec - :members: - -Matrix ------- - -.. autoclass:: Mat - :members: - -Sets and Maps -^^^^^^^^^^^^^ - -Basic Set ---------- - -.. autoclass:: BasicSet - :members: - -Basic Map ---------- - -.. autoclass:: BasicMap - :members: - -Set ---- - -.. autoclass:: Set - :members: - -Map ---- - -.. autoclass:: Map - :members: - -Union Set ---------- - -.. autoclass:: UnionSet - :members: - -Union Map ---------- - -.. autoclass:: UnionMap - :members: - -Geometric Entities -^^^^^^^^^^^^^^^^^^ - -Point ------ - -.. autoclass:: Point - :members: - -Vertex ------- - -.. autoclass:: Vertex - :members: - -Vertices --------- - -.. autoclass:: Vertices - :members: - -Cell ----- - -.. autoclass:: Cell - :members: - -Quasi-Affine Expressions -^^^^^^^^^^^^^^^^^^^^^^^^ - -Quasi-Affine Expression ------------------------ - -.. autoclass:: Aff - :members: - -Piecewise Quasi-Affine Expression ---------------------------------- - -.. autoclass:: PwAff - :members: - -Union of Piecewise Quasi-Affine Expressions -------------------------------------------- - -.. autoclass:: UnionPwAff - :members: - -Multiple Union of Piecewise Quasi-Affine Expressions ----------------------------------------------------- - -.. autoclass:: MultiUnionPwAff - :members: - - -Multiply Affine Expressions -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -Multiply Affine Expression --------------------------- - -.. autoclass:: MultiAff - :members: - -Piecewise Multiply Affine Expression ------------------------------------- - -.. autoclass:: PwMultiAff - :members: - -Union of Piecewise Multiply Affine Expressions ----------------------------------------------- - -.. autoclass:: UnionPwMultiAff - :members: - -Quasipolynomials -^^^^^^^^^^^^^^^^ - -Term ----- - -.. autoclass:: Term - :members: - -QPolynomial ------------ - -.. autoclass:: QPolynomial - :members: - -PwQPolynomial -------------- - -.. autoclass:: PwQPolynomial - :members: - -UnionPwQPolynomial ------------------- - -.. autoclass:: UnionPwQPolynomial - :members: - -QPolynomialFold ---------------- - -.. autoclass:: QPolynomialFold - :members: - -PwQPolynomial -------------- - -.. autoclass:: PwQPolynomialFold - :members: - -UnionPwQPolynomialFold ----------------------- - -.. autoclass:: UnionPwQPolynomialFold - :members: - -Scheduling -^^^^^^^^^^ - -Band ----- - -.. autoclass:: Band - :members: - -Schedule --------- - -.. autoclass:: Schedule - :members: - -.. autoclass:: ScheduleNode - :members: - -ScheduleConstraints -------------------- - -.. autoclass:: ScheduleConstraints - :members: - -Dataflow -^^^^^^^^ - -Access Info ------------ - -.. autoclass:: AccessInfo - :members: -.. autoclass:: UnionAccessInfo - :members: - -Restriction ------------ - -.. autoclass:: Restriction - :members: - -Flow ----- - -.. autoclass:: Flow - :members: -.. autoclass:: UnionFlow - :members: - -Abstract Syntax Trees -^^^^^^^^^^^^^^^^^^^^^ - -.. versionadded:: 2014.1 - -.. autoclass:: AstExpr - :members: - -.. autoclass:: AstNode - :members: - -.. autoclass:: AstBuild - :members: - -.. autoclass:: AstPrintOptions - :members: - -Lists -^^^^^ - -.. autoclass:: IdList - :members: - -.. autoclass:: ValList - :members: - - -.. autoclass:: BasicSetList - :members: - -.. autoclass:: BasicMapList - :members: - -.. autoclass:: SetList - :members: - -.. autoclass:: MapList - :members: - -.. autoclass:: UnionSetList - :members: - -.. autoclass:: AffList - :members: - - -.. autoclass:: BandList - :members: - -.. autoclass:: AstExprList +.. autoclass:: format :members: + :undoc-members: -.. autoclass:: AstNodeList +.. autoclass:: yaml_style :members: + :undoc-members: -Dictionaries -^^^^^^^^^^^^ -.. autoclass:: IdToAstExpr - :members: Output ^^^^^^ -- GitLab From 9615aa270412b755343b9bb7d9fd1246c2637e09 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 13:35:34 -0500 Subject: [PATCH 03/41] Bring over most of__init__.py from new-style islpy --- islpy/__init__.py | 398 +++++++++++++++++++++++++++++++++++++--------- 1 file changed, 325 insertions(+), 73 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index cd39385..6bcc7b8 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -1,13 +1,131 @@ -from __future__ import division -from __future__ import absolute_import - - -from islpy._isl import * # noqa -from islpy.version import * # noqa +__copyright__ = "Copyright (C) 2011-20 Andreas Kloeckner" + +__license__ = """ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +""" + +import islpy._isl as _isl +from islpy.version import VERSION, VERSION_TEXT # noqa import six from six.moves import range +Error = _isl.Error + +# {{{ name imports + +Context = _isl.Context +IdList = _isl.IdList +ValList = _isl.ValList +BasicSetList = _isl.BasicSetList +BasicMapList = _isl.BasicMapList +SetList = _isl.SetList +MapList = _isl.MapList +UnionSetList = _isl.UnionSetList +ConstraintList = _isl.ConstraintList +AffList = _isl.AffList +PwAffList = _isl.PwAffList +AstExprList = _isl.AstExprList +AstNodeList = _isl.AstNodeList +IdToAstExpr = _isl.IdToAstExpr +Printer = _isl.Printer +Val = _isl.Val +MultiVal = _isl.MultiVal +Vec = _isl.Vec +Mat = _isl.Mat +Aff = _isl.Aff +PwAff = _isl.PwAff +UnionPwAff = _isl.UnionPwAff +MultiAff = _isl.MultiAff +MultiPwAff = _isl.MultiPwAff +PwMultiAff = _isl.PwMultiAff +UnionPwMultiAff = _isl.UnionPwMultiAff +UnionPwAffList = _isl.UnionPwAffList +MultiUnionPwAff = _isl.MultiUnionPwAff +Id = _isl.Id +Constraint = _isl.Constraint +Space = _isl.Space +LocalSpace = _isl.LocalSpace +BasicSet = _isl.BasicSet +BasicMap = _isl.BasicMap +Set = _isl.Set +Map = _isl.Map +UnionMap = _isl.UnionMap +UnionSet = _isl.UnionSet +Point = _isl.Point +Vertex = _isl.Vertex +Cell = _isl.Cell +Vertices = _isl.Vertices +StrideInfo = _isl.StrideInfo +QPolynomialFold = _isl.QPolynomialFold +PwQPolynomialFold = _isl.PwQPolynomialFold +UnionPwQPolynomialFold = _isl.UnionPwQPolynomialFold +UnionPwQPolynomial = _isl.UnionPwQPolynomial +QPolynomial = _isl.QPolynomial +PwQPolynomial = _isl.PwQPolynomial +Term = _isl.Term +ScheduleConstraints = _isl.ScheduleConstraints +ScheduleNode = _isl.ScheduleNode +Schedule = _isl.Schedule +AccessInfo = _isl.AccessInfo +Flow = _isl.Flow +Restriction = _isl.Restriction +UnionAccessInfo = _isl.UnionAccessInfo +UnionFlow = _isl.UnionFlow +AstExpr = _isl.AstExpr +AstNode = _isl.AstNode +AstPrintOptions = _isl.AstPrintOptions +AstBuild = _isl.AstBuild + +error = _isl.error +stat = _isl.stat +dim_type = _isl.dim_type +schedule_node_type = _isl.schedule_node_type +ast_expr_op_type = _isl.ast_expr_op_type +ast_expr_type = _isl.ast_expr_type +ast_node_type = _isl.ast_node_type +ast_loop_type = _isl.ast_loop_type +fold = _isl.fold +format = _isl.format +yaml_style = _isl.yaml_style +bound = _isl.bound +on_error = _isl.on_error +schedule_algorithm = _isl.schedule_algorithm + +# backward compatibility +ast_op_type = _isl.ast_expr_op_type + +ALL_CLASSES = [Context, IdList, ValList, BasicSetList, BasicMapList, SetList, + MapList, UnionSetList, ConstraintList, AffList, PwAffList, AstExprList, + AstNodeList, IdToAstExpr, Printer, Val, MultiVal, Vec, Mat, Aff, PwAff, + UnionPwAff, MultiAff, MultiPwAff, PwMultiAff, UnionPwMultiAff, + UnionPwAffList, MultiUnionPwAff, Id, Constraint, Space, LocalSpace, + BasicSet, BasicMap, Set, Map, UnionMap, UnionSet, Point, Vertex, Cell, + Vertices, StrideInfo, QPolynomialFold, PwQPolynomialFold, + UnionPwQPolynomialFold, UnionPwQPolynomial, QPolynomial, PwQPolynomial, + Term, ScheduleConstraints, ScheduleNode, Schedule, AccessInfo, + Flow, Restriction, UnionAccessInfo, UnionFlow, AstExpr, AstNode, + AstPrintOptions, AstBuild] + +# }}} + + _CHECK_DIM_TYPES = [ dim_type.in_, dim_type.param, dim_type.set] @@ -165,7 +283,7 @@ def _add_functionality(): return result - def space_get_var_dict(self, dimtype=None): + def space_get_var_dict(self, dimtype=None, ignore_out=False): """Return a dictionary mapping variable names to tuples of (:class:`dim_type`, index). @@ -181,6 +299,9 @@ def _add_functionality(): if dimtype is None: types = _CHECK_DIM_TYPES + if ignore_out: + types = types[:] + types.remove(dim_type.out) else: types = [dimtype] @@ -435,7 +556,8 @@ def _add_functionality(): :param dimtype: None to get all variables, otherwise one of :class:`dim_type`. """ - return self.get_space().get_var_dict(dimtype) + return self.get_space().get_var_dict( + dimtype, ignore_out=isinstance(self, EXPR_CLASSES)) def obj_get_var_ids(self, dimtype): """Return a list of :class:`Id` instances for :class:`dim_type` *dimtype*.""" @@ -502,6 +624,18 @@ def _add_functionality(): # }}} + # {{{ QPolynomial + + def qpolynomial_get_terms(self): + """Get the list of :class:`Term` instances in this :class:`QPolynomial`.""" + result = [] + self.foreach_term(result.append) + return result + + QPolynomial.get_terms = qpolynomial_get_terms + + # }}} + # {{{ PwQPolynomial def pwqpolynomial_eval_with_dict(self, value_dict): @@ -535,17 +669,25 @@ def _add_functionality(): # everything else is piecewise - number_pw_aff = PwAff.empty(template.get_space()) - for set, _ in template.get_pieces(): - number_pw_aff = set.indicator_function().cond( - number_aff, number_pw_aff) + if template.get_pieces(): + number_pw_aff = PwAff.empty(template.get_space()) + for set, _ in template.get_pieces(): + number_pw_aff = set.indicator_function().cond( + number_aff, number_pw_aff) + else: + number_pw_aff = PwAff.alloc( + Set.universe(template.domain().space), + number_aff) if isinstance(template, PwAff): return number_pw_aff - else: + elif isinstance(template, PwQPolynomial): return PwQPolynomial.from_pw_aff(number_pw_aff) + else: + raise TypeError("unexpected template type") + ARITH_CLASSES = (Aff, PwAff, QPolynomial, PwQPolynomial) # noqa def expr_like_add(self, other): @@ -820,6 +962,9 @@ def _add_functionality(): _add_functionality() +DEFAULT_CONTEXT = Context() + + def _back_to_basic(new_obj, old_obj): # Work around set_dim_id not being available for Basic{Set,Map} if isinstance(old_obj, BasicSet) and isinstance(new_obj, Set): @@ -849,47 +994,56 @@ def _set_dim_id(obj, dt, idx, id): return _back_to_basic(obj.set_dim_id(dt, idx, id), obj) -def _align_dim_type(tgt_dt, obj, tgt, obj_bigger_ok, obj_names, tgt_names): +def _align_dim_type(template_dt, obj, template, obj_bigger_ok, obj_names, + template_names): + + # {{{ deal with Aff, PwAff + # The technique below will not work for PwAff et al, because there is *only* # the 'param' dim_type, and we are not allowed to move dims around in there. # We'll make isl do the work, using align_params. - if tgt_dt == dim_type.param and isinstance(obj, (Aff, PwAff)): - if not isinstance(tgt, Space): - tgt_space = tgt.space + if template_dt == dim_type.param and isinstance(obj, (Aff, PwAff)): + if not isinstance(template, Space): + template_space = template.space else: - tgt_space = tgt - if (not obj_bigger_ok - or obj.space.dim(dim_type.param) == tgt_space.dim(dim_type.param)): - return obj.align_params(tgt_space) - - if None in tgt_names: - all_nones = [None] * len(tgt_names) - if tgt_names == all_nones and obj_names == all_nones: + template_space = template + + if not obj_bigger_ok: + if (obj.dim(template_dt) > template.dim(template_dt) + or not set(obj.get_var_dict()) <= set(template.get_var_dict())): + raise Error("obj has leftover dimensions after alignment") + return obj.align_params(template_space) + + # }}} + + if None in template_names: + all_nones = [None] * len(template_names) + if template_names == all_nones and obj_names == all_nones: # that's ok return obj - raise RuntimeError("tgt may not contain any unnamed dimensions") + raise Error("template may not contain any unnamed dimensions") obj_names = set(obj_names) - set([None]) - tgt_names = set(tgt_names) - set([None]) + template_names = set(template_names) - set([None]) - names_in_both = obj_names & tgt_names + names_in_both = obj_names & template_names tgt_idx = 0 - while tgt_idx < tgt.dim(tgt_dt): - tgt_id = tgt.get_dim_id(tgt_dt, tgt_idx) + while tgt_idx < template.dim(template_dt): + tgt_id = template.get_dim_id(template_dt, tgt_idx) tgt_name = tgt_id.name if tgt_name in names_in_both: - if (obj.dim(tgt_dt) > tgt_idx - and tgt_name == obj.get_dim_name(tgt_dt, tgt_idx)): + if (obj.dim(template_dt) > tgt_idx + and tgt_name == obj.get_dim_name(template_dt, tgt_idx)): pass else: src_dt, src_idx = obj.get_var_dict()[tgt_name] - if src_dt == tgt_dt: + if src_dt == template_dt: assert src_idx > tgt_idx # isl requires move_dims to be between different types. @@ -900,86 +1054,184 @@ def _align_dim_type(tgt_dt, obj, tgt, obj_bigger_ok, obj_names, tgt_names): other_dt_dim = obj.dim(other_dt) obj = obj.move_dims(other_dt, other_dt_dim, src_dt, src_idx, 1) - obj = obj.move_dims(tgt_dt, tgt_idx, other_dt, other_dt_dim, 1) + obj = obj.move_dims( + template_dt, tgt_idx, other_dt, other_dt_dim, 1) else: - obj = obj.move_dims(tgt_dt, tgt_idx, src_dt, src_idx, 1) + obj = obj.move_dims(template_dt, tgt_idx, src_dt, src_idx, 1) # names are same, make Ids the same, too - obj = _set_dim_id(obj, tgt_dt, tgt_idx, tgt_id) + obj = _set_dim_id(obj, template_dt, tgt_idx, tgt_id) tgt_idx += 1 else: - obj = obj.insert_dims(tgt_dt, tgt_idx, 1) - obj = _set_dim_id(obj, tgt_dt, tgt_idx, tgt_id) + obj = obj.insert_dims(template_dt, tgt_idx, 1) + obj = _set_dim_id(obj, template_dt, tgt_idx, tgt_id) tgt_idx += 1 - if tgt_idx < obj.dim(tgt_dt) and not obj_bigger_ok: - raise ValueError("obj has leftover dimensions") + if tgt_idx < obj.dim(template_dt) and not obj_bigger_ok: + raise Error("obj has leftover dimensions after alignment") return obj -def align_spaces(obj, tgt, obj_bigger_ok=False, across_dim_types=False): +def align_spaces(obj, template, obj_bigger_ok=False, across_dim_types=None): """ - Try to make the space in which *obj* lives the same as that of *tgt* by + Try to make the space in which *obj* lives the same as that of *template* by adding/matching named dimensions. :param obj_bigger_ok: If *True*, no error is raised if the resulting *obj* - has more dimensions than *tgt*. + has more dimensions than *template*. """ + if across_dim_types is not None: + from warnings import warn + warn("across_dim_types is deprecated and should no longer be used. " + "It never had any effect anyway.", + DeprecationWarning, stacklevel=2) + have_any_param_domains = ( isinstance(obj, (Set, BasicSet)) - and isinstance(tgt, (Set, BasicSet)) - and (obj.is_params() or tgt.is_params())) + and isinstance(template, (Set, BasicSet)) + and (obj.is_params() or template.is_params())) if have_any_param_domains: if obj.is_params(): obj = type(obj).from_params(obj) - if tgt.is_params(): - tgt = type(tgt).from_params(tgt) + if template.is_params(): + template = type(template).from_params(template) - if isinstance(tgt, EXPR_CLASSES): + if isinstance(template, EXPR_CLASSES): dim_types = _CHECK_DIM_TYPES[:] dim_types.remove(dim_type.out) else: dim_types = _CHECK_DIM_TYPES - if across_dim_types: - obj_names = [ - obj.get_dim_name(dt, i) - for dt in dim_types - for i in range(obj.dim(dt)) - ] - tgt_names = [ - tgt.get_dim_name(dt, i) - for dt in dim_types - for i in range(tgt.dim(dt)) - ] - - for dt in dim_types: - obj = _align_dim_type(dt, obj, tgt, obj_bigger_ok, obj_names, tgt_names) - else: - for dt in dim_types: - obj_names = [obj.get_dim_name(dt, i) for i in range(obj.dim(dt))] - tgt_names = [tgt.get_dim_name(dt, i) for i in range(tgt.dim(dt))] - - obj = _align_dim_type(dt, obj, tgt, obj_bigger_ok, obj_names, tgt_names) + obj_names = [ + obj.get_dim_name(dt, i) + for dt in dim_types + for i in range(obj.dim(dt)) + ] + template_names = [ + template.get_dim_name(dt, i) + for dt in dim_types + for i in range(template.dim(dt)) + ] + + for dt in dim_types: + obj = _align_dim_type( + dt, obj, template, obj_bigger_ok, obj_names, template_names) return obj -def align_two(obj1, obj2, across_dim_types=False): +def align_two(obj1, obj2, across_dim_types=None): """Align the spaces of two objects, potentially modifying both of them. See also :func:`align_spaces`. """ - obj1 = align_spaces(obj1, obj2, obj_bigger_ok=True, - across_dim_types=across_dim_types) - obj2 = align_spaces(obj2, obj1, obj_bigger_ok=True, - across_dim_types=across_dim_types) + if across_dim_types is not None: + from warnings import warn + warn("across_dim_types is deprecated and should no longer be used. " + "It never had any effect anyway.", + DeprecationWarning, stacklevel=2) + + obj1 = align_spaces(obj1, obj2, obj_bigger_ok=True) + obj2 = align_spaces(obj2, obj1, obj_bigger_ok=True) return (obj1, obj2) +def make_zero_and_vars(set_vars, params=[], ctx=None): + """ + :arg set_vars: an iterable of variable names, or a comma-separated string + :arg params: an iterable of variable names, or a comma-separated string + + :return: a dictionary from variable names (in *set_vars* and *params*) + to :class:`PwAff` instances that represent each of the + variables. They key '0' is also include and represents + a :class:`PwAff` zero constant. + + .. versionadded:: 2016.1.1 + + This function is intended to make it relatively easy to construct sets + programmatically without resorting to string manipulation. + + Usage example:: + + v = isl.make_zero_and_vars("i,j,k", "n") + + myset = ( + v[0].le_set(v["i"] + v["j"]) + & + (v["i"] + v["j"]).lt_set(v["n"]) + & + (v[0].le_set(v["i"])) + & + (v["i"].le_set(13 + v["n"])) + ) + """ + if ctx is None: + ctx = DEFAULT_CONTEXT + + if isinstance(set_vars, str): + set_vars = [s.strip() for s in set_vars.split(",")] + if isinstance(params, str): + params = [s.strip() for s in params.split(",")] + + space = Space.create_from_names(ctx, set=set_vars, params=params) + return affs_from_space(space) + + +def affs_from_space(space): + """ + :return: a dictionary from variable names (in *set_vars* and *params*) + to :class:`PwAff` instances that represent each of the + variables *in*space*. They key '0' is also include and represents + a :class:`PwAff` zero constant. + + .. versionadded:: 2016.2 + + This function is intended to make it relatively easy to construct sets + programmatically without resorting to string manipulation. + + Usage example:: + + s = isl.Set("[n] -> {[i,j,k]: 0<=i,j,k Date: Sun, 28 Jun 2020 13:36:00 -0500 Subject: [PATCH 04/41] More wrapper tweaks --- gen_wrap.py | 186 ++++++--------------------------- src/wrapper/wrap_isl.cpp | 117 ++++++++++++++------- src/wrapper/wrap_isl.hpp | 71 +++++++------ src/wrapper/wrap_isl_part3.cpp | 6 +- 4 files changed, 153 insertions(+), 227 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index e5166cc..93a4e58 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -155,13 +155,13 @@ PART_TO_CLASSES = { ], "part3": [ + "qpolynomial", "pw_qpolynomial", "qpolynomial_fold", "pw_qpolynomial_fold", "union_pw_qpolynomial_fold", "union_pw_qpolynomial", - "qpolynomial", "pw_qpolynomial", "term", - "band", "schedule", "schedule_constraints", + "schedule", "schedule_constraints", "schedule_node", "access_info", "flow", "restriction", @@ -188,144 +188,24 @@ CLASS_MAP = { ENUMS = { # ctx.h - "isl_error": """ - isl_error_none, - isl_error_abort, - isl_error_alloc, - isl_error_unknown, - isl_error_internal, - isl_error_invalid, - isl_error_quota, - isl_error_unsupported, - """, - "isl_stat": """ - isl_stat_error, - isl_stat_ok, - """, - "isl_bool": """ - isl_bool_error, - isl_bool_false, - isl_bool_true, - """, + "isl_error", + "isl_stat", + "isl_bool", + # space.h - "isl_dim_type": """ - isl_dim_cst, - isl_dim_param, - isl_dim_in, - isl_dim_out, - isl_dim_set, - isl_dim_div, - isl_dim_all, - """, + "isl_dim_type", # schedule_type.h - "isl_schedule_node_type": """ - isl_schedule_node_error, - isl_schedule_node_band, - isl_schedule_node_context, - isl_schedule_node_domain, - isl_schedule_node_expansion, - isl_schedule_node_extension, - isl_schedule_node_filter, - isl_schedule_node_leaf, - isl_schedule_node_guard, - isl_schedule_node_mark, - isl_schedule_node_sequence, - isl_schedule_node_set, - """, + "isl_schedule_node_type", # ast_type.h - "isl_ast_expr_op_type": """ - isl_ast_op_error, - isl_ast_op_and, - isl_ast_op_and_then, - isl_ast_op_or, - isl_ast_op_or_else, - isl_ast_op_max, - isl_ast_op_min, - isl_ast_op_minus, - isl_ast_op_add, - isl_ast_op_sub, - isl_ast_op_mul, - isl_ast_op_div, - isl_ast_op_fdiv_q, - isl_ast_op_pdiv_q, - isl_ast_op_pdiv_r, - isl_ast_op_zdiv_r, - isl_ast_op_cond, - isl_ast_op_select, - isl_ast_op_eq, - isl_ast_op_le, - isl_ast_op_lt, - isl_ast_op_ge, - isl_ast_op_gt, - isl_ast_op_call, - isl_ast_op_access, - isl_ast_op_member, - isl_ast_op_address_of, - """, - "isl_ast_expr_type": """ - isl_ast_expr_error, - isl_ast_expr_op, - isl_ast_expr_id, - isl_ast_expr_int, - """, - "isl_ast_node_type": """ - isl_ast_node_error, - isl_ast_node_for, - isl_ast_node_if, - isl_ast_node_block, - isl_ast_node_mark, - isl_ast_node_user, - """, - "isl_ast_loop_type": """ - isl_ast_loop_error, - isl_ast_loop_default, - isl_ast_loop_atomic, - isl_ast_loop_unroll, - isl_ast_loop_separate, - """, + "isl_ast_expr_op_type", + "isl_ast_expr_type", + "isl_ast_node_type", + "isl_ast_loop_type", # polynomial_type.h - "isl_fold": """ - isl_fold_min, - isl_fold_max, - isl_fold_list, - """, - - # printer.h - "isl_format": """ - ISL_FORMAT_ISL, - ISL_FORMAT_POLYLIB, - ISL_FORMAT_POLYLIB_CONSTRAINTS, - ISL_FORMAT_OMEGA, - ISL_FORMAT_C, - ISL_FORMAT_LATEX, - ISL_FORMAT_EXT_POLYLIB, - """, - - "isl_yaml_style": """ - ISL_YAML_STYLE_BLOCK, - ISL_YAML_STYLE_FLOW, - """, - - # options.h - - "isl_bound": """ - ISL_BOUND_BERNSTEIN, - ISL_BOUND_RANGE, - """, - - "isl_on_error": """ - ISL_ON_ERROR_WARN, - ISL_ON_ERROR_CONTINUE, - ISL_ON_ERROR_ABORT, - """, - - "isl_schedule_algorithm": """ - ISL_SCHEDULE_ALGORITHM_ISL, - ISL_SCHEDULE_ALGORITHM_FEAUTRIER, - """, + "isl_fold", } TYPEDEFD_ENUMS = ["isl_stat", "isl_bool"] @@ -708,12 +588,13 @@ class FunctionData: assert c_name.startswith("isl_"), c_name name = c_name[4:] - found_class = False - for cls in CLASSES: - if name.startswith(cls): - found_class = True - name = name[len(cls)+1:] - break + # find longest class name match + class_name = None + for it_cls_name in CLASSES: + if (name.startswith(it_cls_name) + and (class_name is None + or len(class_name) < len(it_cls_name))): + class_name = it_cls_name # Don't be tempted to chop off "_val"--the "_val" versions of # some methods are incompatible with the isl_int ones. @@ -725,26 +606,21 @@ class FunctionData: # To avoid breaking user code in non-obvious ways, the new # names are carried over to the Python level. - if not found_class: - # for fake_cls, cls in CLASS_MAP.items(): - # if name.startswith(fake_cls): - # found_class = True - # break + if class_name is not None: + name = name[len(class_name)+1:] + else: if name.startswith("bool_"): return if name.startswith("options_"): - found_class = True - cls = "ctx" + class_name = "ctx" name = name[len("options_"):] elif name.startswith("equality_") or name.startswith("inequality_"): - found_class = True - cls = "constraint" + class_name = "constraint" elif name == "ast_op_type_set_print_name": - found_class = True - cls = "printer" + class_name = "printer" name = "ast_op_type_set_print_name" - assert found_class, name + assert class_name is not None if name in ["free", "cow", "dump"]: return @@ -752,13 +628,13 @@ class FunctionData: try: args = [parse_arg(arg) for arg in args] except BadArg: - print("SKIP: %s %s" % (cls, name)) + print("SKIP: %s %s" % (class_name, name)) return if name in PYTHON_RESERVED_WORDS: name = name + "_" - if cls == "options": + if class_name == "options": assert name.startswith("set_") or name.startswith("get_"), (name, c_name) name = name[:4]+"option_"+name[4:] @@ -776,13 +652,13 @@ class FunctionData: words = [w for w in words if w not in ["struct", "enum"]] return_base_type = " ".join(words) - cls_meth_list = self.classes_to_methods.setdefault(cls, []) + cls_meth_list = self.classes_to_methods.setdefault(class_name, []) if c_name in self.seen_c_names: return cls_meth_list.append(Method( - cls, name, c_name, + class_name, name, c_name, return_semantics, return_base_type, return_ptr, args, is_exported=is_exported, is_constructor=is_constructor)) diff --git a/src/wrapper/wrap_isl.cpp b/src/wrapper/wrap_isl.cpp index ab53ee8..c2a1750 100644 --- a/src/wrapper/wrap_isl.cpp +++ b/src/wrapper/wrap_isl.cpp @@ -52,7 +52,6 @@ PYBIND11_MODULE(_isl, m) } */ -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) py::enum_(m, "error") .ENUM_VALUE(isl_error_, none) .ENUM_VALUE(isl_error_, abort) @@ -66,7 +65,6 @@ PYBIND11_MODULE(_isl, m) .ENUM_VALUE(isl_stat_, error) .ENUM_VALUE(isl_stat_, ok) ; -#endif py::enum_(m, "dim_type") .ENUM_VALUE(isl_dim_, cst) @@ -78,40 +76,57 @@ PYBIND11_MODULE(_isl, m) .ENUM_VALUE(isl_dim_, all) ; + py::enum_(m, "schedule_node_type") + .ENUM_VALUE(isl_schedule_node_, error) + .ENUM_VALUE(isl_schedule_node_, band) + .ENUM_VALUE(isl_schedule_node_, context) + .ENUM_VALUE(isl_schedule_node_, domain) + .ENUM_VALUE(isl_schedule_node_, expansion) + .ENUM_VALUE(isl_schedule_node_, extension) + .ENUM_VALUE(isl_schedule_node_, filter) + .ENUM_VALUE(isl_schedule_node_, leaf) + .ENUM_VALUE(isl_schedule_node_, guard) + .ENUM_VALUE(isl_schedule_node_, mark) + .ENUM_VALUE(isl_schedule_node_, sequence) + .ENUM_VALUE(isl_schedule_node_, set) + ; + + py::enum_(m, "ast_expr_op_type") + .ENUM_VALUE(isl_ast_expr_op_, error) + .ENUM_VALUE(isl_ast_expr_op_, and) + .ENUM_VALUE(isl_ast_expr_op_, and_then) + .ENUM_VALUE(isl_ast_expr_op_, or) + .ENUM_VALUE(isl_ast_expr_op_, or_else) + .ENUM_VALUE(isl_ast_expr_op_, max) + .ENUM_VALUE(isl_ast_expr_op_, min) + .ENUM_VALUE(isl_ast_expr_op_, minus) + .ENUM_VALUE(isl_ast_expr_op_, add) + .ENUM_VALUE(isl_ast_expr_op_, sub) + .ENUM_VALUE(isl_ast_expr_op_, mul) + .ENUM_VALUE(isl_ast_expr_op_, div) + .ENUM_VALUE(isl_ast_expr_op_, fdiv_q) + .ENUM_VALUE(isl_ast_expr_op_, pdiv_q) + .ENUM_VALUE(isl_ast_expr_op_, pdiv_r) + .ENUM_VALUE(isl_ast_expr_op_, zdiv_r) + .ENUM_VALUE(isl_ast_expr_op_, cond) + .ENUM_VALUE(isl_ast_expr_op_, select) + .ENUM_VALUE(isl_ast_expr_op_, eq) + .ENUM_VALUE(isl_ast_expr_op_, le) + .ENUM_VALUE(isl_ast_expr_op_, lt) + .ENUM_VALUE(isl_ast_expr_op_, ge) + .ENUM_VALUE(isl_ast_expr_op_, gt) + .ENUM_VALUE(isl_ast_expr_op_, call) + .ENUM_VALUE(isl_ast_expr_op_, access) + .ENUM_VALUE(isl_ast_expr_op_, member) + .ENUM_VALUE(isl_ast_expr_op_, address_of) + ; + py::enum_(m, "fold") .ENUM_VALUE(isl_fold_, min) .ENUM_VALUE(isl_fold_, max) .ENUM_VALUE(isl_fold_, list) ; - py::enum_(m, "ast_op_type") - .ENUM_VALUE(isl_ast_op_, error) - .ENUM_VALUE(isl_ast_op_, and) - .ENUM_VALUE(isl_ast_op_, and_then) - .ENUM_VALUE(isl_ast_op_, or) - .ENUM_VALUE(isl_ast_op_, or_else) - .ENUM_VALUE(isl_ast_op_, max) - .ENUM_VALUE(isl_ast_op_, min) - .ENUM_VALUE(isl_ast_op_, minus) - .ENUM_VALUE(isl_ast_op_, add) - .ENUM_VALUE(isl_ast_op_, sub) - .ENUM_VALUE(isl_ast_op_, mul) - .ENUM_VALUE(isl_ast_op_, div) - .ENUM_VALUE(isl_ast_op_, fdiv_q) - .ENUM_VALUE(isl_ast_op_, pdiv_q) - .ENUM_VALUE(isl_ast_op_, pdiv_r) - .ENUM_VALUE(isl_ast_op_, cond) - .ENUM_VALUE(isl_ast_op_, select) - .ENUM_VALUE(isl_ast_op_, eq) - .ENUM_VALUE(isl_ast_op_, le) - .ENUM_VALUE(isl_ast_op_, lt) - .ENUM_VALUE(isl_ast_op_, ge) - .ENUM_VALUE(isl_ast_op_, gt) - .ENUM_VALUE(isl_ast_op_, call) - .ENUM_VALUE(isl_ast_op_, access) - .ENUM_VALUE(isl_ast_op_, member) - ; - py::enum_(m, "ast_expr_type") .ENUM_VALUE(isl_ast_expr_, error) .ENUM_VALUE(isl_ast_expr_, op) @@ -127,15 +142,41 @@ PYBIND11_MODULE(_isl, m) .ENUM_VALUE(isl_ast_node_, user) ; -#define FORMAT_ATTR(name) cls_format.attr(#name) = ISL_FORMAT_##name + py::enum_(m, "ast_loop_type") + .ENUM_VALUE(isl_ast_loop_, error) + .ENUM_VALUE(isl_ast_loop_, default) + .ENUM_VALUE(isl_ast_loop_, atomic) + .ENUM_VALUE(isl_ast_loop_, unroll) + .ENUM_VALUE(isl_ast_loop_, separate) + ; + +#define ADD_MACRO_ATTR(cls_name, prefix, name) cls_name.attr(#name) = prefix##name + py::class_ cls_format(m, "format"); - FORMAT_ATTR(ISL); - FORMAT_ATTR(POLYLIB); - FORMAT_ATTR(POLYLIB_CONSTRAINTS); - FORMAT_ATTR(OMEGA); - FORMAT_ATTR(C); - FORMAT_ATTR(LATEX); - FORMAT_ATTR(EXT_POLYLIB); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, ISL); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, POLYLIB); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, POLYLIB_CONSTRAINTS); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, OMEGA); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, C); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, LATEX); + ADD_MACRO_ATTR(cls_format, ISL_FORMAT_, EXT_POLYLIB); + + py::class_ cls_yaml_style(m, "yaml_style"); + ADD_MACRO_ATTR(cls_yaml_style, ISL_YAML_STYLE_, BLOCK); + ADD_MACRO_ATTR(cls_yaml_style, ISL_YAML_STYLE_, FLOW); + + py::class_ cls_bound(m, "bound"); + ADD_MACRO_ATTR(cls_bound, ISL_BOUND_, BERNSTEIN); + ADD_MACRO_ATTR(cls_bound, ISL_BOUND_, RANGE); + + py::class_ cls_on_error(m, "on_error"); + ADD_MACRO_ATTR(cls_on_error, ISL_ON_ERROR_, WARN); + ADD_MACRO_ATTR(cls_on_error, ISL_ON_ERROR_, CONTINUE); + ADD_MACRO_ATTR(cls_on_error, ISL_ON_ERROR_, ABORT); + + py::class_ cls_schedule_algorithm(m, "schedule_algorithm"); + ADD_MACRO_ATTR(cls_schedule_algorithm, ISL_SCHEDULE_ALGORITHM_, ISL); + ADD_MACRO_ATTR(cls_schedule_algorithm, ISL_SCHEDULE_ALGORITHM_, FEAUTRIER); islpy_expose_part1(m); islpy_expose_part2(m); diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index 311c9c2..d2c8f2a 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -140,6 +140,31 @@ namespace isl } }; + // matches order in gen_wrap.py + + // {{{ part 1 + + WRAP_CLASS(id_list); + WRAP_CLASS(val_list); + WRAP_CLASS(basic_set_list); + WRAP_CLASS(basic_map_list); + WRAP_CLASS(set_list); + WRAP_CLASS(map_list); + WRAP_CLASS(union_set_list); + WRAP_CLASS(constraint_list); + WRAP_CLASS(aff_list); + WRAP_CLASS(pw_aff_list); + WRAP_CLASS(pw_multi_aff_list); + WRAP_CLASS(ast_expr_list); + WRAP_CLASS(ast_node_list); + WRAP_CLASS(pw_qpolynomial_list); + WRAP_CLASS(pw_qpolynomial_fold_list); + WRAP_CLASS(union_pw_aff_list); + WRAP_CLASS(union_pw_multi_aff_list); + WRAP_CLASS(union_map_list); + + WRAP_CLASS(id_to_ast_expr); + WRAP_CLASS(printer); WRAP_CLASS(val); WRAP_CLASS(multi_val); @@ -171,6 +196,10 @@ namespace isl MAKE_CAST_CTOR(local_space, space, isl_local_space_from_space); }; + // }}} + + // {{{ part 2 + WRAP_CLASS(basic_set); WRAP_CLASS(basic_map); @@ -203,6 +232,10 @@ namespace isl WRAP_CLASS(vertices); WRAP_CLASS(stride_info); + // }}} + + // {{{ part 3 + WRAP_CLASS(qpolynomial); WRAP_CLASS(pw_qpolynomial); WRAP_CLASS(qpolynomial_fold); @@ -211,51 +244,28 @@ namespace isl WRAP_CLASS(union_pw_qpolynomial_fold); WRAP_CLASS(term); - // matches order in gen_wrap.py - - WRAP_CLASS(id_list); - WRAP_CLASS(val_list); - WRAP_CLASS(basic_set_list); - WRAP_CLASS(basic_map_list); - WRAP_CLASS(set_list); - WRAP_CLASS(map_list); - WRAP_CLASS(union_set_list); - WRAP_CLASS(constraint_list); - WRAP_CLASS(aff_list); - WRAP_CLASS(pw_aff_list); - WRAP_CLASS(pw_multi_aff_list); - WRAP_CLASS(ast_expr_list); - WRAP_CLASS(ast_node_list); - WRAP_CLASS(pw_qpolynomial_list); - WRAP_CLASS(pw_qpolynomial_fold_list); - WRAP_CLASS(union_pw_aff_list); - WRAP_CLASS(union_pw_multi_aff_list); - WRAP_CLASS(union_map_list); - - // end match - - WRAP_CLASS(id_to_ast_expr); - WRAP_CLASS(schedule); WRAP_CLASS(schedule_constraints); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(schedule_node); -#endif WRAP_CLASS(access_info); WRAP_CLASS(flow); WRAP_CLASS(restriction); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) WRAP_CLASS(union_access_info); WRAP_CLASS(union_flow); -#endif WRAP_CLASS(ast_expr); WRAP_CLASS(ast_node); - WRAP_CLASS(ast_build); WRAP_CLASS(ast_print_options); + WRAP_CLASS(ast_build); + + // }}} class format { }; + class yaml_style { }; + class bound { }; + class on_error { }; + class schedule_algorithm { }; inline void my_decref(void *user) { @@ -273,3 +283,4 @@ namespace isl wrap_##name.attr("_base_name") = #name; \ wrap_##name.attr("_isl_name") = "isl_"#name; +// vim: foldmethod=marker diff --git a/src/wrapper/wrap_isl_part3.cpp b/src/wrapper/wrap_isl_part3.cpp index e04d32e..54bfed8 100644 --- a/src/wrapper/wrap_isl_part3.cpp +++ b/src/wrapper/wrap_isl_part3.cpp @@ -7,14 +7,13 @@ namespace isl void islpy_expose_part3(py::module &m) { + MAKE_WRAP(qpolynomial, QPolynomial); + MAKE_WRAP(pw_qpolynomial, PwQPolynomial); MAKE_WRAP(qpolynomial_fold, QPolynomialFold); MAKE_WRAP(pw_qpolynomial_fold, PwQPolynomialFold); MAKE_WRAP(union_pw_qpolynomial_fold, UnionPwQPolynomialFold); MAKE_WRAP(union_pw_qpolynomial, UnionPwQPolynomial); - MAKE_WRAP(qpolynomial, QPolynomial); - MAKE_WRAP(pw_qpolynomial, PwQPolynomial); - MAKE_WRAP(term, Term); MAKE_WRAP(schedule, Schedule); @@ -38,4 +37,3 @@ void islpy_expose_part3(py::module &m) #include "gen-expose-part3.inc" } - -- GitLab From 304797c32ef9db51d46a5fe20e3ba9bd771b582c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 15:43:04 -0500 Subject: [PATCH 05/41] Fix exception conversion --- src/wrapper/wrap_isl.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wrapper/wrap_isl.cpp b/src/wrapper/wrap_isl.cpp index c2a1750..3871607 100644 --- a/src/wrapper/wrap_isl.cpp +++ b/src/wrapper/wrap_isl.cpp @@ -22,8 +22,7 @@ PYBIND11_MODULE(_isl, m) } catch (isl::error &err) { - py::object err_obj = py::cast(err); - PyErr_SetObject(ISLError.ptr(), err_obj.ptr()); + ISLError(err.what()); } }); -- GitLab From ce1f6c5c61fc113b143d1fdc138ef7d1ad77f320 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 15:43:57 -0500 Subject: [PATCH 06/41] Fix generic_{repr,str} to not rely on mutation --- islpy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index 6bcc7b8..e6eb763 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -176,12 +176,12 @@ def _add_functionality(): def generic_str(self): prn = Printer.to_str(self.get_ctx()) - getattr(prn, "print_"+self._base_name)(self) + prn = getattr(prn, "print_"+self._base_name)(self) return prn.get_str() def generic_repr(self): prn = Printer.to_str(self.get_ctx()) - getattr(prn, "print_"+self._base_name)(self) + prn = getattr(prn, "print_"+self._base_name)(self) return "%s(\"%s\")" % ( type(self).__name__, prn.get_str()) -- GitLab From c8bf74ff53faa38d406f769a4c1d5e3b18f4a6f3 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 15:44:17 -0500 Subject: [PATCH 07/41] Remove some old version queries --- src/wrapper/wrap_isl_part1.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/wrapper/wrap_isl_part1.cpp b/src/wrapper/wrap_isl_part1.cpp index c667941..06d5c69 100644 --- a/src/wrapper/wrap_isl_part1.cpp +++ b/src/wrapper/wrap_isl_part1.cpp @@ -100,10 +100,8 @@ void islpy_expose_part1(py::module &m) // wrap_aff.enable_pickling(); MAKE_WRAP(pw_aff, PwAff); // wrap_pw_aff.enable_pickling(); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(union_pw_aff, UnionPwAff); // wrap_union_pw_aff.enable_pickling(); -#endif MAKE_WRAP(multi_id, MultiId); MAKE_WRAP(multi_aff, MultiAff); // wrap_multi_aff.enable_pickling(); @@ -113,10 +111,8 @@ void islpy_expose_part1(py::module &m) // wrap_pw_multi_aff.enable_pickling(); MAKE_WRAP(union_pw_multi_aff, UnionPwMultiAff); // wrap_union_pw_multi_aff.enable_pickling(); -#if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) MAKE_WRAP(multi_union_pw_aff, MultiUnionPwAff); // wrap_multi_union_pw_aff.enable_pickling(); -#endif MAKE_WRAP(id, Id); wrap_id.def("__eq__", islpy::id_eq, py::arg("other"), -- GitLab From f858acd1a7828aab510cb18dcefdf7addb02ed8f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 17:11:59 -0500 Subject: [PATCH 08/41] Allow dynamics attributes on islpy classes --- src/wrapper/wrap_isl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index d2c8f2a..c5d71d7 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -278,7 +278,7 @@ namespace isl #define MAKE_WRAP(name, py_name) \ - py::class_ wrap_##name(m, #py_name); \ + py::class_ wrap_##name(m, #py_name, py::dynamic_attr()); \ wrap_##name.def("is_valid", &isl::name::is_valid, "Return whether current object is still valid."); \ wrap_##name.attr("_base_name") = #name; \ wrap_##name.attr("_isl_name") = "isl_"#name; -- GitLab From d2f4343ea70569d33cdd53f002b3fdcf86f67082 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 17:13:27 -0500 Subject: [PATCH 09/41] Hack aksetup_helper to remove -g/-O flags in CONFIGURE_CFLAGS, too --- aksetup_helper.py | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/aksetup_helper.py b/aksetup_helper.py index f90d085..e8b4814 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -162,10 +162,12 @@ def hack_distutils(debug=False, fast_link=True, what_opt=3): from distutils import sysconfig cvars = sysconfig.get_config_vars() - cflags = cvars.get('OPT') + + bad_prefixes = ['-g', '-O', '-Wstrict-prototypes', '-DNDEBUG'] + + cflags = cvars.get("OPT") if cflags: - cflags = remove_prefixes(cflags.split(), - ['-g', '-O', '-Wstrict-prototypes', '-DNDEBUG']) + cflags = remove_prefixes(cflags.split(), bad_prefixes) if debug: cflags.append("-g") else: @@ -175,11 +177,17 @@ def hack_distutils(debug=False, fast_link=True, what_opt=3): cflags.append("-O%s" % what_opt) cflags.append("-DNDEBUG") - cvars['OPT'] = str.join(' ', cflags) - if "BASECFLAGS" in cvars: - cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars["OPT"] - else: - assert "CFLAGS" in cvars + cvars["OPT"] = str.join(' ', cflags) + + cflags = cvars.get("CONFIGURE_CFLAGS") + if cflags: + cflags = remove_prefixes(cflags.split(), bad_prefixes) + cvars["CONFIGURE_CFLAGS"] = str.join(' ', cflags) + + if "BASECFLAGS" in cvars: + cvars["CFLAGS"] = cvars["BASECFLAGS"] + " " + cvars.get("OPT", "") + else: + assert "CFLAGS" in cvars if fast_link: for varname in ["LDSHARED", "BLDSHARED"]: -- GitLab From c17530e6969d061df043337eaa72897548a6051b Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 17:17:49 -0500 Subject: [PATCH 10/41] Fix automatic upcasts for pybind11 --- islpy/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index e6eb763..24db52e 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -831,8 +831,8 @@ def _add_functionality(): my_ismethod = ismethod(method) for meth_superclass in type(method).__mro__: - if "function" in meth_superclass.__name__: - # inspect.ismethod does not work on Boost.Py callables in Py3, + if "instancemethod" in meth_superclass.__name__: + # inspect.ismethod does not work on pybind11 callables, # hence this hack. my_ismethod = True break -- GitLab From ea85af0e48976927ae68ca508d150ef9e3caf583 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 17:18:24 -0500 Subject: [PATCH 11/41] Set isl submodule location to inducer github fork --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index dbf0c71..9de7df7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "isl"] path = isl - url = http://repo.or.cz/isl.git + url = https://github.com/inducer/isl.git -- GitLab From 6d89f249604aa18884ebe317ea0e14d9090e29ea Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 17:18:45 -0500 Subject: [PATCH 12/41] Make implicit conversion work by exposing conversion constructors --- src/wrapper/wrap_isl_part1.cpp | 4 ++++ src/wrapper/wrap_isl_part2.cpp | 9 +++++++++ 2 files changed, 13 insertions(+) diff --git a/src/wrapper/wrap_isl_part1.cpp b/src/wrapper/wrap_isl_part1.cpp index 06d5c69..31bf785 100644 --- a/src/wrapper/wrap_isl_part1.cpp +++ b/src/wrapper/wrap_isl_part1.cpp @@ -98,8 +98,11 @@ void islpy_expose_part1(py::module &m) MAKE_WRAP(aff, Aff); // wrap_aff.enable_pickling(); + MAKE_WRAP(pw_aff, PwAff); + wrap_pw_aff.def(py::init()); // wrap_pw_aff.enable_pickling(); + MAKE_WRAP(union_pw_aff, UnionPwAff); // wrap_union_pw_aff.enable_pickling(); MAKE_WRAP(multi_id, MultiId); @@ -130,6 +133,7 @@ void islpy_expose_part1(py::module &m) // wrap_constraint.enable_pickling(); MAKE_WRAP(space, Space); MAKE_WRAP(local_space, LocalSpace); + wrap_local_space.def(py::init()); #include "gen-expose-part1.inc" } diff --git a/src/wrapper/wrap_isl_part2.cpp b/src/wrapper/wrap_isl_part2.cpp index cb3bc0e..485d73c 100644 --- a/src/wrapper/wrap_isl_part2.cpp +++ b/src/wrapper/wrap_isl_part2.cpp @@ -9,15 +9,24 @@ void islpy_expose_part2(py::module &m) { MAKE_WRAP(basic_set, BasicSet); // wrap_basic_set.enable_pickling(); + MAKE_WRAP(basic_map, BasicMap); // wrap_basic_map.enable_pickling(); + MAKE_WRAP(set, Set); + wrap_set.def(py::init()); // wrap_set.enable_pickling(); + MAKE_WRAP(map, Map); + wrap_map.def(py::init()); // wrap_map.enable_pickling(); + MAKE_WRAP(union_set, UnionSet); + wrap_union_set.def(py::init()); // wrap_union_set.enable_pickling(); + MAKE_WRAP(union_map, UnionMap); + wrap_union_map.def(py::init()); // wrap_union_map.enable_pickling(); MAKE_WRAP(point, Point); -- GitLab From e4a0e5712c88d2465de5e20fb7c466c279a081ee Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:05:54 -0500 Subject: [PATCH 13/41] Get rid of _DEFAULT_CONTEXT, keep only DEFAULT_CONTEXT --- islpy/__init__.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index 24db52e..d06b617 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -133,7 +133,7 @@ ALL_CLASSES = tuple(getattr(_isl, cls) for cls in dir(_isl) if cls[0].isupper()) EXPR_CLASSES = tuple(cls for cls in ALL_CLASSES if "Aff" in cls.__name__ or "Polynomial" in cls.__name__) -_DEFAULT_CONTEXT = Context() +DEFAULT_CONTEXT = Context() def _add_functionality(): @@ -149,7 +149,7 @@ def _add_functionality(): """ if context is None: - context = _DEFAULT_CONTEXT + context = DEFAULT_CONTEXT result = cls.read_from_str(context, s) result._made_from_string = True @@ -444,7 +444,7 @@ def _add_functionality(): def id_new(cls, name, user=None, context=None): if context is None: - context = _DEFAULT_CONTEXT + context = DEFAULT_CONTEXT result = cls.alloc(context, name, user) result._made_from_python = True @@ -748,7 +748,7 @@ def _add_functionality(): def val_new(cls, src, context=None): if context is None: - context = _DEFAULT_CONTEXT + context = DEFAULT_CONTEXT if isinstance(src, six.string_types): result = cls.read_from_str(context, src) @@ -962,9 +962,6 @@ def _add_functionality(): _add_functionality() -DEFAULT_CONTEXT = Context() - - def _back_to_basic(new_obj, old_obj): # Work around set_dim_id not being available for Basic{Set,Map} if isinstance(old_obj, BasicSet) and isinstance(new_obj, Set): -- GitLab From 9ab6e44423182ecd28df94f4d21ea7f1161c1945 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:08:05 -0500 Subject: [PATCH 14/41] Get pickling to work with pybind11 --- islpy/__init__.py | 45 ++++++++++++++++---- src/wrapper/wrap_isl.hpp | 76 +++++++++++++++++++++++++++++----- src/wrapper/wrap_isl_part1.cpp | 40 +++++++++--------- src/wrapper/wrap_isl_part2.cpp | 21 ++++++---- 4 files changed, 135 insertions(+), 47 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index d06b617..2eecc83 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -139,14 +139,35 @@ DEFAULT_CONTEXT = Context() def _add_functionality(): import islpy._isl as _isl # noqa + # {{{ Context + + def context_getstate(self): + if self._wraps_same_instance_as(DEFAULT_CONTEXT): + return ("default",) + else: + return (None,) + + def context_setstate(self, data): + if data[0] == "default": + self._reset_instance(DEFAULT_CONTEXT) + else: + self._reset_instance(Context()) + + Context.__getstate__ = context_getstate + Context.__setstate__ = context_setstate + + # }}} + # {{{ generic initialization, pickling - def obj_new_from_string(cls, s, context=None): + def obj_new_from_string(cls, s=None, context=None): """Construct a new object from :class:`str` s. :arg context: a :class:`islpy.Context` to use. If not supplied, use a global default context. """ + if s is None: + return cls._prev_new(cls) if context is None: context = DEFAULT_CONTEXT @@ -159,16 +180,26 @@ def _add_functionality(): assert self._made_from_string del self._made_from_string - def generic_getinitargs(self): - prn = Printer.to_str(self.get_ctx()) - getattr(prn, "print_"+self._base_name)(self) - return (prn.get_str(),) + def generic_getstate(self): + ctx = self.get_ctx() + prn = Printer.to_str(ctx) + prn = getattr(prn, "print_"+self._base_name)(self) + return (ctx, prn.get_str()) + + def generic_setstate(self, data): + ctx, new_str = data + self._prev_setstate(None) + self._steal_instance(self.read_from_str(ctx, new_str)) for cls in ALL_CLASSES: if hasattr(cls, "read_from_str"): - cls.__new__ = staticmethod(obj_new_from_string) + cls._prev_new = cls.__new__ + cls.__new__ = obj_new_from_string cls.__init__ = obj_bogus_init - cls.__getinitargs__ = generic_getinitargs + if hasattr(cls, "__setstate__") and cls is not Context: + cls.__getstate__ = generic_getstate + cls._prev_setstate = cls.__setstate__ + cls.__setstate__ = generic_setstate # }}} diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index c5d71d7..8651d1d 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -54,6 +54,15 @@ namespace isl typedef std::unordered_map ctx_use_map_t; extern ctx_use_map_t ctx_use_map; + inline void ref_ctx(isl_ctx *data) + { + ctx_use_map_t::iterator it(ctx_use_map.find(data)); + if (it == ctx_use_map.end()) + ctx_use_map[data] = 1; + else + ctx_use_map[data] += 1; + } + inline void deref_ctx(isl_ctx *ctx) { ctx_use_map[ctx] -= 1; @@ -89,10 +98,14 @@ namespace isl isl_##name *m_data; \ \ name(isl_##name *data) \ - : m_valid(true), m_data(data) \ + : m_valid(data != nullptr), m_data(data) \ + /* nullptr is passed to create a (temporarily invalid) instance during unpickling */ \ { \ - m_ctx = isl_##name##_get_ctx(data); \ - ctx_use_map[m_ctx] += 1; \ + if (data) \ + { \ + m_ctx = isl_##name##_get_ctx(data); \ + ctx_use_map[m_ctx] += 1; \ + } \ } \ \ void invalidate() \ @@ -113,6 +126,24 @@ namespace isl isl_##name##_free(m_data); \ deref_ctx(m_ctx); \ } \ + } \ + \ + void steal_instance(name &other) \ + { \ + if (m_valid) \ + { \ + isl_##name##_free(m_data); \ + deref_ctx(m_ctx); \ + m_valid = false; \ + } \ + m_valid = other.m_valid; \ + if (m_valid) \ + { \ + m_ctx = other.m_ctx; \ + ref_ctx(m_ctx); \ + m_data = other.m_data; \ + other.invalidate(); \ + } \ } struct ctx \ @@ -123,21 +154,30 @@ namespace isl ctx(isl_ctx *data) : m_data(data) { - ctx_use_map_t::iterator it(ctx_use_map.find(m_data)); - if (it == ctx_use_map.end()) - ctx_use_map[data] = 1; - else - ctx_use_map[m_data] += 1; + ref_ctx(data); } bool is_valid() const { return true; } + ~ctx() { deref_ctx(m_data); } + + void reset_instance(ctx &other) + { + ref_ctx(other.m_data); + deref_ctx(m_data); + m_data = other.m_data; + } + + bool wraps_same_instance_as(ctx const &other) + { + return m_data == other.m_data; + } }; // matches order in gen_wrap.py @@ -279,8 +319,24 @@ namespace isl #define MAKE_WRAP(name, py_name) \ py::class_ wrap_##name(m, #py_name, py::dynamic_attr()); \ - wrap_##name.def("is_valid", &isl::name::is_valid, "Return whether current object is still valid."); \ + wrap_##name.def("_is_valid", &isl::name::is_valid); \ wrap_##name.attr("_base_name") = #name; \ - wrap_##name.attr("_isl_name") = "isl_"#name; + wrap_##name.attr("_isl_name") = "isl_"#name; \ + wrap_##name.def("_steal_instance", &isl::name::steal_instance); \ + +#define WRAP_ENABLE_PICKLING(name) \ + wrap_##name.def(py::pickle( \ + [](isl::name const &p) /* __getstate__ */ \ + { \ + std::cerr << "__getstate__ called for islpy object : should never happen" << std::endl; \ + abort(); \ + return py::none(); \ + }, \ + [](py::none obj) /* __setstate__ */ \ + { \ + std::cerr << "__getstate__ called for islpy object : should never happen" << std::endl; \ + return isl::name(nullptr); \ + } \ + )) // vim: foldmethod=marker diff --git a/src/wrapper/wrap_isl_part1.cpp b/src/wrapper/wrap_isl_part1.cpp index 31bf785..9b9ccce 100644 --- a/src/wrapper/wrap_isl_part1.cpp +++ b/src/wrapper/wrap_isl_part1.cpp @@ -45,18 +45,9 @@ void islpy_expose_part1(py::module &m) })); wrap_ctx.attr("_base_name") = "ctx"; wrap_ctx.attr("_isl_name") = "isl_ctx"; - } - -#define CONST(NAME) cls.attr(#NAME) = ISL_##NAME - { - py::class_ cls(m, "constants"); - CONST(BOUND_BERNSTEIN); - CONST(BOUND_RANGE); - CONST(ON_ERROR_WARN); - CONST(ON_ERROR_CONTINUE); - CONST(ON_ERROR_ABORT); - CONST(SCHEDULE_ALGORITHM_ISL); - CONST(SCHEDULE_ALGORITHM_FEAUTRIER); + wrap_ctx.def("_is_valid", &cls::is_valid); + wrap_ctx.def("_reset_instance", &cls::reset_instance); + wrap_ctx.def("_wraps_same_instance_as", &cls::wraps_same_instance_as); } // {{{ lists @@ -97,25 +88,31 @@ void islpy_expose_part1(py::module &m) MAKE_WRAP(fixed_box, FixedBox); MAKE_WRAP(aff, Aff); - // wrap_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(aff); MAKE_WRAP(pw_aff, PwAff); wrap_pw_aff.def(py::init()); - // wrap_pw_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(pw_aff); MAKE_WRAP(union_pw_aff, UnionPwAff); - // wrap_union_pw_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(union_pw_aff); + MAKE_WRAP(multi_id, MultiId); + MAKE_WRAP(multi_aff, MultiAff); - // wrap_multi_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(multi_aff); + MAKE_WRAP(multi_pw_aff, MultiPwAff); - // wrap_multi_pw_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(multi_pw_aff); + MAKE_WRAP(pw_multi_aff, PwMultiAff); - // wrap_pw_multi_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(pw_multi_aff); + MAKE_WRAP(union_pw_multi_aff, UnionPwMultiAff); - // wrap_union_pw_multi_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(union_pw_multi_aff); + MAKE_WRAP(multi_union_pw_aff, MultiUnionPwAff); - // wrap_multi_union_pw_aff.enable_pickling(); + WRAP_ENABLE_PICKLING(multi_union_pw_aff); MAKE_WRAP(id, Id); wrap_id.def("__eq__", islpy::id_eq, py::arg("other"), @@ -130,7 +127,8 @@ void islpy_expose_part1(py::module &m) ":return: bool "); MAKE_WRAP(constraint, Constraint); - // wrap_constraint.enable_pickling(); + WRAP_ENABLE_PICKLING(constraint); + MAKE_WRAP(space, Space); MAKE_WRAP(local_space, LocalSpace); wrap_local_space.def(py::init()); diff --git a/src/wrapper/wrap_isl_part2.cpp b/src/wrapper/wrap_isl_part2.cpp index 485d73c..7a88e1e 100644 --- a/src/wrapper/wrap_isl_part2.cpp +++ b/src/wrapper/wrap_isl_part2.cpp @@ -8,33 +8,36 @@ namespace isl void islpy_expose_part2(py::module &m) { MAKE_WRAP(basic_set, BasicSet); - // wrap_basic_set.enable_pickling(); + WRAP_ENABLE_PICKLING(basic_set); MAKE_WRAP(basic_map, BasicMap); - // wrap_basic_map.enable_pickling(); + WRAP_ENABLE_PICKLING(basic_map); MAKE_WRAP(set, Set); wrap_set.def(py::init()); - // wrap_set.enable_pickling(); + WRAP_ENABLE_PICKLING(set); MAKE_WRAP(map, Map); wrap_map.def(py::init()); - // wrap_map.enable_pickling(); + WRAP_ENABLE_PICKLING(map); MAKE_WRAP(union_set, UnionSet); wrap_union_set.def(py::init()); - // wrap_union_set.enable_pickling(); + WRAP_ENABLE_PICKLING(union_set); MAKE_WRAP(union_map, UnionMap); wrap_union_map.def(py::init()); - // wrap_union_map.enable_pickling(); + WRAP_ENABLE_PICKLING(union_map); MAKE_WRAP(point, Point); - // wrap_point.enable_pickling(); + WRAP_ENABLE_PICKLING(point); + MAKE_WRAP(vertex, Vertex); - // wrap_vertex.enable_pickling(); + WRAP_ENABLE_PICKLING(vertex); + MAKE_WRAP(cell, Cell); - // wrap_cell.enable_pickling(); + WRAP_ENABLE_PICKLING(cell); + MAKE_WRAP(vertices, Vertices); MAKE_WRAP(stride_info, StrideInfo); -- GitLab From 127d1b20df55fe2e8a69df8d7f04a5a64fe11d99 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:12:56 -0500 Subject: [PATCH 15/41] Fix test_copy_context --- test/test_isl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_isl.py b/test/test_isl.py index 3902ddc..9bed1fb 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -358,8 +358,8 @@ def test_bound(): def test_copy_context(): ctx = isl.Context() import copy - assert copy.copy(ctx).data != ctx.data - assert copy.copy(ctx).data != isl.DEFAULT_CONTEXT.data + assert not ctx._wraps_same_instance_as(copy.copy(ctx)) + assert not isl.DEFAULT_CONTEXT._wraps_same_instance_as(copy.copy(ctx)) def test_ast_node_list_free(): -- GitLab From b7833493d3374ec02c0d1bb275d2da73a3f52ce9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:15:13 -0500 Subject: [PATCH 16/41] Don't print error in C++ __setstate__ --- src/wrapper/wrap_isl.hpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index 8651d1d..e7ede98 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -328,13 +328,11 @@ namespace isl wrap_##name.def(py::pickle( \ [](isl::name const &p) /* __getstate__ */ \ { \ - std::cerr << "__getstate__ called for islpy object : should never happen" << std::endl; \ - abort(); \ + throw isl::error("__getstate__ called for islpy object"); \ return py::none(); \ }, \ [](py::none obj) /* __setstate__ */ \ { \ - std::cerr << "__getstate__ called for islpy object : should never happen" << std::endl; \ return isl::name(nullptr); \ } \ )) -- GitLab From 7a936895e42a14275ff23327b1aeadfe834a7a3c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:30:44 -0500 Subject: [PATCH 17/41] Simplify test_error_on_invalid_index --- test/test_isl.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/test_isl.py b/test/test_isl.py index 9bed1fb..3cf0f79 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -58,12 +58,8 @@ def test_error_on_invalid_index(): my_set = isl.Set("{ [k, l] : 3l >= -k and 3l <= 10 - k " "and k >=0 and k <= 2 }", context=ctx) p = my_set.sample_point() - try: + with pytest.raises(isl.Error): p.get_coordinate_val(isl.dim_type.set, 99999999) - except isl.Error: - pass - else: - assert False def test_pwqpoly(): -- GitLab From 3629472f27a3ea4bacf9ab6397ca8e5f1bda8157 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 19:31:14 -0500 Subject: [PATCH 18/41] Improve implicit cast constructor --- src/wrapper/wrap_isl.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index e7ede98..9ea1df9 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -81,13 +81,13 @@ namespace isl \ isl_##from_type *copy = isl_##from_type##_copy(data.m_data); \ if (!copy) \ - throw std::runtime_error("isl_" #from_type "_copy failed"); \ + throw error("isl_" #from_type "_copy failed"); \ m_data = cast_func(copy); \ if (!m_data) \ - throw std::runtime_error(#cast_func " failed"); \ + throw error(#cast_func " failed"); \ \ m_valid = true; \ - ctx_use_map[m_ctx] += 1; \ + ref_ctx(m_ctx); } #define WRAP_CLASS_CONTENT(name) \ -- GitLab From dcc91cc871c1baf6f7a0a7a726dd666183e66f3f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 22:42:55 -0500 Subject: [PATCH 19/41] Add missing backslash in conversion constructor --- src/wrapper/wrap_isl.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index 9ea1df9..af76235 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -87,7 +87,7 @@ namespace isl throw error(#cast_func " failed"); \ \ m_valid = true; \ - ref_ctx(m_ctx); + ref_ctx(m_ctx); \ } #define WRAP_CLASS_CONTENT(name) \ -- GitLab From d74a87486c232300c867f59549213b40c5d807ea Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 23:29:48 -0500 Subject: [PATCH 20/41] Make object construction work for both cast constructors and from-string construction --- islpy/__init__.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index 2eecc83..531e9e9 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -160,25 +160,24 @@ def _add_functionality(): # {{{ generic initialization, pickling - def obj_new_from_string(cls, s=None, context=None): + def obj_new(cls, s=None, context=None): """Construct a new object from :class:`str` s. :arg context: a :class:`islpy.Context` to use. If not supplied, use a global default context. """ - if s is None: + if not isinstance(s, str): return cls._prev_new(cls) if context is None: context = DEFAULT_CONTEXT result = cls.read_from_str(context, s) - result._made_from_string = True return result def obj_bogus_init(self, s, context=None): - assert self._made_from_string - del self._made_from_string + if not isinstance(s, str) and self._prev_init is not None: + self._prev_init(s) def generic_getstate(self): ctx = self.get_ctx() @@ -194,7 +193,8 @@ def _add_functionality(): for cls in ALL_CLASSES: if hasattr(cls, "read_from_str"): cls._prev_new = cls.__new__ - cls.__new__ = obj_new_from_string + cls.__new__ = obj_new + cls._prev_init = getattr(cls, "__init__", None) cls.__init__ = obj_bogus_init if hasattr(cls, "__setstate__") and cls is not Context: cls.__getstate__ = generic_getstate -- GitLab From 9b02791200d36615bb4f8cccfbf5a8901344e00c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 23:30:23 -0500 Subject: [PATCH 21/41] Add test_upcast --- test/test_isl.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_isl.py b/test/test_isl.py index 3cf0f79..5a324e2 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -90,6 +90,14 @@ def test_val(): assert v.to_python() == 17 +def test_upcast(): + a = isl.PwAff("[n] -> { [(-1 - floor((-n)/4))] }") + b = isl.Aff("[n] -> { [(-1 - floor((-n)/4))] }") + + assert b.is_equal(a) + assert a.is_equal(b) + + def test_pickling(): instances = [ isl.Aff("[n] -> { [(-1 - floor((-n)/4))] }"), -- GitLab From fc2ada297fb90bd0bb14e0df9a7efa93c31fdb26 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 23:30:31 -0500 Subject: [PATCH 22/41] Fix test_codegen to not rely on mutation --- test/test_isl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_isl.py b/test/test_isl.py index 5a324e2..bf99538 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -250,7 +250,7 @@ def test_codegen(): ast = b.ast_from_schedule(m) p = isl.Printer.to_str(isl.DEFAULT_CONTEXT) p = p.set_output_format(isl.format.C) - p.flush() + p = p.flush() p = p.print_ast_node(ast) return p.get_str() -- GitLab From 44e4fde702aaea671275e8a73129820b2bac07a8 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 23:50:17 -0500 Subject: [PATCH 23/41] Enable Context comparisons --- islpy/__init__.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/islpy/__init__.py b/islpy/__init__.py index 531e9e9..7dc06df 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -153,8 +153,16 @@ def _add_functionality(): else: self._reset_instance(Context()) + def context_eq(self, other): + return isinstance(other, Context) and self._wraps_same_instance_as(other) + + def context_ne(self, other): + return not self.__eq__(other) + Context.__getstate__ = context_getstate Context.__setstate__ = context_setstate + Context.__eq__ = context_eq + Context.__ne__ = context_ne # }}} -- GitLab From 5e4c75659fcd70922b1ddbddc3eb805bd4e81c92 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Sun, 28 Jun 2020 23:50:37 -0500 Subject: [PATCH 24/41] Make sure first-arg upcasts are defined before rich comparisons are added --- islpy/__init__.py | 76 +++++++++++++++++++++++++++-------------------- 1 file changed, 43 insertions(+), 33 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index 7dc06df..c172ea6 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -231,39 +231,6 @@ def _add_functionality(): # }}} - # {{{ rich comparisons - - def obj_eq(self, other): - return self.is_equal(other) - - def obj_ne(self, other): - return not self.is_equal(other) - - for cls in ALL_CLASSES: - if hasattr(cls, "is_equal"): - cls.__eq__ = obj_eq - cls.__ne__ = obj_ne - - def obj_lt(self, other): - return self.is_strict_subset(other) - - def obj_le(self, other): - return self.is_subset(other) - - def obj_gt(self, other): - return other.is_strict_subset(self) - - def obj_ge(self, other): - return other.is_subset(self) - - for cls in [BasicSet, BasicMap, Set, Map]: - cls.__lt__ = obj_lt - cls.__le__ = obj_le - cls.__gt__ = obj_gt - cls.__ge__ = obj_ge - - # }}} - # {{{ Python set-like behavior def obj_or(self, other): @@ -907,6 +874,49 @@ def _add_functionality(): # }}} + # ORDERING DEPENDENCY: The availability of some of the 'is_equal' + # used by rich comparison below depends on the self upcasts created + # above. + + # {{{ rich comparisons + + def obj_eq(self, other): + assert self.get_ctx() == other.get_ctx(), ( + "Equality-comparing two objects from different ISL Contexts " + "will likely lead to entertaining (but never useful) results. " + "In particular, Spaces with matching names will no longer be " + "equal.") + + return self.is_equal(other) + + def obj_ne(self, other): + return not self.__eq__(other) + + for cls in ALL_CLASSES: + if hasattr(cls, "is_equal"): + cls.__eq__ = obj_eq + cls.__ne__ = obj_ne + + def obj_lt(self, other): + return self.is_strict_subset(other) + + def obj_le(self, other): + return self.is_subset(other) + + def obj_gt(self, other): + return other.is_strict_subset(self) + + def obj_ge(self, other): + return other.is_subset(self) + + for cls in [BasicSet, BasicMap, Set, Map]: + cls.__lt__ = obj_lt + cls.__le__ = obj_le + cls.__gt__ = obj_gt + cls.__ge__ = obj_ge + + # }}} + # {{{ project_out_except def obj_project_out_except(obj, names, types): -- GitLab From f7291e0e2a375ca99b687b87ee47d775b65ca0a9 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:30:50 -0500 Subject: [PATCH 25/41] MANIFEST: ship build-with-barvinok.sh --- MANIFEST.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index 63e3a69..e1fdb3d 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -10,7 +10,8 @@ include isl/include/isl/deprecated/*.h include isl-supplementary/isl/*.h include isl-supplementary/*.h -include isl_declaration_macros_expanded_v*.h +include build-with-barvinok.sh + include preproc-headers/* include src/wrapper/*.h -- GitLab From f50efd22636df54dd1caf0eeeb2c1c9b79b03140 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:31:05 -0500 Subject: [PATCH 26/41] MANIFEST: Remove bpl leftovers --- MANIFEST.in | 2 -- 1 file changed, 2 deletions(-) diff --git a/MANIFEST.in b/MANIFEST.in index e1fdb3d..190d35e 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -39,5 +39,3 @@ include README.rst include isl/LICENSE include isl/imath/LICENSE -recursive-include bpl-subset/bpl_subset/boost *.h *.hpp *.cpp *.html *.inl *.ipp *.pl *.txt -recursive-include bpl-subset/bpl_subset/libs *.h *.hpp *.cpp *.html *.inl *.ipp *.pl *.txt -- GitLab From 58d55d6ce274afc285e06d7dc9b1ce4a5da6838c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:31:37 -0500 Subject: [PATCH 27/41] Implement hashing based on isl or string functionality --- islpy/__init__.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/islpy/__init__.py b/islpy/__init__.py index c172ea6..e6386cc 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -224,11 +224,23 @@ def _add_functionality(): return "%s(\"%s\")" % ( type(self).__name__, prn.get_str()) + def generic_hash(self): + return hash((type(self), str(self))) + + def generic_isl_hash(self): + return self.get_hash() + for cls in ALL_CLASSES: if hasattr(cls, "_base_name") and hasattr(Printer, "print_"+cls._base_name): cls.__str__ = generic_str cls.__repr__ = generic_repr + if not hasattr(cls, "get_hash"): + cls.__hash__ = generic_hash + + if hasattr(cls, "get_hash"): + cls.__hash__ = generic_isl_hash + # }}} # {{{ Python set-like behavior -- GitLab From 82adbbace19029692af4611ff25b5178dd19e627 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:36:50 -0500 Subject: [PATCH 28/41] gen_wrap: Add some sectioning comments to return value processing --- gen_wrap.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gen_wrap.py b/gen_wrap.py index 93a4e58..d844006 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1024,6 +1024,8 @@ def write_wrapper(outf, meth): # {{{ return value processing if meth.return_base_type in ["int", "isl_stat"] and not meth.return_ptr: + # {{{ error code + body.append(""" #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) if (result == isl_stat_error) @@ -1051,7 +1053,11 @@ def write_wrapper(outf, meth): else: body.append("return result;") + # }}} + elif meth.return_base_type == "isl_bool" and not meth.return_ptr: + # {{{ bool + body.append(""" if (result == isl_bool_error) { @@ -1073,13 +1079,19 @@ def write_wrapper(outf, meth): else: body.append("return result;") + # }}} + elif meth.return_base_type in SAFE_TYPES and not meth.return_ptr: + # {{{ enums etc + if extra_ret_vals: raise NotImplementedError("extra ret val with safe type") body.append("return result;") ret_descr = processed_return_type + # }}} + elif meth.return_base_type.startswith("isl_"): assert meth.return_ptr == "*", meth -- GitLab From fb7c444392977b9979aa55a07586a75c1a8af16a Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:37:36 -0500 Subject: [PATCH 29/41] gen_wrap: Allow isl_bool as (exact,tight) extra return values --- gen_wrap.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index d844006..d0a19b2 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -818,12 +818,16 @@ def write_wrapper(outf, meth): docs.append(":param %s: string" % arg.name) - elif arg.base_type == "int" and arg.ptr == "*": + elif arg.base_type in ["int", "isl_bool"] and arg.ptr == "*": if arg.name in ["exact", "tight"]: - body.append("int arg_%s;" % arg.name) + body.append("%s arg_%s;" % (arg.base_type, arg.name)) passed_args.append("&arg_%s" % arg.name) - extra_ret_vals.append("arg_%s" % arg.name) - extra_ret_descrs.append("%s (integer)" % arg.name) + if arg.base_type == "isl_bool": + extra_ret_vals.append("(bool) arg_%s" % arg.name) + else: + extra_ret_vals.append("arg_%s" % arg.name) + extra_ret_descrs.append("%s (%s)" % ( + arg.name, to_py_class(arg.base_type))) arg_names.pop() else: raise SignatureNotSupported("int *") -- GitLab From 3c51988be17179280f5dabc0e8e751a97b6da5df Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:38:15 -0500 Subject: [PATCH 30/41] Use unique_ptr for exception safety when returning isl objects --- gen_wrap.py | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index d0a19b2..f8b668f 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1114,7 +1114,7 @@ def write_wrapper(outf, meth): else: processed_return_type = "py::object" isl_obj_ret_val = \ - "py::object(handle_from_new_ptr(new %s(result)))" % ret_cls + "handle_from_new_ptr(uptr_result.release())" if extra_ret_vals: isl_obj_ret_val = "py::make_tuple(%s, %s)" % ( @@ -1133,17 +1133,13 @@ def write_wrapper(outf, meth): body.append(""" if (result) { - try - { return %(ret_val)s; } - catch (...) - { - isl_%(ret_cls)s_free(result); - throw; - } + std::unique_ptr + uptr_result(new %(ret_cls)s(result)); + return %(ret_val)s; } else { - throw isl::error("call to isl_%(cls)s_%(name)s failed"); + throw isl::error("call to isl_%(cls)s_%(name)s failed"); } """ % { "ret_cls": ret_cls, -- GitLab From 3981037b9372fe85dc3bcedc9a1652000a3d3d7c Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 10:47:08 -0500 Subject: [PATCH 31/41] gen_wrap: Fix unique_ptr use for isl object extra return values --- gen_wrap.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index f8b668f..9d32cc7 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -972,9 +972,7 @@ def write_wrapper(outf, meth): { std::unique_ptr<%(ret_cls)s> auto_ret_%(name)s( new %(ret_cls)s(ret_%(name)s)); - py_ret_%(name)s = py::object( - handle_from_new_ptr(auto_ret_%(name)s.get())); - auto_ret_%(name)s.release(); + py_ret_%(name)s = handle_from_new_ptr(auto_ret_%(name)s.release()); } """ % dict(name=arg.name, ret_cls=ret_cls)) -- GitLab From 3161ca53436159ec55cd5893db09b3229b9ebb4f Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 11:01:13 -0500 Subject: [PATCH 32/41] gen_wrap: Code shuffle, sectioning comments --- gen_wrap.py | 96 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 42 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index 9d32cc7..ecb751a 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -51,6 +51,47 @@ def for lambda try """.split() +class Retry(RuntimeError): + pass + + +class BadArg(ValueError): + pass + + +class Undocumented(ValueError): + pass + + +class SignatureNotSupported(ValueError): + pass + + +def to_py_class(cls): + if cls.startswith("isl_"): + cls = cls[4:] + + if cls == "ctx": + return "Context" + + upper_next = True + result = "" + + for c in cls: + if c == "_": + upper_next = True + else: + if upper_next: + result += c.upper() + upper_next = False + else: + result += c + + result = result.replace("Qpoly", "QPoly") + + return result + + # {{{ data model class Argument: @@ -220,7 +261,7 @@ SAFE_TYPES = list(ENUMS) + ["int", "unsigned", "uint32_t", "size_t", "double", "long", "unsigned long", "isl_size"] SAFE_IN_TYPES = SAFE_TYPES + ["const char *", "char *"] -# {{{ parser +# {{{ parser helpers DECL_RE = re.compile(r""" (?:__isl_overload\s*)? @@ -285,47 +326,6 @@ def split_at_unparenthesized_commas(s): yield s[last_start:i] -def to_py_class(cls): - if cls.startswith("isl_"): - cls = cls[4:] - - if cls == "ctx": - return "Context" - - upper_next = True - result = "" - - for c in cls: - if c == "_": - upper_next = True - else: - if upper_next: - result += c.upper() - upper_next = False - else: - result += c - - result = result.replace("Qpoly", "QPoly") - - return result - - -class Retry(RuntimeError): - pass - - -class BadArg(ValueError): - pass - - -class Undocumented(ValueError): - pass - - -class SignatureNotSupported(ValueError): - pass - - def parse_arg(arg): if "(*" in arg: arg_match = FUNC_PTR_RE.match(arg) @@ -394,6 +394,10 @@ def preprocess_with_macros(macro_header_contents, code): return sio_output.getvalue() +# }}} + + +# {{{ FunctionData (includes parser) class FunctionData: def __init__(self, include_dirs): @@ -467,6 +471,8 @@ class FunctionData: return prepro_header + # {{{ read_header + def read_header(self, fname): lines = self.get_preprocessed_header(fname).split("\n") @@ -541,6 +547,10 @@ class FunctionData: if not STRUCT_DECL_RE.search(decl): self.parse_decl(decl) + # }}} + + # {{{ parse_decl + def parse_decl(self, decl): decl_match = DECL_RE.match(decl) if decl_match is None: @@ -664,6 +674,8 @@ class FunctionData: self.seen_c_names.add(c_name) + # }}} + # }}} -- GitLab From bddba06a2ecd6a5d3ebc15c75047f5e96dd65017 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 11:01:39 -0500 Subject: [PATCH 33/41] Generate wrappers for context methods --- gen_wrap.py | 1 + src/wrapper/wrap_isl_part1.cpp | 45 ++++++++++++++++------------------ 2 files changed, 22 insertions(+), 24 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index ecb751a..a3445d6 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -177,6 +177,7 @@ PART_TO_CLASSES = { "id_to_ast_expr", # others + "ctx", "printer", "val", "multi_val", "vec", "mat", "fixed_box", "aff", "pw_aff", "union_pw_aff", "multi_aff", "multi_pw_aff", "pw_multi_aff", "union_pw_multi_aff", diff --git a/src/wrapper/wrap_isl_part1.cpp b/src/wrapper/wrap_isl_part1.cpp index 9b9ccce..d7c6515 100644 --- a/src/wrapper/wrap_isl_part1.cpp +++ b/src/wrapper/wrap_isl_part1.cpp @@ -22,33 +22,30 @@ namespace islpy void islpy_expose_part1(py::module &m) { - { - typedef isl::ctx cls; - py::class_ > - wrap_ctx(m, "Context"); - wrap_ctx.def(py::init( - []() + py::class_ > + wrap_ctx(m, "Context"); + wrap_ctx.def(py::init( + []() + { + isl_ctx *result = isl_ctx_alloc(); + if (result) { - isl_ctx *result = isl_ctx_alloc(); - if (result) + try + { return new isl::ctx(result); } + catch (...) { - try - { return new isl::ctx(result); } - catch (...) - { - isl_ctx_free(result); - throw; - } + isl_ctx_free(result); + throw; } - else - PYTHON_ERROR(RuntimeError, "failed to create context"); - })); - wrap_ctx.attr("_base_name") = "ctx"; - wrap_ctx.attr("_isl_name") = "isl_ctx"; - wrap_ctx.def("_is_valid", &cls::is_valid); - wrap_ctx.def("_reset_instance", &cls::reset_instance); - wrap_ctx.def("_wraps_same_instance_as", &cls::wraps_same_instance_as); - } + } + else + PYTHON_ERROR(RuntimeError, "failed to create context"); + })); + wrap_ctx.attr("_base_name") = "ctx"; + wrap_ctx.attr("_isl_name") = "isl_ctx"; + wrap_ctx.def("_is_valid", &isl::ctx::is_valid); + wrap_ctx.def("_reset_instance", &isl::ctx::reset_instance); + wrap_ctx.def("_wraps_same_instance_as", &isl::ctx::wraps_same_instance_as); // {{{ lists -- GitLab From 6b76817cd9c57a465cfd5c33155b0a0dfbca9703 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 11:14:10 -0500 Subject: [PATCH 34/41] Use a different filtering scheme for static methods in auto-upcasts --- islpy/__init__.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index e6386cc..85acf32 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -838,7 +838,6 @@ def _add_functionality(): def add_upcasts(basic_class, special_class, upcast_method): from functools import update_wrapper - from inspect import ismethod for method_name in dir(special_class): # do not overwrite existing methods @@ -847,13 +846,11 @@ def _add_functionality(): method = getattr(special_class, method_name) - my_ismethod = ismethod(method) + my_ismethod = callable(method) for meth_superclass in type(method).__mro__: - if "instancemethod" in meth_superclass.__name__: - # inspect.ismethod does not work on pybind11 callables, - # hence this hack. - my_ismethod = True - break + # Here we're desperately trying to filter out static methods. + if "builtin_function_or_method" in meth_superclass.__name__: + my_ismethod = False if my_ismethod: def make_wrapper(method, upcast): -- GitLab From 507ee2d8fcf29231542c765d49c0c1684e53f1be Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 12:35:30 -0500 Subject: [PATCH 35/41] Revert "Fix test_codegen to not rely on mutation" This reverts commit fc2ada297fb90bd0bb14e0df9a7efa93c31fdb26. --- test/test_isl.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_isl.py b/test/test_isl.py index bf99538..5a324e2 100644 --- a/test/test_isl.py +++ b/test/test_isl.py @@ -250,7 +250,7 @@ def test_codegen(): ast = b.ast_from_schedule(m) p = isl.Printer.to_str(isl.DEFAULT_CONTEXT) p = p.set_output_format(isl.format.C) - p = p.flush() + p.flush() p = p.print_ast_node(ast) return p.get_str() -- GitLab From 6401b0f45c535da4850ea425024feaf6f39a06f4 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 12:46:15 -0500 Subject: [PATCH 36/41] Revive mutation semantics for pybind11 --- gen_wrap.py | 121 +++++++++++++++++++-------------------- islpy/__init__.py | 4 +- src/wrapper/wrap_isl.hpp | 46 ++++++++------- 3 files changed, 86 insertions(+), 85 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index a3445d6..d0a681c 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -135,8 +135,6 @@ class Method: @property def is_mutator(self): - # FIXME - return False return (not self.is_static and self.args[0].semantics is SEM_TAKE and self.return_ptr == "*" == self.args[0].ptr @@ -904,64 +902,67 @@ def write_wrapper(outf, meth): elif arg.base_type.startswith("isl_") and arg.ptr == "*": # {{{ isl types input arguments - need_nonconst = False - arg_cls = arg.base_type[4:] arg_descr = ":param %s: :class:`%s`" % (arg.name, to_py_class(arg_cls)) - if arg.semantics is None and arg.base_type != "isl_ctx": - raise Undocumented(meth) - - checks.append(""" - if (!arg_%(name)s.is_valid()) - throw isl::error( - "passed invalid arg to isl_%(meth)s for %(name)s"); - """ % dict(name=arg.name, meth="%s_%s" % (meth.cls, meth.name))) - - copyable = arg_cls not in NON_COPYABLE - if arg.semantics is SEM_TAKE: - if copyable: - checks.append(""" - if (!arg_%(name)s.is_valid()) - throw isl::error( - "passed invalid arg to isl_%(meth)s for %(name)s"); - std::unique_ptr<%(cls)s> auto_arg_%(name)s; - { - isl_%(cls)s *tmp_ptr = - isl_%(cls)s_copy(arg_%(name)s.m_data); - if (!tmp_ptr) - throw isl::error("failed to copy arg " - "%(name)s on entry to %(meth)s"); - auto_arg_%(name)s = std::unique_ptr<%(cls)s>( - new %(cls)s(tmp_ptr)); - } - """ % dict( - name=arg.name, - meth="%s_%s" % (meth.cls, meth.name), - cls=arg_cls)) - - post_call.append("auto_arg_%s.release();" % arg.name) - passed_args.append("auto_arg_%s->m_data" % arg.name) - - else: - need_nonconst = True - - if not (arg_idx == 0 and meth.is_mutator): - post_call.append("arg_%s.invalidate();" % arg.name) + if arg_idx == 0 and meth.is_mutator: + arg_descr += " (mutated in-place)" + input_args.append("py::object py_%s" % arg.name) + checks.append(""" + isl::%(cls)s &arg_%(name)s( + py::cast(py_%(name)s)); + if (!arg_%(name)s.is_valid()) + throw isl::error( + "passed invalid arg to isl_%(meth)s for %(name)s"); + """ % dict( + name=arg.name, + meth="%s_%s" % (meth.cls, meth.name), + cls=arg_cls)) + passed_args.append("arg_%s.m_data" % arg.name) + post_call.append("arg_%s.invalidate();" % arg.name) + arg_descr += " (mutated in-place)" - passed_args.append("arg_%s.m_data" % arg.name) + else: + if arg.semantics is None and arg.base_type != "isl_ctx": + raise Undocumented(meth) + + checks.append(""" + if (!arg_%(name)s.is_valid()) + throw isl::error( + "passed invalid arg to isl_%(meth)s for %(name)s"); + """ % dict(name=arg.name, meth="%s_%s" % (meth.cls, meth.name))) + + if arg.semantics is SEM_TAKE: + if arg_cls not in NON_COPYABLE: + input_args.append( + "%s const &%s" % (arg_cls, "arg_"+arg.name)) + checks.append(""" + std::unique_ptr<%(cls)s> auto_arg_%(name)s; + { + isl_%(cls)s *tmp_ptr = + isl_%(cls)s_copy(arg_%(name)s.m_data); + if (!tmp_ptr) + throw isl::error("failed to copy arg " + "%(name)s on entry to %(meth)s"); + auto_arg_%(name)s = std::unique_ptr<%(cls)s>( + new %(cls)s(tmp_ptr)); + } + """ % dict( + name=arg.name, + meth="%s_%s" % (meth.cls, meth.name), + cls=arg_cls)) + + post_call.append("auto_arg_%s.release();" % arg.name) + passed_args.append("auto_arg_%s->m_data" % arg.name) - if arg_idx == 0 and meth.is_mutator: - arg_descr += " (mutated in-place)" else: + input_args.append("%s &%s" % (arg_cls, "arg_"+arg.name)) + post_call.append("arg_%s.invalidate();" % arg.name) + passed_args.append("arg_%s.m_data" % arg.name) arg_descr += " (:ref:`becomes invalid `)" - else: - passed_args.append("arg_%s.m_data" % arg.name) - - if need_nonconst: - input_args.append("%s &%s" % (arg_cls, "arg_"+arg.name)) - else: - input_args.append("%s const &%s" % (arg_cls, "arg_"+arg.name)) + else: + passed_args.append("arg_%s.m_data" % arg.name) + input_args.append("%s const &%s" % (arg_cls, "arg_"+arg.name)) docs.append(arg_descr) @@ -1117,9 +1118,9 @@ def write_wrapper(outf, meth): meth.mutator_veto = True raise Retry() - processed_return_type = "isl::%s &" % ret_cls - body.append("arg_%s.m_data = result;" % meth.args[0].name) - body.append("return arg_%s;" % meth.args[0].name) + processed_return_type = "py::object" + body.append("arg_%s.take_possession_of(result);" % meth.args[0].name) + body.append("return py_%s;" % meth.args[0].name) ret_descr = ":class:`%s` (self)" % to_py_class(ret_cls) else: @@ -1252,18 +1253,12 @@ def write_exposer(outf, meth, arg_names, doc_str): doc_str_arg = ", \"%s\"" % doc_str.replace("\n", "\\n") - extra_stuff = args_str+doc_str_arg - if meth.is_mutator: - # FIXME - raise NotImplementedError - extra_stuff = extra_stuff+", py::return_self<>()" - wrap_class = CLASS_MAP.get(meth.cls, meth.cls) for exp_py_name in [py_name]+extra_py_names: outf.write("wrap_%s.def%s(\"%s\", %s%s);\n" % ( wrap_class, "_static" if meth.is_static else "", - exp_py_name, func_name, extra_stuff)) + exp_py_name, func_name, args_str+doc_str_arg)) # }}} diff --git a/islpy/__init__.py b/islpy/__init__.py index 85acf32..4d6a50a 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -215,12 +215,12 @@ def _add_functionality(): def generic_str(self): prn = Printer.to_str(self.get_ctx()) - prn = getattr(prn, "print_"+self._base_name)(self) + getattr(prn, "print_"+self._base_name)(self) return prn.get_str() def generic_repr(self): prn = Printer.to_str(self.get_ctx()) - prn = getattr(prn, "print_"+self._base_name)(self) + getattr(prn, "print_"+self._base_name)(self) return "%s(\"%s\")" % ( type(self).__name__, prn.get_str()) diff --git a/src/wrapper/wrap_isl.hpp b/src/wrapper/wrap_isl.hpp index af76235..97c0908 100644 --- a/src/wrapper/wrap_isl.hpp +++ b/src/wrapper/wrap_isl.hpp @@ -98,20 +98,20 @@ namespace isl isl_##name *m_data; \ \ name(isl_##name *data) \ - : m_valid(data != nullptr), m_data(data) \ - /* nullptr is passed to create a (temporarily invalid) instance during unpickling */ \ + : m_valid(false), m_data(nullptr) \ + /* passing nullptr is allowed to create a (temporarily invalid) */ \ + /* instance during unpickling */ \ { \ - if (data) \ - { \ - m_ctx = isl_##name##_get_ctx(data); \ - ctx_use_map[m_ctx] += 1; \ - } \ + take_possession_of(data); \ } \ \ void invalidate() \ { \ - deref_ctx(m_ctx); \ - m_valid = false; \ + if (m_valid) \ + { \ + deref_ctx(m_ctx); \ + m_valid = false; \ + } \ } \ \ bool is_valid() const \ @@ -121,14 +121,10 @@ namespace isl \ ~name() \ { \ - if (m_valid) \ - { \ - isl_##name##_free(m_data); \ - deref_ctx(m_ctx); \ - } \ + free_instance(); \ } \ \ - void steal_instance(name &other) \ + void free_instance() \ { \ if (m_valid) \ { \ @@ -136,14 +132,24 @@ namespace isl deref_ctx(m_ctx); \ m_valid = false; \ } \ - m_valid = other.m_valid; \ - if (m_valid) \ + } \ + \ + void take_possession_of(isl_##name *data) \ + { \ + free_instance(); \ + if (data) \ { \ - m_ctx = other.m_ctx; \ + m_data = data; \ + m_valid = true; \ + m_ctx = isl_##name##_get_ctx(data); \ ref_ctx(m_ctx); \ - m_data = other.m_data; \ - other.invalidate(); \ } \ + } \ + \ + void steal_instance(name &other) \ + { \ + take_possession_of(other.m_data); \ + other.invalidate(); \ } struct ctx \ -- GitLab From 200f44f3cdf74b417c9bfe0cdaf5995651193bdc Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 12:58:41 -0500 Subject: [PATCH 37/41] Allow wrapping 'dump' functions --- gen_wrap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen_wrap.py b/gen_wrap.py index d0a681c..801dcf8 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -631,7 +631,7 @@ class FunctionData: assert class_name is not None - if name in ["free", "cow", "dump"]: + if name in ["free", "cow"]: return try: -- GitLab From 33e0667fe949ce4554c2f7af9691d80f32e02b24 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 13:33:29 -0500 Subject: [PATCH 38/41] Revive upcast wrappers for existing methods --- islpy/__init__.py | 87 +++++++++++++++++++++++++++++++++-------------- 1 file changed, 62 insertions(+), 25 deletions(-) diff --git a/islpy/__init__.py b/islpy/__init__.py index 4d6a50a..7440a57 100644 --- a/islpy/__init__.py +++ b/islpy/__init__.py @@ -831,41 +831,78 @@ def _add_functionality(): # note: automatic upcasts for method arguments are provided through # 'implicitly_convertible' on the C++ side of the wrapper. - class UpcastWrapper(object): - def __init__(self, method, upcast): - self.method = method - self.upcast = upcast + def make_new_upcast_wrapper(method, upcast): + # This function provides a scope in which method and upcast + # are not changed from one iteration of the enclosing for + # loop to the next. + + def wrapper(basic_instance, *args, **kwargs): + special_instance = upcast(basic_instance) + return method(special_instance, *args, **kwargs) + + return wrapper + + def make_existing_upcast_wrapper(basic_method, special_method, upcast): + # This function provides a scope in which method and upcast + # are not changed from one iteration of the enclosing for + # loop to the next. + + def wrapper(basic_instance, *args, **kwargs): + try: + return basic_method(basic_instance, *args, **kwargs) + except TypeError: + pass + + special_instance = upcast(basic_instance) + return special_method(special_instance, *args, **kwargs) + + return wrapper def add_upcasts(basic_class, special_class, upcast_method): from functools import update_wrapper - for method_name in dir(special_class): - # do not overwrite existing methods - if hasattr(basic_class, method_name): - continue + def my_ismethod(class_, method_name): + if method_name.startswith("_"): + return False + + method = getattr(class_, method_name) - method = getattr(special_class, method_name) + if not callable(method): + return False - my_ismethod = callable(method) - for meth_superclass in type(method).__mro__: - # Here we're desperately trying to filter out static methods. - if "builtin_function_or_method" in meth_superclass.__name__: - my_ismethod = False + # Here we're desperately trying to filter out static methods, + # based on what seems to be a common feature. + if any("builtin_function_or_method" in meth_superclass.__name__ + for meth_superclass in type(method).__mro__): + return False - if my_ismethod: - def make_wrapper(method, upcast): - # This function provides a scope in which method and upcast - # are not changed from one iteration of the enclosing for - # loop to the next. + return True - def wrapper(basic_instance, *args, **kwargs): - special_instance = upcast(basic_instance) - return method(special_instance, *args, **kwargs) + for method_name in dir(special_class): + special_method = getattr(special_class, method_name) + + if not my_ismethod(special_class, method_name): + continue - return wrapper + if hasattr(basic_class, method_name): + # method already exists in basic class + basic_method = getattr(basic_class, method_name) + + if not my_ismethod(basic_class, method_name): + continue + + wrapper = make_existing_upcast_wrapper( + basic_method, special_method, upcast_method) + setattr( + basic_class, method_name, + update_wrapper(wrapper, basic_method)) + else: + # method does not yet exists in basic class - wrapper = make_wrapper(method, upcast_method) - setattr(basic_class, method_name, update_wrapper(wrapper, method)) + wrapper = make_new_upcast_wrapper(special_method, upcast_method) + setattr( + basic_class, method_name, + update_wrapper(wrapper, special_method)) for args_triple in [ (BasicSet, Set, Set.from_basic_set), -- GitLab From deb684049fb2b8a46bd070f66bf668915eb3af72 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 14:04:29 -0500 Subject: [PATCH 39/41] Separate isl_stat and int return cases: no longer treat -1 as an error case unconditionally --- gen_wrap.py | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index 801dcf8..d0630e1 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1039,21 +1039,38 @@ def write_wrapper(outf, meth): # {{{ return value processing - if meth.return_base_type in ["int", "isl_stat"] and not meth.return_ptr: + if meth.return_base_type == "int" and not meth.return_ptr: + # {{{ integer return + + if meth.name.startswith("is_") or meth.name.startswith("has_"): + processed_return_type = "bool" + + ret_descr = processed_return_type + + if extra_ret_vals: + if len(extra_ret_vals) == 1: + processed_return_type = "py::object" + body.append("return py::object(%s);" % extra_ret_vals[0]) + ret_descr = extra_ret_descrs[0] + else: + processed_return_type = "py::object" + body.append("return py::make_tuple(%s);" % ", ".join(extra_ret_vals)) + ret_descr = "tuple: (%s)" % (", ".join(extra_ret_descrs)) + else: + body.append("return result;") + + # }}} + + elif meth.return_base_type == "isl_stat" and not meth.return_ptr: # {{{ error code body.append(""" - #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) - if (result == isl_stat_error) - #else - if (result == -1) - #endif + if (result == isl_stat_error) { throw isl::error("call to isl_%(cls)s_%(name)s failed"); }""" % {"cls": meth.cls, "name": meth.name}) - if meth.name.startswith("is_") or meth.name.startswith("has_"): - processed_return_type = "bool" + assert not (meth.name.startswith("is_") or meth.name.startswith("has_")) ret_descr = processed_return_type -- GitLab From 0d3c66b1fbc76055b5688523287b9f55535ac55e Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 15:26:32 -0500 Subject: [PATCH 40/41] Support callbacks returning isl objects or receiving args with keep semantics --- gen_wrap.py | 160 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 119 insertions(+), 41 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index d0630e1..bd8c9dd 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -103,8 +103,12 @@ class Argument: class CallbackArgument: - def __init__(self, name, return_base_type, return_ptr, args): + def __init__(self, name, + return_semantics, return_decl_words, return_base_type, return_ptr, args): self.name = name + self.return_semantics = return_semantics + assert isinstance(return_decl_words, list) + self.return_decl_words = return_decl_words self.return_base_type = return_base_type self.return_ptr = return_ptr self.args = args @@ -330,14 +334,22 @@ def parse_arg(arg): arg_match = FUNC_PTR_RE.match(arg) assert arg_match is not None, "fptr: %s" % arg - return_base_type = arg_match.group(1) + return_semantics, ret_words = filter_semantics( + arg_match.group(1).split()) + return_decl_words = ret_words[:-1] + return_base_type = ret_words[-1] + return_ptr = arg_match.group(2) name = arg_match.group(3) args = [parse_arg(i.strip()) for i in split_at_unparenthesized_commas(arg_match.group(4))] return CallbackArgument(name.strip(), - return_base_type.strip(), return_ptr.strip(), args) + return_semantics, + return_decl_words, + return_base_type, + return_ptr.strip(), + args) words = arg.split() semantics, words = filter_semantics(words) @@ -681,8 +693,9 @@ class FunctionData: # {{{ get_callback def get_callback(cb_name, cb): - body = [] + pre_call = [] passed_args = [] + post_call = [] assert cb.args[-1].name == "user" @@ -693,54 +706,109 @@ def get_callback(cb_name, cb): arg.base_type, arg.ptr)) arg_cls = arg.base_type[4:] - if arg.semantics is not SEM_TAKE: - raise SignatureNotSupported("non-take callback arg") - passed_args.append("arg_%s" % arg.name) - body.append(""" - std::unique_ptr<%(arg_cls)s> wrapped_arg_%(name)s( - new %(arg_cls)s(c_arg_%(name)s)); + pre_call.append(""" + %(arg_cls)s *wrapped_arg_%(name)s(new %(arg_cls)s(c_arg_%(name)s)); py::object arg_%(name)s( - handle_from_new_ptr(wrapped_arg_%(name)s.get())); - wrapped_arg_%(name)s.release(); + handle_from_new_ptr(wrapped_arg_%(name)s)); """ % dict( arg_cls=arg_cls, name=arg.name, )) + + if arg.semantics is SEM_TAKE: + # We (the callback) are supposed to free the object, so + # just let the unique_ptr get rid of it. + pass + elif arg.semantics is SEM_KEEP: + # The caller wants to keep this object, so we simply tell our + # wrapper to stop managing it after the call completes. + post_call.append(""" + wrapped_arg_%(name)s->invalidate(); + """ % {"name": arg.name}) + else: + raise SignatureNotSupported("unsupported callback arg semantics") + else: raise SignatureNotSupported("unsupported callback arg: %s %s" % ( arg.base_type, arg.ptr)) + if cb.return_base_type in SAFE_IN_TYPES and not cb.return_ptr: + ret_type = "%s %s" % (cb.return_base_type, cb.return_ptr) + if cb.return_base_type == "isl_stat": + post_call.append(""" + if (retval.ptr() == Py_None) + { + return isl_stat_ok; + } + """) + else: + post_call.append(""" + if (retval.ptr() == Py_None) + { + throw isl::error("callback returned None"); + } + """) + post_call.append(""" + else + return py::cast<%(ret_type)s>(retval); + """ % { + "ret_type": ret_type, + } + ) + if cb.return_base_type == "isl_bool": + error_return = "isl_bool_error" + else: + error_return = "isl_stat_error" + + elif cb.return_base_type.startswith("isl_") and cb.return_ptr == "*": + if cb.return_semantics is None: + raise SignatureNotSupported("callback return with unspecified semantics") + elif cb.return_semantics is not SEM_GIVE: + raise SignatureNotSupported("callback return with non-GIVE semantics") + + ret_type = "%s %s" % (cb.return_base_type, cb.return_ptr) + post_call.append(""" + if (retval.ptr() == Py_None) + { + return nullptr; + } + else + { + isl::%(ret_type_name)s *wrapper_retval = + py::cast(retval); + isl_%(ret_type_name)s *unwrapped_retval = + wrapper_retval->m_data; + wrapper_retval->invalidate(); + return unwrapped_retval; + } + """ % { + "ret_type_name": cb.return_base_type[4:], + } + ) + error_return = "nullptr" + + else: + raise SignatureNotSupported("non-int callback") + return """ static %(ret_type)s %(cb_name)s(%(input_args)s) { - py::object &py_cb = *reinterpret_cast(c_arg_user); + py::object py_cb = py::reinterpret_borrow( + (PyObject *) c_arg_user); try { - %(body)s + %(pre_call)s py::object retval = py_cb(%(passed_args)s); - if (retval.ptr() == Py_None) - { - #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) - return isl_stat_ok; - #else - return 0; - #endif - } - else - return py::cast<%(ret_type)s>(retval); + %(post_call)s } catch (py::error_already_set &err) { std::cout << "[islpy warning] A Python exception occurred in " "a call back function, ignoring:" << std::endl; PyErr_Print(); - #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) - return isl_stat_error; - #else - return -1; - #endif + return %(error_return)s; } catch (std::exception &e) { @@ -748,21 +816,20 @@ def get_callback(cb_name, cb): "a Python callback query:" << std::endl << e.what() << std::endl; std::cout << "[islpy] Aborting now." << std::endl; - #if !defined(ISLPY_ISL_VERSION) || (ISLPY_ISL_VERSION >= 15) - return isl_stat_error; - #else - return -1; - #endif + return %(error_return)s; } } """ % dict( - ret_type="%s %s" % (cb.return_base_type, cb.return_ptr), + ret_type=ret_type, cb_name=cb_name, input_args=( ", ".join("%s %sc_arg_%s" % (arg.base_type, arg.ptr, arg.name) for arg in cb.args)), - body="\n".join(body), - passed_args=", ".join(passed_args)) + pre_call="\n".join(pre_call), + passed_args=", ".join(passed_args), + post_call="\n".join(post_call), + error_return=error_return, + ) # }}} @@ -789,18 +856,29 @@ def write_wrapper(outf, meth): arg_names.append(arg.name) if isinstance(arg, CallbackArgument): - if arg.return_base_type not in SAFE_IN_TYPES or arg.return_ptr: - raise SignatureNotSupported("non-int callback") + has_userptr = ( + arg_idx + 1 < len(meth.args) + and meth.args[arg_idx+1].name.endswith("user")) + if not has_userptr: + raise SignatureNotSupported( + "callback signature without user pointer") + else: + arg_idx += 1 - arg_idx += 1 if meth.args[arg_idx].name != "user": raise SignatureNotSupported("unexpected callback signature") cb_name = "cb_%s_%s_%s" % (meth.cls, meth.name, arg.name) + if (meth.cls in ["ast_build", "ast_print_options"] + and meth.name.startswith("set_")): + extra_ret_vals.append("py_%s" % arg.name) + extra_ret_descrs.append("(opaque handle to " + "manage callback lifetime)") + input_args.append("py::object py_%s" % arg.name) passed_args.append(cb_name) - passed_args.append("&py_%s" % arg.name) + passed_args.append("py_%s.ptr()" % arg.name) preamble.append(get_callback(cb_name, arg)) -- GitLab From 77fb887d68404f5625e8d6a02eaf98784a6511e8 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 29 Jun 2020 15:29:55 -0500 Subject: [PATCH 41/41] Integer return values: actually return the integer from the wrapper --- gen_wrap.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gen_wrap.py b/gen_wrap.py index bd8c9dd..6d43d7d 100644 --- a/gen_wrap.py +++ b/gen_wrap.py @@ -1128,11 +1128,12 @@ def write_wrapper(outf, meth): if extra_ret_vals: if len(extra_ret_vals) == 1: processed_return_type = "py::object" - body.append("return py::object(%s);" % extra_ret_vals[0]) + body.append("return py::object(result, %s);" % extra_ret_vals[0]) ret_descr = extra_ret_descrs[0] else: processed_return_type = "py::object" - body.append("return py::make_tuple(%s);" % ", ".join(extra_ret_vals)) + body.append("return py::make_tuple(result, %s);" + % ", ".join(extra_ret_vals)) ret_descr = "tuple: (%s)" % (", ".join(extra_ret_descrs)) else: body.append("return result;") -- GitLab