{ "info": { "author": "Marat Dukhan", "author_email": "maratek@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Assembly", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Scientific/Engineering", "Topic :: Software Development", "Topic :: Software Development :: Assemblers", "Topic :: Software Development :: Code Generators", "Topic :: Software Development :: Compilers", "Topic :: Software Development :: Libraries" ], "description": "Portable Efficient Assembly Code-generator in Higher-level Python (PEACH-Py)\n============================================================================\n\nPEACH-Py is a Python framework for writing high-performance assembly kernels. PEACH-Py is developed to simplify writing optimized assembly kernels while preserving all optimization opportunities of traditional assembly. Some PEACH-Py features:\n\n - Automatic register allocation\n - Stack frame management, including re-aligning of stack frame as needed\n - Generating versions of a function for different calling conventions from the same source (e.g. functions for Microsoft x64 ABI and System V x86-64 ABI can be generated from the same source)\n - Allows to define constants in the place where they are used (just like in high-level languages)\n - Tracking of instruction extensions used in the function.\n - Multiplexing of multiple instruction streams (helpful for software pipelining)\n\nExample\n-------\n\n ::\n\n from peachpy.x64 import *\n\n # Use 'x64-ms' for Microsoft x64 ABI\n abi = peachpy.c.ABI('x64-sysv')\n assembler = Assembler(abi)\n\n # Implement function void add_1(const uint32_t *src, uint32_t *dst, size_t length)\n src_argument = peachpy.c.Parameter(\"src\", peachpy.c.Type(\"const uint32_t*\"))\n dst_argument = peachpy.c.Parameter(\"dst\", peachpy.c.Type(\"uint32_t*\"))\n len_argument = peachpy.c.Parameter(\"length\", peachpy.c.Type(\"size_t\"))\n\n # This optimized kernel will target Intel Nehalem processors. Any instructions which are not\n # supported on Intel Nehalem (e.g. AVX instructions) will generate an error. If you don't have\n # a particular target in mind, use \"Unknown\"\n with Function(assembler, \"add_1\", (src_argument, dst_argument, len_argument), \"Nehalem\"):\n # Load arguments into registers\n srcPointer = GeneralPurposeRegister64()\n LOAD.PARAMETER( srcPointer, src_argument )\n\n dstPointer = GeneralPurposeRegister64()\n LOAD.PARAMETER( dstPointer, dst_argument )\n\n length = GeneralPurposeRegister64()\n LOAD.PARAMETER( length, len_argument )\n\n # Main processing loop. Length must be a multiple of 4.\n LABEL( 'loop' )\n\n x = SSERegister()\n MOVDQU( x, [srcPointer] )\n ADD( srcPointer, 16 )\n\n # Add 1 to x\n PADDD( x, Constant.uint32x4(1) )\n\n MOVDQU( [dstPointer], x )\n ADD( dstPointer, 16 )\n\n SUB( length, 4 )\n JNZ( 'loop' )\n\n RETURN()\n\n print assembler", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/MDukhan/peachpy/", "keywords": "assembly,codegen,x86-64,arm", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "PeachPy", "package_url": "https://pypi.org/project/PeachPy/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PeachPy/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/MDukhan/peachpy/" }, "release_url": "https://pypi.org/project/PeachPy/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Portable Efficient Assembly Codegen in Higher-level Python", "version": "0.0.1" }, "last_serial": 927598, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9e41ae48b72537f7788482ddec6b9958", "sha256": "9eaa37c0a914900dd93051080a9510c488fff626a22cc9c855c35045e0ac2843" }, "downloads": -1, "filename": "PeachPy-0.0.1.zip", "has_sig": false, "md5_digest": "9e41ae48b72537f7788482ddec6b9958", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116904, "upload_time": "2013-11-24T02:36:15", "url": "https://files.pythonhosted.org/packages/de/53/b576bafe2554e3ea952a1da2959f124d4d79906bddd82cd3275ff98ad498/PeachPy-0.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9e41ae48b72537f7788482ddec6b9958", "sha256": "9eaa37c0a914900dd93051080a9510c488fff626a22cc9c855c35045e0ac2843" }, "downloads": -1, "filename": "PeachPy-0.0.1.zip", "has_sig": false, "md5_digest": "9e41ae48b72537f7788482ddec6b9958", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 116904, "upload_time": "2013-11-24T02:36:15", "url": "https://files.pythonhosted.org/packages/de/53/b576bafe2554e3ea952a1da2959f124d4d79906bddd82cd3275ff98ad498/PeachPy-0.0.1.zip" } ] }