{ "info": { "author": "Pepijn de Vos", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# futhark-ffi\n[![Build Status](https://travis-ci.org/pepijndevos/futhark-pycffi.svg?branch=master)](https://travis-ci.org/pepijndevos/futhark-pycffi)\n\nPython library using the Futhark C backend via CFFI\n\nFuthark provides several compiler backends, `futhark opencl` which is a C backend, and `futhark pyopencl` which is a Python backend based on PyOpenCL. However, the host-side code of the Python backend is quite slow, leading to a lot of overhead when small, frequent kernels are used.\n\nA solution to reduce this overhead is to use CFFI to used the C backend from Python, greatly reducing the calling overhead. The OpenCL code is the same, so this is not interesting for long-running kernels.\n\nThis library supports both `futhark opencl` and `futhark c`. Futhark arrays are mapped to and from Numpy arrays. Multiple outputs and multi-dimensional arrays are supported.\n\n## Installation\n\n[Install Futhark](https://futhark.readthedocs.io/en/latest/installation.html), then simply\n```bash\npip install futhark-ffi\n```\n\n## Usage\n\nGenerate a C library, and build a Python binding for it\n\n```bash\nfuthark opencl --library test.fut\nbuild_futhark_ffi test\n```\n\nUse the Python wrapper\n\n```python\nimport numpy as np\nimport _test\nfrom futhark_ffi import Futhark\n\ntest = Futhark(_test)\nres = test.test3(np.arange(10))\ntest.from_futhark(res)\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/pepijndevos/futhark-pycffi", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "futhark-ffi", "package_url": "https://pypi.org/project/futhark-ffi/", "platform": "", "project_url": "https://pypi.org/project/futhark-ffi/", "project_urls": { "Homepage": "https://github.com/pepijndevos/futhark-pycffi" }, "release_url": "https://pypi.org/project/futhark-ffi/0.10.2/", "requires_dist": [ "numpy", "cffi" ], "requires_python": "", "summary": "A Python library using the Futhark C backend via CFFI", "version": "0.10.2" }, "last_serial": 5169510, "releases": { "0.10.2": [ { "comment_text": "", "digests": { "md5": "c0ddbea2a453d1364a9783ea5a767077", "sha256": "a0130faf7c30d20c1d29a34815b99f291c5ce1e7fa50de86fd6c7297848995d6" }, "downloads": -1, "filename": "futhark_ffi-0.10.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0ddbea2a453d1364a9783ea5a767077", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4834, "upload_time": "2019-04-21T10:09:17", "url": "https://files.pythonhosted.org/packages/4b/2d/99e97ac804637d74441cff348d7b597a55ce5c6431ea2c2f3982ad1731d9/futhark_ffi-0.10.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e92bd0a3f63c05d412ae4943b11b2e66", "sha256": "c2eade5ca9103849304b8537a879c22e09016aa5a0fdd0512609af9ef0307e70" }, "downloads": -1, "filename": "futhark_ffi-0.10.2.tar.gz", "has_sig": false, "md5_digest": "e92bd0a3f63c05d412ae4943b11b2e66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4108, "upload_time": "2019-04-21T10:09:19", "url": "https://files.pythonhosted.org/packages/76/9a/a824f14b2aae40d64d52809942595d30d92ca96303cdef3385829f0586ba/futhark_ffi-0.10.2.tar.gz" } ], "0.6.1b1": [ { "comment_text": "", "digests": { "md5": "80621cacee5c94ca230cf2e4ef0013ad", "sha256": "282c85f8bf1e6560fee351b9c7e5c1e841341d94fcd33f9272be4b14a5227bdf" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b1-py3.6.egg", "has_sig": false, "md5_digest": "80621cacee5c94ca230cf2e4ef0013ad", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 8806, "upload_time": "2018-07-04T16:01:54", "url": "https://files.pythonhosted.org/packages/d4/ac/59532054406bcae2d72d29ea606efc11f8c8178c622e791aa391e3b2a77e/futhark_ffi-0.6.1b1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "ae7842c28a18504598e0122cc29bb8e2", "sha256": "4fe42d842296ae3fe11eda59b8fc4c1063fcabc6be446dd08945c7dffa2b9b67" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b1-py3-none-any.whl", "has_sig": false, "md5_digest": "ae7842c28a18504598e0122cc29bb8e2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4536, "upload_time": "2018-07-04T15:55:12", "url": "https://files.pythonhosted.org/packages/53/79/73c67c5c755fff1fc7c5741c061d9eaf3007b59274056424588fdcb96951/futhark_ffi-0.6.1b1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "756859f20706d7bda02132174e45a24e", "sha256": "cec201b54d76abf73cd47b43cdb96246d7ffd933a3ef166ac7cb461e8f2d4b44" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b1.tar.gz", "has_sig": false, "md5_digest": "756859f20706d7bda02132174e45a24e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3806, "upload_time": "2018-07-04T15:56:20", "url": "https://files.pythonhosted.org/packages/a1/f1/c87d0653ae161e00bfd39d60d61fa6ca750bfac229fedf8a43f76fbfcfdf/futhark_ffi-0.6.1b1.tar.gz" } ], "0.6.1b2": [ { "comment_text": "", "digests": { "md5": "fc9b994f57fb7e9c87b0e6d60e79b0d2", "sha256": "66b99d788776b9df5b1cc99ffb54c4c88b084e99d8625e51369124f58ffb1884" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b2-py3.6.egg", "has_sig": false, "md5_digest": "fc9b994f57fb7e9c87b0e6d60e79b0d2", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 8995, "upload_time": "2018-07-11T19:15:19", "url": "https://files.pythonhosted.org/packages/23/32/1934d19fbe54590d54bc46069380b8ed63b05ca65f723432d8068b3740b2/futhark_ffi-0.6.1b2-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "d8fb6f7c6218a8d9ed27aea4e357a8b5", "sha256": "f9ce605c21964f68d1fc68990f0a53d92ae855b219b156585ddcbdb6afbf37a1" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b2-py3-none-any.whl", "has_sig": false, "md5_digest": "d8fb6f7c6218a8d9ed27aea4e357a8b5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4687, "upload_time": "2018-07-11T19:15:17", "url": "https://files.pythonhosted.org/packages/be/eb/0bdf5cdab162a8bb566b472442d40993a1b3d6fe2559a3413890c2f4a2b7/futhark_ffi-0.6.1b2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "23f522b21d0ec6150085d6e2fdd23ead", "sha256": "9ca07be790411b92a4142989114b4d88428632c2905e531d2ea6a7328b650fef" }, "downloads": -1, "filename": "futhark_ffi-0.6.1b2.tar.gz", "has_sig": false, "md5_digest": "23f522b21d0ec6150085d6e2fdd23ead", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3959, "upload_time": "2018-07-11T19:15:20", "url": "https://files.pythonhosted.org/packages/4e/1f/777c4572d70c94b05b9eccc78043822868d95fe504c1c22d8930f71ffa27/futhark_ffi-0.6.1b2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c0ddbea2a453d1364a9783ea5a767077", "sha256": "a0130faf7c30d20c1d29a34815b99f291c5ce1e7fa50de86fd6c7297848995d6" }, "downloads": -1, "filename": "futhark_ffi-0.10.2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0ddbea2a453d1364a9783ea5a767077", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4834, "upload_time": "2019-04-21T10:09:17", "url": "https://files.pythonhosted.org/packages/4b/2d/99e97ac804637d74441cff348d7b597a55ce5c6431ea2c2f3982ad1731d9/futhark_ffi-0.10.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e92bd0a3f63c05d412ae4943b11b2e66", "sha256": "c2eade5ca9103849304b8537a879c22e09016aa5a0fdd0512609af9ef0307e70" }, "downloads": -1, "filename": "futhark_ffi-0.10.2.tar.gz", "has_sig": false, "md5_digest": "e92bd0a3f63c05d412ae4943b11b2e66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4108, "upload_time": "2019-04-21T10:09:19", "url": "https://files.pythonhosted.org/packages/76/9a/a824f14b2aae40d64d52809942595d30d92ca96303cdef3385829f0586ba/futhark_ffi-0.10.2.tar.gz" } ] }