Intel SPMD Program Compiler
C++ LLVM M4 Python Yacc C Other
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
builtins Fix issues pointed out by @dbabokin Jan 9, 2018
contrib [vim] Adding new and delete for allocation May 4, 2016
docker Adding examples of Docker files that build ISPC on top of Ubuntu and … Nov 10, 2017
docs Patches for llvm 7.0 support Jan 9, 2018
examples ISPC codebase expects tabs as space. Jun 3, 2017
llvm_patches Make r317463 patch for 5.0 apply perfectly Nov 8, 2017
ptxtools Copyright refresh Apr 22, 2015
tests Adding test Aug 7, 2017
tests_errors Choose type for integer literals to match the target mask size (if po… Jul 24, 2013
.gitignore Windows support Nov 5, 2013
LICENSE.txt Patches for llvm 7.0 support Jan 9, 2018
Makefile Fix missing newline in Makefile WARNING_BODY Jan 9, 2018
README.rst Include AVX2 in supported ISAs Jan 22, 2012 Switch to 6.0 release branch Mar 30, 2018
ast.cpp added unsafe case of division with "all off" mask Aug 21, 2015
ast.h classof implementations for all classes Jul 10, 2015 Use find() method on string to run on both Python 2 and 3 Oct 3, 2015
buildall.bat Fix various warnings / build issues on Windows Dec 15, 2011
buildispc.bat Adding new line to error/warning message on Windows and fixing some t… May 1, 2013
builtins.cpp Defulat DWARF version to 3. Also several minor fixes in debug info ge… May 14, 2017
builtins.h Copyright refresh Apr 22, 2015
cbackend.cpp Include new header llvm/Transforms/Utils.h where needed Apr 10, 2018 small corrections of test system Sep 23, 2013
check_isa.cpp fix check_isa.cpp's flag for knl May 28, 2015 removed some dead code Aug 6, 2014
ctx.cpp Apply fix for D33843 in other files Jun 12, 2017
ctx.h Define dereferencing varying pointer to uniform struct with 'bound un… Feb 5, 2016
decl.cpp Id's fo Expr-inherited classes Jul 9, 2015
decl.h Copyright update Mar 12, 2014
doxygen.cfg Bumping version 1.9.3dev Nov 10, 2017
expr.cpp Fix for #1271 - problem with bool as struct field. May 16, 2017
expr.h classof implementations for all classes Jul 10, 2015
fail_db.txt Updated fail_db.txt according to the old one. Feb 24, 2016
func.cpp Tracking LLVM changes. May 4, 2017
func.h Copyright update Mar 12, 2014
ispc.cpp Fix some includes after llvm commit 318490 Jan 9, 2018
ispc.h Patches for llvm 7.0 support Jan 9, 2018
ispc.sln Windows build fix Mar 11, 2015
ispc.vcxproj Enable build with LLVM 5.0 - adding LLVMBinaryFormat.lib to link. Jul 12, 2017
ispc_version.h Patches for llvm 7.0 support Jan 9, 2018
lex.ll Take into account target data type width instead of mask bit width, when Jul 4, 2016
llvmutil.cpp Fix ISPC build fail after LLVM commit 252380 Nov 10, 2015
llvmutil.h Enabling LLVM 5.0 and making fixes to track changes in LLVM for the past Mar 1, 2017
main.cpp Do not add DWARF version before LLVM 3.5 Jul 4, 2016
module.cpp Merge pull request #1315 from dbabokin/6_0 Apr 5, 2018
module.h remove several redundant #if - clauses Jun 17, 2015
opt.cpp Include new header llvm/Transforms/Utils.h where needed Apr 10, 2018
opt.h Copyright update Mar 12, 2014
parse.yy Id's fo Expr-inherited classes Jul 9, 2015
perf.ini changing of examples Dec 10, 2013 Adding avx512skx-i32x16 target to examples Feb 25, 2016 Increase time limit for tests Nov 4, 2017
simple.vcxproj Windows: fix some compiler warnings during build Oct 9, 2011
stdlib.ispc Clamp to _almost_ zero in float_to_srgb8(), fixes #1198 Nov 7, 2017 Python build compatible on both python 2 and 3 Jan 10, 2012
stmt.cpp Fix for #1294 - better error reporting for array assignment in brance… Nov 4, 2017
stmt.h classof implementations for all classes Jul 10, 2015
sym.cpp Copyright update Mar 12, 2014
sym.h Copyright update Mar 12, 2014
test_static.cpp Copyright refresh Apr 22, 2015
test_static_cuda.cpp Whitespace and copyright fixes in test_static*.cpp Jul 8, 2014
test_static_nvptx.cpp Whitespace and copyright fixes in test_static*.cpp Jul 8, 2014 import bux fixed Jul 21, 2014
type.cpp Fix for #1284 - missing debug info for enum on Windows Nov 4, 2017
type.h Fix support for short vectors of unsigned ints. Aug 7, 2017
util.cpp remove several redundant #if - clauses Jun 17, 2015
util.h Copyright update Mar 12, 2014


Intel(r) SPMD Program Compiler

ispc is a compiler for a variant of the C programming language, with extensions for single program, multiple data programming. Under the SPMD model, the programmer writes a program that generally appears to be a regular serial program, though the execution model is actually that a number of program instances execute in parallel on the hardware.


ispc compiles a C-based SPMD programming language to run on the SIMD units of CPUs; it frequently provides a 3x or more speedup on CPUs with 4-wide vector SSE units and 5x-6x on CPUs with 8-wide AVX vector units, without any of the difficulty of writing intrinsics code. Parallelization across multiple cores is also supported by ispc, making it possible to write programs that achieve performance improvement that scales by both number of cores and vector unit size.

There are a few key principles in the design of ispc:

  • To build a small set of extensions to the C language that would deliver excellent performance to performance-oriented programmers who want to run SPMD programs on the CPU.
  • To provide a thin abstraction layer between the programmer and the hardware--in particular, to have an execution and data model where the programmer can cleanly reason about the mapping of their source program to compiled assembly language and the underlying hardware.
  • To make it possible to harness the computational power of SIMD vector units without the extremely low-programmer-productivity activity of directly writing intrinsics.
  • To explore opportunities from close coupling between C/C++ application code and SPMD ispc code running on the same processor--to have lightweight function calls between the two languages and to share data directly via pointers without copying or reformatting.

ispc is an open source compiler with the BSD license. It uses the remarkable LLVM Compiler Infrastructure for back-end code generation and optimization and is hosted on github. It supports Windows, Mac, and Linux, with both x86 and x86-64 targets. It currently supports the SSE2, SSE4, AVX1, and AVX2 instruction sets.


ispc provides a number of key features to developers:

  • Familiarity as an extension of the C programming language: ispc supports familiar C syntax and programming idioms, while adding the ability to write SPMD programs.
  • High-quality SIMD code generation: the performance of code generated by ispc is often close to that of hand-written intrinsics code.
  • Ease of adoption with existing software systems: functions written in ispc directly interoperate with application functions written in C/C++ and with application data structures.
  • Portability across over a decade of CPU generations: ispc has targets for SSE2, SSE4, AVX (and soon, AVX2).
  • Portability across operating systems: Microsoft Windows, Mac OS X, and Linux are all supported by ispc.
  • Debugging with standard tools: ispc programs can be debugged with standard debuggers (OS X and Linux only).

Additional Resources

Prebuilt ispc binaries for Windows, OS X and Linux can be downloaded from the ispc downloads page. See also additional documentation and additional performance information.