Intel SPMD Program Compiler
C++ LLVM M4 Python Yacc C Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
builtins Fix for issue #1169 - Adding support for aos_to_soa4 and soa_to_aos4 … Aug 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 Fix for issue #1169 - Adding support for aos_to_soa4 and soa_to_aos4 … Aug 9, 2018
examples Fix for issue #1169 - Adding support for aos_to_soa4 and soa_to_aos4 … Aug 9, 2018
llvm_patches Make r317463 patch for 5.0 apply perfectly Nov 8, 2017
ptxtools Copyright refresh Apr 22, 2015
tests Merge pull request #1335 from DeepakRajendrakumaran/1331 Aug 15, 2018
tests_errors Fix for #1331 : Failing gracefully when type-casting is not possible … Aug 15, 2018
.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 Readme udpate Aug 10, 2018
alloy.py Adding --non-interactive to svn checkout Aug 10, 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
bitcode2cpp.py 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 Fix for issue #1169 - Adding support for aos_to_soa4 and soa_to_aos4 … Aug 9, 2018
builtins.h Copyright refresh Apr 22, 2015
cbackend.cpp Enabling LLVM 8.0 Aug 6, 2018
check_env.py small corrections of test system Sep 23, 2013
check_isa.cpp fix check_isa.cpp's flag for knl May 28, 2015
common.py removed some dead code Aug 6, 2014
ctx.cpp Fix ispc compile time assert caused by changed signature of memcpy in… Jun 6, 2018
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 #1331 : Failing gracefully when type-casting is not possible … Aug 15, 2018
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 Issue 1253 : Adding new CPU to handle SSE2 only target. Jul 12, 2018
ispc.h Enabling LLVM 8.0 Aug 6, 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 Enabling LLVM 8.0 Aug 6, 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 Untabify chages to main.cpp Aug 13, 2018
module.cpp Untabify changes to module.cpp Aug 13, 2018
module.h Fix operator| for Module::OutputFlags under clang Aug 12, 2018
opt.cpp Compile time fixes Jun 5, 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
perf.py Adding avx512skx-i32x16 target to examples Feb 25, 2016
run_tests.py Increase time limit for tests Nov 4, 2017
simple.vcxproj Windows: fix some compiler warnings during build Oct 9, 2011
stdlib.ispc Merge pull request #1332 from DeepakRajendrakumaran/1169 Aug 10, 2018
stdlib2cpp.py 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
tt_dump_read.py tt_dump_read.py import bux fixed Jul 21, 2014
type.cpp [Bug 1323] Making struct name unique by adding native vector width to… Jun 19, 2018
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

README.rst

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.

Overview

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, AVX, AVX2, and AVX512 instruction sets.

Features

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, AVX2, and AVX512.
  • 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.

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.