ispc(1)

πŸ“¦
version 1.31.0 Β· 2 versions
  • 1.31.0 Β· debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.30.0 Β· fedora 44
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ispc β€” Intel Implicit SPMD Program Compiler πŸ’–

okay so bestie, welcome to the ispc(1) page from the General Commands Manual ✨ this is the compiler that makes parallel code feel like a normal lil serial program, and I'm gonna walk you through literally every flag. grab a strawberry πŸ“, we're going in.


🌈 SYNOPSIS 🌈

ispc [options] file

like. that's it. that's the whole vibe. you hand it a file and some options and it does its thing πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

ispc is a compiler for a variant of the C programming language, with extensions for single program, multiple data programming. no cap β€” it's C-ish, but with SPMD energy.

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. so you write it like it's one thing, but it's secretly a whole squad running at once. main character energy for code, fr fr πŸ‘‘


✨ OPTIONS ✨

  • --addressing {32,64} β€” pick 32- or 64-bit addressing. heads up bestie: 32-bit addressing calculations are done by default, even on 64-bit target architectures. so the default is not what you'd assume πŸ™ˆ
  • --arch {x86, x86-64, arm, aarch64, wasm32} β€” select target architecture πŸ—οΈ
  • --colored-output β€” always use terminal colors in error/warning messages. yes queen, make the errors pretty 🌈
  • --cpu <type> β€” an alias for the --device <type> switch. same thing, different name πŸŽ€
  • -D <foo> β€” #define given value when running preprocessor
  • --dev-stub <filename> β€” emit device-side offload stub functions to file
  • --device <type> β€” select target device. here's the full roster, character for character, no skips:
<type> = { x86-64 , atom (synonyms: bonnell ), core2, penryn,
corei7 (synonyms: nehalem ), btver2 (synonyms: ps4 ), corei7-avx
(synonyms: sandybridge ), core-avx-i (synonyms: ivybridge ),
core-avx2 (synonyms: haswell ), broadwell, skylake, knl, skx,
icelake-client (synonyms: icl ), slm (synonyms: silvermont ),
icelake-server (synonyms: icx ), tigerlake (synonyms: tgl ),
alderlake (synonyms: adl ), sapphirerapids (synonyms: spr ),
znver1, znver2 (synonyms: ps5 ), znver3, cortex-a9, cortex-a15,
cortex-a35, cortex-a53, cortex-a57, apple-a7, apple-a10,
apple-a11, apple-a12, apple-a13, apple-a14 }
  • --dllexport β€” make non-static functions DLL exported. Windows target only πŸͺŸ
  • --dwarf-version {2,3,4} β€” generate source-level debug information with given DWARF version (this triggers -g btw). Ignored for Windows target πŸ’€
  • -E β€” run only the preprocessor. stop right there, no compiling today βœ‹
  • --emit-asm β€” generate assembly language file as output
  • --emit-llvm β€” emit LLVM bitcode file as output
  • --emit-llvm-text β€” emit LLVM bitcode file as output in textual form
  • --emit-obj β€” generate object file file as output (default). yeah it says "file file", I'm not fixing it, that's what the page says and I respect the page ✨
  • --enable-llvm-intrinsics β€” enable experimental feature to call LLVM intrinsics from ISPC source code. experimental, so tread carefully bestie 🧚
  • --error-limit <value> β€” limit maximum number of errors emitting by ISPC to <value>
  • --force-alignment <value> β€” force alignment in memory allocations routine to be <value>
  • -g β€” generate source-level debug information
  • --help β€” print help 🫢
  • --help-dev β€” print help for developer options
  • --host-stub <filename> β€” emit host-side offload stub functions to file
  • -h <name> / --header-outfile <name> β€” output filename for header
  • -I <path> β€” add <path> to #include file search path
  • --ignore-preprocessor-errors β€” suppress errors from the preprocessor πŸ™ˆ
  • --instrument β€” emit instrumentation to gather performance data πŸ“Š
  • --math-lib <option> β€” select math library. your choices, bestie:
    • default β€” use ispc's built-in math functions
    • fast β€” use high-performance but lower-accuracy math functions ⚑ (speed over precision, iykyk)
    • svml β€” use the Intel(r) SVML math libraries
    • system β€” use the system's math library (may be quite slow) 🐌
  • -MMM <filename> β€” write #include dependencies to given file.
  • -M β€” output a rule suitable for make describing the dependencies of the main source file to stdout.
  • -MF <filename> β€” when used with -M, specifies a file to write the dependencies to.
  • -MT <filename> β€” when used with -M, changes the target of the rule emitted by dependency generation.
  • --no-omit-frame-pointer β€” disable frame pointer omission. it may be useful for profiling πŸ”
  • --nostdlib β€” don't make the ispc standard library available. going fully self-sufficient, respect πŸ’…
  • --no-pragma-once β€” don't use #pragma once in created headers
  • --nocpp β€” don't run the C preprocessor
  • -o<name>/--outfile <name> β€” output filename (may be "-" for standard output) πŸ“€
  • -O0/-O(1/2/3) β€” set optimization level. default behavior is to optimize for speed. the breakdown:
    • -O0 β€” optimizations disabled.
    • -O1 β€” optimization for size.
    • -O2/O3
  • --opt <option> β€” set optimization option. the menu:
    • disable-assertions β€” remove assertion statements from final code.
    • disable-fma β€” disable 'fused multiply-add' instructions (on targets that support them)
    • disable-loop-unroll β€” disable loop unrolling.
    • disable-zmm β€” disable using zmm registers for avx512 targets in favour of ymm. this also affects ABI. ⚠️ note the ABI thing, it's not just a lil perf tweak
    • fast-masked-vload β€” faster masked vector loads on SSE (may go past end of array). ⚠️ it can read past the end, so bestie, be careful
    • fast-math β€” perform non-IEEE-compliant optimizations of numeric expressions. non-compliant!! that's the whole point and also the whole warning 🚨
    • force-aligned-memory β€” always issue "aligned" vector load and store instructions
  • --pic β€” generate position-independent code. Ignored for Windows target πŸͺŸ
  • --quiet β€” suppress all output 🀫
  • --support-matrix β€” print full matrix of supported targets, architectures and OSes
  • --target <t> β€” select target ISA and width. the full list:
<t> ={ sse2-i32x4, sse2-i32x8,
sse4-i8x16, sse4-i16x8, sse4-i32x4, sse4-i32x8, avx1-i32x4,
avx1-i32x8, avx1-i32x16, avx1-i64x4, avx2-i8x32, avx2-i16x16,
avx2-i32x4, avx2-i32x8, avx2-i32x16, avx2-i64x4, avx512knl-x16,
avx512skx-x4, avx512skx-x8, avx512skx-x16, avx512skx-x32,
avx512skx-x64, neon-i8x16, neon-i16x8, neon-i32x4, neon-i32x8,
wasm-i32x4 }
  • --target-os <os> β€” select target OS. <os> ={ linux, custom_linux, freebsd, android, web } 🌍
  • --time-trace β€” turn on time profiler. generates JSON file based on output filename. ⏱️
  • --time-trace-granularity <value> β€” minimum time granularity (in microseconds) traced by time profiler.
  • --vectorcall/--no-vectorcall β€” enable/disable vectorcall calling convention on Windows (x64 only). Disabled by default πŸͺŸ
  • --version β€” print ispc version 🏷️
  • --werror β€” treat warnings as errors. zero tolerance era πŸ’€
  • --woff β€” disable warnings
  • --wno-perf β€” don't issue warnings related to performance-related issues
  • --x86-asm-syntax <option> β€” select style of code if generating assembly. pick your aesthetic:
    • intel β€” emit Intel-style assembly
    • att β€” emit AT&T-style assembly

πŸ‘€ SEE ALSO πŸ‘€

https://ispc.github.io/

like, go read the docs bestie, they're right there 🌐


πŸ’œ AUTHOR πŸ’œ

ispc is written by Intel Corporation.

this manual page was written by Yangfl for the Debian Project (and may be used by others). thank you Yangfl, absolute legend 🫢


and that's the whole page, babe πŸ’… it's ispc(1) from the General Commands Manual, and that ispc(1) you keep seeing at the bottom is just the footer tag doing its lil signature move β€” slay, go compile something iconic βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from