Best practices for creating and modifying ISPC builtin files. Use when adding target-specific optimizations, implementing new builtin functions, or working with the hierarchical target system.
Understanding the hierarchical target system is critical for correctly implementing and maintaining builtins.
ISPC's standard library consist of two layers:
stdlib/stdlib.ispc) — User-visible functions written in ISPC languagebuiltins/) — Target-specific implementations in LLVM IR that support the stdlibKey Concept: Targets are organized hierarchically. A child target inherits all functions from its parent that it doesn't explicitly override.
src/builtins.cpp)The hierarchy is defined in targetParentMap: