# Loopy

A Python library that generates high-performance CPU and GPU code for array-based computations, such as dense linear algebra and PDE solvers, by transforming a simple description under the user's control.

Loopy generates the detailed, high-performance code needed for array-type computations on GPUs and multi-core CPUs, such as dense linear algebra, convolutions, n-body interactions, and PDE solvers using finite element, finite difference, or fast multipole methods. Its central idea is that a computation should be described simply, then transformed, under explicit user control from Python, into a version tuned for good performance.

Supported transformations include vector and multi-core parallelism targeting the OpenCL and CUDA models, data-layout changes between structure-of-arrays and array-of-structures, loop unrolling and tiling with boundary handling, prefetching and copy optimizations, and instruction-level parallelism. It is not intended as a general-purpose programming language, but as a tool for producing optimized kernels for a specific class of array computations.

It installs from the Python Package Index and works alongside pyopencl, and is distributed under the MIT license.

Website: http://mathema.tician.de/software/loopy
